mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/CSS: Do not crash when parsing some multi-layer mask shorthands
This fixes a silly bug where we would crash when parsing a multi-layer mask shorthand property that contained the no-clip keyword but no value for mask-origin. Fixes a crash when parsing the CSS of https://www.browserbase.com/. The site still has other, unrelated problems though.
This commit is contained in:
parent
418f1575b0
commit
35254d17d1
Notes:
github-actions[bot]
2025-10-29 06:51:46 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 35254d17d1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6622
Reviewed-by: https://github.com/gmta ✅
2 changed files with 8 additions and 4 deletions
|
|
@ -3854,12 +3854,10 @@ RefPtr<StyleValue const> Parser::parse_mask_value(TokenStream<ComponentValue>& t
|
|||
mask_composites.append(mask_composite ? mask_composite.release_nonnull() : initial_mask_composite);
|
||||
mask_modes.append(mask_mode ? mask_mode.release_nonnull() : initial_mask_mode);
|
||||
|
||||
if (!mask_origin && !mask_clip) {
|
||||
if (!mask_origin)
|
||||
mask_origin = initial_mask_origin;
|
||||
mask_clip = initial_mask_clip;
|
||||
} else if (!mask_clip) {
|
||||
if (!mask_clip)
|
||||
mask_clip = mask_origin;
|
||||
}
|
||||
mask_origins.append(mask_origin.release_nonnull());
|
||||
mask_clips.append(mask_clip.release_nonnull());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue