mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Port all callers of Element::namespace to Element::namespace_uri
Removing some more use of DeprecatedFlyString
This commit is contained in:
parent
f2e77f7778
commit
326b34c7c7
Notes:
sideshowbarker
2024-07-17 07:19:27 +09:00
Author: https://github.com/shannonbooth
Commit: 326b34c7c7
Pull-request: https://github.com/SerenityOS/serenity/pull/21815
Reviewed-by: https://github.com/awesomekling
4 changed files with 5 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue