Closed Bug 1808996 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 37786 - [anchor-position] Always use compositor scroller ids for composited scrolling

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

(Depends on 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

[anchor-position] Always use compositor scroller ids for composited scrolling

The existing implementation for composited scrolling is problematic
because if scrollers have changed in a style update, then it might
access data that is stale or already gone in the subsequent paint
property tree building.

This patch basically follows the outline in crbug.com/1401827#c2:

  • It changes Blink::AnchorScrollData to store CompositorElementId instead
    of PaintLayer for the relevant scroll containers, so that we don't
    need to access the snapshotted PaintLayer/PaintLayerScrollableArea in
    PrePaint and Paint, at which time they may have been stale
  • This also moves the job of scroller validation (i.e., whether there
    is a ScrollNode on cc side) completely to cc, which is much saner
    compared to the previous heuristic of checking HasOverflow() on the
    Blink side
  • This also fixes crbug.com/1400522, as we no longer create one cc
    TransformNode in the middle of creating another

Note that unlike the outline, there's no AnchorScrollData validation
at PrePaint on the Blink side. Since everything we pass to cc are just
scroller ids, and scroller id validation is done completely by cc, further validation in Blink is unnecessary.

Fixed: 1400522, 1401827
Change-Id: Ief68d18e4484cfbe8d4f1037f5d5cb6c6de9687f
Reviewed-on: https://chromium-review.googlesource.com/4137178
WPT-Export-Revision: 49fd7f6684afd6648491ee5fb793513da55277a6

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 6 tests

Status Summary

Firefox

PASS : 6

Chrome

PASS : 1
CRASH: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/94e6f50e53eb [wpt PR 37786] - [anchor-position] Always use compositor scroller ids for composited scrolling, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.