LibWeb: Add 'PseudoClass' as a CSS SimpleSelector::Type

Same reasoning as the previous commit.
This commit is contained in:
Sam Atkins 2021-07-12 16:18:00 +01:00 committed by Andreas Kling
commit 4af7d41879
Notes: sideshowbarker 2024-07-18 09:04:21 +09:00
6 changed files with 230 additions and 234 deletions

View file

@ -49,6 +49,8 @@ u32 Selector::specificity() const
Selector::SimpleSelector::NthChildPattern Selector::SimpleSelector::NthChildPattern::parse(StringView const& args)
{
// FIXME: Remove this when the DeprecatedCSSParser is gone.
// The new Parser::parse_nth_child_pattern() does the same as this, using Tokens.
CSS::Selector::SimpleSelector::NthChildPattern pattern;
if (args.equals_ignoring_case("odd")) {
pattern.step_size = 2;