From 51cd37110a239dd2e410b61dc4b59d2980b6ed76 Mon Sep 17 00:00:00 2001 From: MacDue Date: Sat, 5 Nov 2022 21:40:46 +0000 Subject: [PATCH] LibWeb: Fix parsing `conic-gradient()`s with only `at ` 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. --- Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 8d87624c78..2c942f7be8 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -2617,7 +2617,7 @@ RefPtr 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 {}; // =