mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:17:35 +00:00
LibWeb: Parse box-shadow property in new CSS Parser
Previous multi-value properties use a ValueListStyleValue, which then gets parsed into its sub-properties in the StyleResolver. However, that is not ideal, especially as it exposes StyleResolver to the inner workings of the Parser and Tokenizer, which it should not need to know about. The way `box-shadow` was implemented as a StyleValue subclass means that the parsing can happen inside the Parser instead, which seems like a better solution. Converting the other complicated cases (background, font, list-style) is on my todo list for later.
This commit is contained in:
parent
697bffa3bd
commit
919eb7c0aa
2 changed files with 48 additions and 0 deletions
|
@ -176,6 +176,7 @@ private:
|
|||
static RefPtr<StyleValue> parse_color_value(ParsingContext const&, StyleComponentValueRule const&);
|
||||
static RefPtr<StyleValue> parse_string_value(ParsingContext const&, StyleComponentValueRule const&);
|
||||
static RefPtr<StyleValue> parse_image_value(ParsingContext const&, StyleComponentValueRule const&);
|
||||
static RefPtr<StyleValue> parse_box_shadow_value(ParsingContext const&, Vector<StyleComponentValueRule> const&);
|
||||
|
||||
template<typename T>
|
||||
Optional<SelectorList> parse_a_selector_list(TokenStream<T>&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue