1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:57:47 +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:
Sam Atkins 2022-03-17 16:13:13 +00:00 committed by Andreas Kling
parent 47eb4b2db7
commit 993653317c
5 changed files with 22 additions and 8 deletions

View file

@ -77,6 +77,7 @@ public:
Checked,
Is,
Not,
Where,
Active,
};
Type type { Type::None };
@ -216,6 +217,8 @@ constexpr StringView pseudo_class_name(Selector::SimpleSelector::PseudoClass::Ty
return "is"sv;
case Selector::SimpleSelector::PseudoClass::Type::Not:
return "not"sv;
case Selector::SimpleSelector::PseudoClass::Type::Where:
return "where"sv;
case Selector::SimpleSelector::PseudoClass::Type::None:
break;
}