mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Port SVGUseElement from ByteString
This commit is contained in:
parent
64411127cb
commit
7909475b14
2 changed files with 3 additions and 3 deletions
|
@ -58,13 +58,13 @@ void SVGUseElement::attribute_changed(FlyString const& name, Optional<String> co
|
|||
m_y = AttributeParser::parse_coordinate(value.value_or(String {}));
|
||||
} else if (name == SVG::AttributeNames::href) {
|
||||
// FIXME: Support the xlink:href attribute as a fallback
|
||||
m_referenced_id = parse_id_from_href(value.value_or(String {}).to_byte_string());
|
||||
m_referenced_id = parse_id_from_href(value.value_or(String {}));
|
||||
|
||||
clone_element_tree_as_our_shadow_tree(referenced_element());
|
||||
}
|
||||
}
|
||||
|
||||
Optional<FlyString> SVGUseElement::parse_id_from_href(ByteString const& href)
|
||||
Optional<FlyString> SVGUseElement::parse_id_from_href(StringView href)
|
||||
{
|
||||
auto id_seperator = href.find('#');
|
||||
if (!id_seperator.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue