Closed Bug 1896348 Opened 9 months ago Closed 9 months ago

[wpt-sync] Sync PR 46224 - Revert "[css-anchor-position-1] Fix flicker with try-option with fixed-position anchor"

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Michael Lippautz <mlippautz@chromium.org> wrote:

Revert "[css-anchor-position-1] Fix flicker with try-option with fixed-position anchor"

This reverts commit 94af1f503694c3a7ffece9c910516b3bbe9d50c2.

Reason for revert: Causing crashes in GC, see bug.

Bug: 339967265, 338929745

Original change's description:

[css-anchor-position-1] Fix flicker with try-option with fixed-position anchor

Previously we supposed the default anchor wouldn't change in
try-options, but the latest draft spec allows that.

When the currently tried option will use a default anchor that is
different from the currently used default anchor, checking overflow
with the snapshotted AnchorPositionScrollData will be incorrect,
and the incorrect results caused oscillation between try options.

To resolve that, when the total offset is requested for a different
default anchor, we need to calculate it on the fly instead of getting
it from the snapshotted result.

Also allow one more layout if ValidateSnapshot() (called after the
first layout in a document lifecycle update) finds that the
snapshotted scroll data needs update, to ensure correct layout and
paint with the changed anchor and scroll adjustment in most cases.

In rare cases when we need more than one additional layout to get
the stable layout, ShouldScheduleNextService() will schedule another
lifecycle.

Fixed: 338929745
Change-Id: I295fbc605ac8b7f0298eef7aeff4434c6bd54628
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529048
Reviewed-by: Ian Kilpatrick \<ikilpatrick@chromium.org>
Reviewed-by: Philip Rogers \<pdr@chromium.org>
Commit-Queue: Xianzhu Wang \<wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299608}

Change-Id: I222274aa6af5da55d5d6dc0867d3cda684efff49

Reviewed-on: https://chromium-review.googlesource.com/5526668
WPT-Export-Revision: fa7b07016ed7bdf09cb7f5af8ec69521dbc23e3c

PR 46224 applied with additional changes from upstream: bba96a1ef7646e6f3c0435b80c73043c897e505b
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Test result changes from PR not available.
Test result changes from PR not available.
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/27a6a9daa1b8 [wpt PR 46224] - Revert "[css-anchor-position-1] Fix flicker with try-option with fixed-position anchor", a=testonly
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.