mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibWeb/CSS: Don't allow negative border radius in box-shadow
property
This commit is contained in:
parent
dc58c11217
commit
632fc73643
Notes:
github-actions[bot]
2025-03-14 15:09:14 +00:00
Author: https://github.com/tcl3
Commit: 632fc73643
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3916
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 115 additions and 0 deletions
|
@ -1816,6 +1816,10 @@ RefPtr<CSSStyleValue> Parser::parse_single_shadow_value(TokenStream<ComponentVal
|
|||
if (!maybe_blur_radius)
|
||||
continue;
|
||||
blur_radius = maybe_blur_radius;
|
||||
if (blur_radius->is_length() && blur_radius->as_length().length().raw_value() < 0)
|
||||
return nullptr;
|
||||
if (blur_radius->is_percentage() && blur_radius->as_percentage().value() < 0)
|
||||
return nullptr;
|
||||
tokens.discard_a_token();
|
||||
|
||||
// spread distance (optional)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue