1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

LibWeb: Parse CSS :host selector

Let's at least parse it, even if we don't implement matching for it yet.
This commit is contained in:
Andreas Kling 2023-07-05 11:43:57 +02:00
parent 6acce60393
commit 088cc4ea73
5 changed files with 12 additions and 0 deletions

View file

@ -245,6 +245,9 @@ static inline bool matches_pseudo_class(CSS::Selector::SimpleSelector::PseudoCla
}
case CSS::Selector::SimpleSelector::PseudoClass::Type::Root:
return is<HTML::HTMLHtmlElement>(element);
case CSS::Selector::SimpleSelector::PseudoClass::Type::Host:
// FIXME: Implement :host selector.
return false;
case CSS::Selector::SimpleSelector::PseudoClass::Type::Scope:
return scope ? &element == scope : is<HTML::HTMLHtmlElement>(element);
case CSS::Selector::SimpleSelector::PseudoClass::Type::FirstOfType: