wpt icon indicating copy to clipboard operation
wpt copied to clipboard

[CompositeClipPathAnimations] Fix crash caused by position: fixed.

Open chromium-wpt-export-bot opened this issue 3 years ago • 0 comments

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: 1353038 Change-Id: I1d62a00a92f38e06e2ae090caefced5fdf289fd9 Reviewed-on: https://chromium-review.googlesource.com/3866054 WPT-Export-Revision: f800c36aa120041a89106342bde87dce88313401

chromium-wpt-export-bot avatar Aug 30 '22 17:08 chromium-wpt-export-bot