Bug 1798419 [wpt PR 36751] - [anchor-position] Fix a crash with scroller without...
commitd8d5abb35228b0012835c6a737fe9096e3c37652
authorXiaocheng Hu <xiaochengh@chromium.org>
Thu, 10 Nov 2022 15:24:50 +0000 (10 15:24 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 11 Nov 2022 12:33:19 +0000 (11 12:33 +0000)
tree4840e2cfbb62fbb7e4745445afddefb1743f4b58
parentbf8b823af559f5454532d0f6b8fe258b9543ba2e
Bug 1798419 [wpt PR 36751] - [anchor-position] Fix a crash with scroller without overflow, a=testonly

Automatic update from web-platform-tests
[anchor-position] Fix a crash with scroller without overflow

When a scroller's content doesn't overflow, there will be a non-null
PaintLayerScrollableArea on it, but no corresponding scroll translation
TransformPaintPropertyNode since there's nothing to scroll.

This patch fixes a crash in this case by filtering out such scrollers
from AnchorScrollData, and adds DCHECKs to verify it.

Bug: 1371217
Change-Id: I99d794bb78da75750ff7ebb57a657b5f276b7691
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3994190
Auto-Submit: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1066073}

--

wpt-commits: f51f92b6c8682fde9f65f40410527028190f8cb7
wpt-pr: 36751
testing/web-platform/tests/css/css-anchor-position/anchor-scroll-no-overflow-crash.html [new file with mode: 0644]