mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:08:13 +00:00
LibWeb: Implement the :where() selector
This is identical to :is() except for specificity, so we can use the same code paths. :^)
This commit is contained in:
parent
47eb4b2db7
commit
993653317c
5 changed files with 22 additions and 8 deletions
|
@ -155,6 +155,7 @@ static inline bool matches_pseudo_class(CSS::Selector::SimpleSelector::PseudoCla
|
|||
case CSS::Selector::SimpleSelector::PseudoClass::Type::Checked:
|
||||
return matches_checked_pseudo_class(element);
|
||||
case CSS::Selector::SimpleSelector::PseudoClass::Type::Is:
|
||||
case CSS::Selector::SimpleSelector::PseudoClass::Type::Where:
|
||||
for (auto& selector : pseudo_class.argument_selector_list) {
|
||||
if (matches(selector, element))
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue