mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibWeb: Fail the parsing of an invalid HSL legacy syntax
This commit is contained in:
parent
56441fe3e6
commit
fac3ea77d8
Notes:
github-actions[bot]
2024-11-04 10:49:22 +00:00
Author: https://github.com/qligier
Commit: fac3ea77d8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1915
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 3 additions and 0 deletions
|
@ -2861,6 +2861,9 @@ RefPtr<CSSStyleValue> Parser::parse_hsl_color_value(TokenStream<ComponentValue>&
|
|||
inner_tokens.discard_whitespace();
|
||||
|
||||
alpha = parse_number_percentage_value(inner_tokens);
|
||||
// The parser has consumed a comma, so the alpha value is now required
|
||||
if (!alpha)
|
||||
return {};
|
||||
inner_tokens.discard_whitespace();
|
||||
|
||||
if (inner_tokens.has_next_token())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue