1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

LibWeb: Parse conic-gradient()s

This parses conic-gradient()s while also attempting to share the bulk
of the parsing code with linear-gradient()s. This is done by extracting
the <color-stop-list> parsing to a "fill in the blacks" generic
function. This is a little awkward but cuts down on a lot of copy
pasting of code.
This commit is contained in:
MacDue 2022-10-30 19:25:00 +01:00 committed by Linus Groh
parent ee72dcd523
commit 49497044de
2 changed files with 199 additions and 74 deletions

View file

@ -264,6 +264,7 @@ private:
Optional<AK::URL> parse_url_function(ComponentValue const&, AllowedDataUrlType = AllowedDataUrlType::None);
RefPtr<StyleValue> parse_linear_gradient_function(ComponentValue const&);
RefPtr<StyleValue> parse_conic_gradient_function(ComponentValue const&);
ParseErrorOr<NonnullRefPtr<StyleValue>> parse_css_value(PropertyID, TokenStream<ComponentValue>&);
RefPtr<StyleValue> parse_css_value(ComponentValue const&);