1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07:46 +00:00

LibWeb: Initialize PseudoClass/PseudoElement selectors in one go

There was no real benefit to creating the SimpleSelector early and then
modifying it, and doing so made this code harder to follow than it
needs to be.
This commit is contained in:
Sam Atkins 2022-03-21 16:21:01 +00:00 committed by Andreas Kling
parent c0db19f63c
commit 75ec960495
2 changed files with 120 additions and 111 deletions

View file

@ -85,12 +85,12 @@ public:
// FIXME: We don't need this field on every single SimpleSelector, but it's also annoying to malloc it somewhere.
// Only used when "pseudo_class" is "NthChild" or "NthLastChild".
ANPlusBPattern nth_child_pattern;
ANPlusBPattern nth_child_pattern {};
SelectorList argument_selector_list {};
// Used for :lang(en-gb,dk)
Vector<FlyString> languages;
Vector<FlyString> languages {};
};
struct Attribute {