Skip to content

Truly independent web browser

LibWeb: Compare SVG presentation attribute names without a literal

Andreas Kling8ffba7272efb
diff --git a/Libraries/LibWeb/SVG/SVGElement.cpp b/Libraries/LibWeb/SVG/SVGElement.cpp
index 152ec411e0a..b7b62945895 100644
--- a/Libraries/LibWeb/SVG/SVGElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGElement.cpp
@@ -154,7 +154,7 @@ static Optional<CSS::PropertyID> property_id_for_presentational_attribute(Utf16F
// https://svgwg.org/svg2-draft/styling.html#PresentationAttributes
// The pattern and gradient elements take patternTransform and gradientTransform instead of the
// plain transform presentation attribute.
- if (name == "transform"_utf16_fly_string
+ if (name == SVG::AttributeNames::transform
&& (tag_name == TagNames::pattern || tag_name == TagNames::linearGradient || tag_name == TagNames::radialGradient))
return {};