LibWeb: Fix filter: drop-shadow argument parsing

We were not discarding enough whitespace to actually get to the radius
and color values.

(cherry picked from commit c99fad77e1cfc8789f2a8d33e958d7b5bcf35ea9)
This commit is contained in:
Jelle Raaijmakers authored and Nico Weber committed 2024-11-19 11:02:38 -05:00
1 parent 93a8c61fe9
commit ef09e057ee
1 file changed
+6 -5
@@ -5266,18 +5266,19 @@ RefPtr<CSSStyleValue> Parser::parse_filter_value_list_value(TokenStream<Componen
auto maybe_color = parse_color_value(tokens);
auto x_offset = parse_length(tokens);
tokens.discard_whitespace();
if (!x_offset.has_value() || !tokens.has_next_token()) {
if (!x_offset.has_value() || !tokens.has_next_token())
return {};
}
auto y_offset = parse_length(tokens);
if (!y_offset.has_value()) {
tokens.discard_whitespace();
if (!y_offset.has_value())
return {};
}
if (tokens.has_next_token()) {
maybe_radius = parse_length(tokens);
tokens.discard_whitespace();
if (!maybe_color && (!maybe_radius.has_value() || tokens.has_next_token())) {
maybe_color = parse_color_value(tokens);
tokens.discard_whitespace();
if (!maybe_color)
return {};
} else if (!maybe_radius.has_value()) {