Browse Source

LibWeb: Add xlink:href to SVG attribute names

Luke Wilde 1 year ago
parent
commit
55646893d8

+ 3 - 0
Userland/Libraries/LibWeb/SVG/AttributeNames.cpp

@@ -22,6 +22,9 @@ void initialize_strings()
     ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE)
     ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE)
 #undef __ENUMERATE_SVG_ATTRIBUTE
 #undef __ENUMERATE_SVG_ATTRIBUTE
 
 
+    // NOTE: Special case for attributes with ':' in them.
+    xlink_href = "xlink:href"_fly_string;
+
     s_initialized = true;
     s_initialized = true;
 }
 }
 
 

+ 1 - 0
Userland/Libraries/LibWeb/SVG/AttributeNames.h

@@ -90,6 +90,7 @@ namespace Web::SVG::AttributeNames {
     E(x1)                           \
     E(x1)                           \
     E(x2)                           \
     E(x2)                           \
     E(xChannelSelector)             \
     E(xChannelSelector)             \
+    E(xlink_href)                   \
     E(y)                            \
     E(y)                            \
     E(y1)                           \
     E(y1)                           \
     E(y2)                           \
     E(y2)                           \