web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
5.02k stars 3.12k forks source link

[CompositeClipPathAnimation] Fix crash with position: absolute #49326

Closed chromium-wpt-export-bot closed 8 hours ago

chromium-wpt-export-bot commented 8 hours ago

A new clip path crash was discovered during experimentation, exacerbated by a recent change that enables clip path animations when there is a positive delay or clip-path: none.

In this case when the positioning is absolute, the clip path style property is a nullptr instead of being filled with the value for none. This breaks assumptiosn in clip path clipper, which assume (reasonably, based on prior usage of the code) that an element with a clip path animation or a mask based clip will have a clip path value in its style.

This change adds conditionals and removes a DCHECK to prevent any crash in this case.

Bug: 378027650

Change-Id: If7e2814a4de647c1f6cebe6e7f8291419bcac018 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6001026 Reviewed-by: Philip Rogers \pdr@chromium.org Commit-Queue: Claire Chambers \clchambers@microsoft.com Cr-Commit-Position: refs/heads/main@{#1386634}