mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibWeb: Allow references via xlink:href
for SVG <use>
elements
This commit is contained in:
parent
03f957dc79
commit
0a061a6a63
Notes:
sideshowbarker
2024-07-17 02:29:45 +09:00
Author: https://github.com/MacDue
Commit: 0a061a6a63
Pull-request: https://github.com/SerenityOS/serenity/pull/23736
Issue: https://github.com/SerenityOS/serenity/issues/19648
Issue: https://github.com/SerenityOS/serenity/issues/23006
Reviewed-by: https://github.com/nico
1 changed files with 1 additions and 2 deletions
|
@ -58,8 +58,7 @@ void SVGUseElement::attribute_changed(FlyString const& name, Optional<String> co
|
||||||
m_x = AttributeParser::parse_coordinate(value.value_or(String {}));
|
m_x = AttributeParser::parse_coordinate(value.value_or(String {}));
|
||||||
} else if (name == SVG::AttributeNames::y) {
|
} else if (name == SVG::AttributeNames::y) {
|
||||||
m_y = AttributeParser::parse_coordinate(value.value_or(String {}));
|
m_y = AttributeParser::parse_coordinate(value.value_or(String {}));
|
||||||
} else if (name == SVG::AttributeNames::href) {
|
} else if (name == SVG::AttributeNames::href || name == "xlink:href"_fly_string) {
|
||||||
// FIXME: Support the xlink:href attribute as a fallback
|
|
||||||
m_referenced_id = parse_id_from_href(value.value_or(String {}));
|
m_referenced_id = parse_id_from_href(value.value_or(String {}));
|
||||||
|
|
||||||
clone_element_tree_as_our_shadow_tree(referenced_element());
|
clone_element_tree_as_our_shadow_tree(referenced_element());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue