Closed Bug 2082800 Opened 1 month ago Closed 11 hours ago

[wpt-sync] Sync PR 63739 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=324109

Categories

(Core :: Web Painting, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63739 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63739
Details from upstream follow.

Nikolas Zimmermann <nzimmermann@igalia.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=324109

WebKit export from bug: Extend composited bounds by the filter outsets of a layer and its ancestors

<pre>
Extend composited bounds by the filter outsets of a layer and its ancestors

The clips above a composited layer may shrink the backing store that
updateCompositedBounds() assigns to the layer. A pixel-moving filter such
as blur or drop-shadow above the layer samples pixels outside the
background clip rect that we usually use to clip the layer, by up to its
outsets. These outsets are currently not taken into account when
computing the clipping region, so the backing store does not hold the
pixels in the outset region around the layer, and the filter cannot
sample them corectly. Fix that by expanding the clips above the layer,
including the document clip, by the relevant filter outsets.

Each clip is expanded only by the outsets of the filters that apply before
it, on the layer itself or on ancestors between the layer and the
clipping ancestor. Filters on the clipping ancestor or further up sample
already clipped content and leave the clip unchanged. Reference filters
and filters, that a composited layer cannot composite, are painted in
software, so their outsets are ignored.

A change of the filter outsets affects the composited bounds of all
descendants, not just the nearest composited ones, so such a change now
triggers a backing update of all descendents. When a composited filter
changes to a reference filter, the filter on the GraphicsLayer is now
cleared as well, which was previously broken.

RenderLayerBacking passes the sampling outsets on on to the GraphicsLayer.
On Cocoa platforms, GraphicsLayerCA::computeVisibleAndCoverageRect()
expands the visible and coverage rects by these outsets, so descendent
layers retrieve backing store in the outset region too.

This progresses two WPT tests in css/filter-effects:
fixed-pos-filter-clip-002.html and will-change-blur-filter-under-clip.html.

I added new tests for edge cases that WPT does not cover. Five of them are
plain reftests that describe interoperable behaviour rather than anything
WebKit specific, so they go to css/filter-effects as WPT tests.
The remaining ones inspect the composited bounds through internals.layerTreeAsText(),
so they are placed in compositing/filters.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=324109">https://bugs.webkit.org/show_bug.cgi?id=324109</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/323864@main">https://commits.webkit.org/323864@main</a>
</pre>

Component: web-platform-tests → Web Painting
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 402 tests and 5 subtests

Status Summary

Firefox

OK : 38
PASS: 6[GitHub] 23[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 3016[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 3272[Gecko-linux2404-64-debug] 3306[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 3312[Gecko-android-em-14-x86_64-debug-geckoview] 3314[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 3316[Gecko-linux2404-64-opt]
FAIL: 14[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 55[Gecko-linux2404-64-opt] 57[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 59[Gecko-android-em-14-x86_64-debug-geckoview] 65[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 99[Gecko-linux2404-64-debug]

Chrome

PASS: 6

Safari

PASS: 1
FAIL: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 11 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.