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

LibWeb: Fix parsing conic-gradient()s with only at <position>

This fixes parsing conic-gradient()s like:

  conic-gradient(at 60% 45%, red, yellow, green)

Where you have a center position but no starting angle.
This commit is contained in:
MacDue 2022-11-05 21:40:46 +00:00 committed by Linus Groh
parent e5ddbfaed6
commit 51cd37110a

View file

@ -2617,7 +2617,7 @@ RefPtr<StyleValue> Parser::parse_conic_gradient_function(ComponentValue const& c
tokens.skip_whitespace();
if (!tokens.has_next_token())
return {};
if ((got_from_angle || got_color_interpolation_method) && !tokens.next_token().is(Token::Type::Comma))
if ((got_from_angle || got_at_position || got_color_interpolation_method) && !tokens.next_token().is(Token::Type::Comma))
return {};
// <angular-color-stop-list> =