LibWeb: Allow references via xlink:href for SVG <use> elements

This commit is contained in:
MacDue 2024-03-27 00:08:14 +00:00 committed by Andreas Kling
parent 03f957dc79
commit 0a061a6a63
Notes: sideshowbarker 2024-07-17 02:29:45 +09:00

View file

@ -58,8 +58,7 @@ void SVGUseElement::attribute_changed(FlyString const& name, Optional<String> co
m_x = AttributeParser::parse_coordinate(value.value_or(String {}));
} else if (name == SVG::AttributeNames::y) {
m_y = AttributeParser::parse_coordinate(value.value_or(String {}));
} else if (name == SVG::AttributeNames::href) {
// FIXME: Support the xlink:href attribute as a fallback
} else if (name == SVG::AttributeNames::href || name == "xlink:href"_fly_string) {
m_referenced_id = parse_id_from_href(value.value_or(String {}));
clone_element_tree_as_our_shadow_tree(referenced_element());