Bug 1793031 [wpt PR 35708] - [CompositeClipPathAnimations] Fix crash caused by positi...
commitc79219b06b050f2be06de9a89be993a0b084028c
authorClaire Chambers <clchambers@microsoft.com>
Tue, 11 Oct 2022 11:47:41 +0000 (11 11:47 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 12 Oct 2022 11:08:43 +0000 (12 11:08 +0000)
treedf6d2377c7e0a5ca4b8e3744d458da0b45790c2c
parentf0a02a0bf1be776e4ae244eb6f9a993717c97fb4
Bug 1793031 [wpt PR 35708] - [CompositeClipPathAnimations] Fix crash caused by position: fixed., a=testonly

Automatic update from web-platform-tests
[CompositeClipPathAnimations] Fix crash caused by position: fixed.

With a translation of 0,0, a DCHECK in
DrawingDisplayItem::CalculateRectKnownToBeOpaqueForRecord would fail, as
the 'image size' for a deferred image is set by a parameter in the paint
worklet input, which in this case was the reference box. This would
fail the DCHECK when the clip path was larger than the reference box.

An extra parameter has been added to the clip path paint worklet input
so that the reference box is independent from the size of the clip area.

The area painted when producing the deferred image has also been
translated so that its origin is 0,0. This is also necessary to avoid the
DCHECK.

More about this change: https://docs.google.com/document/d/1gYI6G6ylpxKX0N1L23KPnaKsNOvNMaE-vM3l6RIroqU/edit

Note that the test for a version of this crash caused by a rounding error is also affected by another issue (1249071), so currently this test only guards against a crash and not visually incorrect clip paths. This will be resolved in a future CL.

This change also sets up a future change that resolves https://bugs.chromium.org/p/chromium/issues/detail?id=1248610

Bug: 13530381249071
Change-Id: I1d62a00a92f38e06e2ae090caefced5fdf289fd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3866054
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Claire Chambers <clchambers@microsoft.com>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1052298}

--

wpt-commits: 1313ec2338ba1ca3bd126a6730516151bef40878
wpt-pr: 35708
testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-animation-fixed-position-ref.html [new file with mode: 0644]
testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-animation-fixed-position-rounding-error-ref.html [new file with mode: 0644]
testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-animation-fixed-position-rounding-error.html [new file with mode: 0644]
testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-animation-fixed-position.html [new file with mode: 0644]