mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibWeb: Fix filter: drop-shadow
argument parsing
We were not discarding enough whitespace to actually get to the radius and color values.
This commit is contained in:
parent
2d544a0d8c
commit
c99fad77e1
Notes:
github-actions[bot]
2024-10-26 09:28:32 +00:00
Author: https://github.com/gmta
Commit: c99fad77e1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1963
1 changed files with 6 additions and 5 deletions
|
@ -5221,18 +5221,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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue