Closed Bug 1896008 Opened 9 months ago Closed 9 months ago

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

Categories

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

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Xianzhu Wang <wangxianzhu@chromium.org> wrote:

[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 actually allow 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 oscilation 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.

Bug: 338929745
Change-Id: I295fbc605ac8b7f0298eef7aeff4434c6bd54628
Reviewed-on: https://chromium-review.googlesource.com/5529048
WPT-Export-Revision: 1f71f1dba5c8775cf77054b44c528cfb0f90b5c6

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

CI Results

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

Total 2 tests

Status Summary

Firefox

FAIL: 2

Chrome

PASS: 1
FAIL: 1

Safari

FAIL: 2

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/246098244b21 [wpt PR 46190] - [css-anchor-position-1] Fix flicker with try-option with fixed-position anchor, a=testonly https://hg.mozilla.org/integration/autoland/rev/338633d0445f [wpt PR 46190] - Update wpt metadata, 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.