LibWeb/CSS: Tag forgiving selector lists while parsing

This commit is contained in:
Sam Atkins 2024-11-14 12:48:14 +00:00 committed by Andreas Kling
parent 7f803c5c3d
commit 3a43fa9e35
Notes: github-actions[bot] 2024-11-14 19:08:30 +00:00
2 changed files with 3 additions and 0 deletions

View file

@ -608,6 +608,7 @@ Parser::ParseErrorOr<Selector::SimpleSelector> Parser::parse_pseudo_simple_selec
.type = Selector::SimpleSelector::Type::PseudoClass,
.value = Selector::SimpleSelector::PseudoClassSelector {
.type = pseudo_class,
.is_forgiving = true,
.argument_selector_list = move(argument_selector_list) }
};
}

View file

@ -142,6 +142,8 @@ public:
// Only used when "pseudo_class" is "NthChild" or "NthLastChild".
ANPlusBPattern nth_child_pattern {};
// FIXME: This would make more sense as part of SelectorList but that's currently a `using`
bool is_forgiving { false };
SelectorList argument_selector_list {};
// Used for :lang(en-gb,dk)