mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Adapt parse_position() into parse_position_value()
Having two ways that `<position>` is represented is awkward and unnecessary. So, let's combine the two paths together. This first step copies and modifies the `parse_position()` code to produce a `PositionStyleValue`. Apart from returning a StyleValue, this also makes use of automatic enum parsing instead of manually comparing identifier strings.
This commit is contained in:
@@ -217,6 +217,7 @@ private:
|
||||
RefPtr<StyleValue> parse_string_value(ComponentValue const&);
|
||||
RefPtr<StyleValue> parse_image_value(ComponentValue const&);
|
||||
RefPtr<StyleValue> parse_paint_value(TokenStream<ComponentValue>&);
|
||||
RefPtr<PositionStyleValue> parse_position_value(TokenStream<ComponentValue>&);
|
||||
template<typename ParseFunction>
|
||||
RefPtr<StyleValue> parse_comma_separated_value_list(Vector<ComponentValue> const&, ParseFunction);
|
||||
RefPtr<StyleValue> parse_simple_comma_separated_value_list(PropertyID, Vector<ComponentValue> const&);
|
||||
|
||||
Reference in New Issue
Block a user