merge_pr_57084
Fix backdrop-filter with invalid mask image issue
According to https://drafts.fxtf.org/css-masking-1/#the-mask-image, an
invalid mask image should generate a transparent black mask layer that
hides the content. However, when backdrop-filter is used with invalid
mask images, the content is still created and rendered.
This change adds AllImagesAreInvalid() checking in
PaintPropertyTreeBuilder for elements with backdrop-filter. When an
element has both mask-image and backdrop-filter specified, but all mask
images are invalid (failed loads, invalid URLs, slow-loading, etc.),
PaintPropertyTreeBuilder directly checks this condition and sets
opacity=0, correctly hiding the element and its backdrop-filter as
required by the spec for invalid mask images.
The fix is guarded by the HandleInvalidMaskImageWithBackdropFilter
runtime feature flag as a killswitch.
Bug: 441547032
Change-Id: I77cd4907beb541325894eaa2a490401fbc1c05b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7004946
Reviewed-by: Philip Rogers pdr@chromium.org
Reviewed-by: Fredrik Söderquist fs@opera.com
Commit-Queue: Wangsong Jin wangsongjin@microsoft.com
Cr-Commit-Position: refs/heads/main@{#1566394}