LibWeb: Make parse_color_stop_list() a CSS Parser method

This lets us remove the color/dimension-parsing lambdas, since these
always forwarded to the same methods. This will make it easier to later
convert those methods to take a TokenStream.
This commit is contained in:
Sam Atkins
2023-12-27 11:48:36 +00:00
committed by Andreas Kling
parent 8e56367092
commit 384b18b271
2 changed files with 7 additions and 9 deletions

View File

@@ -198,6 +198,8 @@ private:
Optional<URL::URL> parse_url_function(ComponentValue const&);
RefPtr<StyleValue> parse_url_value(ComponentValue const&);
template<typename TElement>
Optional<Vector<TElement>> parse_color_stop_list(TokenStream<ComponentValue>& tokens, auto is_position, auto get_position);
Optional<Vector<LinearColorStopListElement>> parse_linear_color_stop_list(TokenStream<ComponentValue>&);
Optional<Vector<AngularColorStopListElement>> parse_angular_color_stop_list(TokenStream<ComponentValue>&);