1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00

LibWeb: Port all callers of Element::namespace to Element::namespace_uri

Removing some more use of DeprecatedFlyString
This commit is contained in:
Shannon Booth 2023-11-05 13:12:53 +13:00 committed by Andreas Kling
parent f2e77f7778
commit 326b34c7c7
4 changed files with 5 additions and 7 deletions

View file

@ -562,10 +562,10 @@ static inline bool matches(CSS::Selector::SimpleSelector const& component, Optio
if (!style_sheet_for_rule.has_value() || !style_sheet_for_rule->default_namespace().has_value())
return true;
// "Otherwise it is equivalent to ns|E where ns is the default namespace."
return element.namespace_() == style_sheet_for_rule->default_namespace();
return element.namespace_uri() == style_sheet_for_rule->default_namespace();
case CSS::Selector::SimpleSelector::QualifiedName::NamespaceType::None:
// "elements with name E without a namespace"
return element.namespace_().is_empty();
return !element.namespace_uri().has_value();
case CSS::Selector::SimpleSelector::QualifiedName::NamespaceType::Any:
// "elements with name E in any namespace, including those without a namespace"
return true;
@ -578,7 +578,7 @@ static inline bool matches(CSS::Selector::SimpleSelector const& component, Optio
return false;
auto selector_namespace = style_sheet_for_rule->namespace_uri(qualified_name.namespace_);
return selector_namespace.has_value() && selector_namespace.value() == element.namespace_();
return selector_namespace.has_value() && selector_namespace.value() == element.namespace_uri();
}
VERIFY_NOT_REACHED();
}