1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibWeb: Generate a ValueListStyleValue when parsing CSS values

We skip whitespace tokens while doing this. As far as I can tell,
whitespace is not useful once we get to this point, and it legally
may or may not appear between any two tokens. By not including it
in the ValueListStyleValue, we make the "if it has 3 parts"-type
checks a lot more straightforward.
This commit is contained in:
Sam Atkins 2021-07-14 16:20:06 +01:00 committed by Andreas Kling
parent 4a03279539
commit d72ce7b989
2 changed files with 53 additions and 29 deletions

View file

@ -177,6 +177,8 @@ private:
static Optional<float> try_parse_float(StringView string);
RefPtr<StyleValue> parse_single_css_value(PropertyID, StyleComponentValueRule const&);
ParsingContext m_context;
Tokenizer m_tokenizer;