mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01: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
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
body {
|
||||
mask: url(foo.png), url(bar.png) no-clip;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user