1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 19:42:14 +00:00
serenity/Userland/Libraries/LibWeb/CSS/Parser
Sam Atkins ef7d80ced2 LibWeb: Parse <urange> as CSS::UnicodeRange
Like, An+B, this is an old construct that does not fit well with modern
CSS syntax, so things get a bit hairy! We have to determine which
tokens match the grammar for `<urange>`, then turn those back into a
string, and then parse the string differently from normal. Thankfully
the spec describes in detail how to do that. :^)

This is not 100% correct, since we are not using the original source
text (referred to in the spec as the "representation") of the tokens,
but just converting them to strings in a manual, ad-hoc way.
Re-engineering the Tokenizer to keep that original text was too much of
a tangent for today. In any case, we do parse `U+4???`, `U+0-100`,
`U+1234`, and similar, so good enough for now!
2022-04-07 21:20:14 +02:00
..
ComponentValue.h LibWeb: Rename StyleComponentValueRule -> ComponentValue 2022-04-07 21:20:14 +02:00
Declaration.h LibWeb: Expose Declaration's internals with getters 2022-04-07 21:20:14 +02:00
DeclarationOrAtRule.h LibWeb: Rename StyleDeclarationRule -> Declaration 2022-04-07 21:20:14 +02:00
Parser.cpp LibWeb: Parse <urange> as CSS::UnicodeRange 2022-04-07 21:20:14 +02:00
Parser.h LibWeb: Parse <urange> as CSS::UnicodeRange 2022-04-07 21:20:14 +02:00
StyleBlockRule.h LibWeb: Rename StyleComponentValueRule -> ComponentValue 2022-04-07 21:20:14 +02:00
StyleFunctionRule.h LibWeb: Rename StyleComponentValueRule -> ComponentValue 2022-04-07 21:20:14 +02:00
StyleRule.h LibWeb: Rename StyleComponentValueRule -> ComponentValue 2022-04-07 21:20:14 +02:00
StyleRules.cpp LibWeb: Rename StyleDeclarationRule -> Declaration 2022-04-07 21:20:14 +02:00
Token.cpp LibWeb: Tidy up CSS::Token::to_debug_string() 2022-03-22 15:47:36 +01:00
Token.h LibWeb: Add basic support for the attr() CSS function 2022-03-30 03:18:14 +02:00
Tokenizer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Tokenizer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00