mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
LibWeb: Use FlyString where possible in NamedNodeMap
We cannot port over Optional<FlyString> until the IDL generator supports passing that through as an argument (as opposed to an Optional<String>). Change to FlyString where possible, and resolve any fallout as a result.
This commit is contained in:
parent
0bb0c7dac2
commit
f32185420d
8 changed files with 40 additions and 45 deletions
|
@ -94,7 +94,7 @@ JS::GCPtr<SVGGradientElement const> SVGGradientElement::linked_gradient() const
|
|||
// FIXME: This entire function is an ad-hoc hack!
|
||||
// It can only resolve #<ids> in the same document.
|
||||
|
||||
auto link = has_attribute(AttributeNames::href) ? deprecated_get_attribute(AttributeNames::href) : deprecated_get_attribute("xlink:href"sv);
|
||||
auto link = has_attribute(AttributeNames::href) ? deprecated_get_attribute(AttributeNames::href) : deprecated_get_attribute("xlink:href"_fly_string);
|
||||
if (auto href = link; !href.is_empty()) {
|
||||
auto url = document().parse_url(href);
|
||||
auto id = url.fragment();
|
||||
|
|
|
@ -107,7 +107,7 @@ void SVGUseElement::svg_element_removed(SVGElement& svg_element)
|
|||
return;
|
||||
}
|
||||
|
||||
if (svg_element.deprecated_attribute("id"sv).matches(m_referenced_id.value())) {
|
||||
if (svg_element.deprecated_attribute("id"_fly_string).matches(m_referenced_id.value())) {
|
||||
shadow_root()->remove_all_children();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue