1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00
serenity/Userland/Libraries/LibWeb/CSS/Parser
Sam Atkins 4065eb169c LibWeb: Implement CSS parsing convenience functions
These mostly match the API in `DeprecatedCSSParser.h`. The exception is
that `parse_selector()` returns a `SelectorList` instead of just one
`Selector`. The only uses of that are in
`ParentNode::query_selector[_all]()` which should be matching against a
list, according to the spec.

`parse_html_length()` is an odd case. It's used for `width="200"` cases
in HTML, so is not really CSS related, but does produce a StyleValue.
The values allowed in `width/height` in HTML vary per element, but they
are a lot more restricted than in CSS, so it's slightly inappropriate to
use the CSS parser for them, even though it's convenient.

We also ignore a few functions:

- `parse_line_width()`
- `parse_line_style()`
- `parse_color()`

These are all only used in `StyleResolver`, when it is given a property
value as a String. That won't happen once the old parser is removed.
2021-08-02 19:01:25 +04:30
..
DeclarationOrAtRule.h LibWeb: Add accessors to CSS::DeclarationOrAtRule 2021-07-11 23:19:56 +02:00
DeprecatedCSSParser.cpp LibWeb: Make CSS 'An+B' parsing spec-compliant 2021-07-31 00:18:11 +02:00
DeprecatedCSSParser.h LibWeb: Make CSS::Selector reference counted 2021-07-14 13:31:00 +02:00
Parser.cpp LibWeb: Implement CSS parsing convenience functions 2021-08-02 19:01:25 +04:30
Parser.h LibWeb: Implement CSS parsing convenience functions 2021-08-02 19:01:25 +04:30
StyleBlockRule.h LibWeb: Give CSS Token and StyleComponentValueRule matching is() funcs 2021-07-11 23:19:56 +02:00
StyleComponentValueRule.h LibWeb: Increase clarity with CSS token debug logging 2021-07-11 23:19:56 +02:00
StyleDeclarationRule.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
StyleFunctionRule.h LibWeb: Use Selectors instead of a String for :not() selectors 2021-07-14 13:31:00 +02:00
StyleRule.h LibWeb: Merge CSS Parser's QualifiedStyleRule and AtStyleRule 2021-07-11 23:19:56 +02:00
StyleRules.cpp LibWeb: Convert StyleFunctionRule.m_values to ComponentValues 2021-07-11 23:19:56 +02:00
Token.cpp LibWeb: Make CSS 'An+B' parsing spec-compliant 2021-07-31 00:18:11 +02:00
Token.h LibWeb: Make CSS 'An+B' parsing spec-compliant 2021-07-31 00:18:11 +02:00
Tokenizer.cpp LibWeb: Define proper debug symbols for CSS Parser and Tokenizer 2021-07-31 00:18:11 +02:00
Tokenizer.h LibWeb: Correct escape handling in CSS Tokenizer 2021-07-11 23:19:56 +02:00