Closed Bug 1895753 Opened 5 months ago Closed 4 months ago

[wpt-sync] Sync PR 46168 - Fix updating snap containers on loss/gain of focus

Categories

(Core :: Layout: Scrolling and Overflow, 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 46168 into mozilla-central (this bug is closed when the sync is complete).

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

David Awogbemila <awogbemila@chromium.org> wrote:

Fix updating snap containers on loss/gain of focus

In the linked bug, a smooth anchor scroll failed to happen because
a snap area within the snap container would gain focus, causing Blink
to AddPendingSnapUpdates[1] for this container. However, doing so also
causes it to snap when the updates are executed[2] which causes all
ongoing animations to be cancelled[3].

This patch fixes this by having the focus update simply update the
snap container's snap areas and avoid triggering a snap.

[1]https://source.chromium.org/chromium/chromium/src/+/6f8108c5c41a2c71c48143103bf3d80222286996:third_party/blink/renderer/core/dom/element.cc;l=6568
[2]https://source.chromium.org/chromium/chromium/src/+/6f8108c5c41a2c71c48143103bf3d80222286996:third_party/blink/renderer/core/frame/local_frame_view.cc;l=5007
[3]https://source.chromium.org/chromium/chromium/src/+/a8cc9d0a5ba00223ba0ee90220b4f20663286673:third_party/blink/renderer/core/scroll/scrollable_area.cc;l=1331

Bug: 338094933
Change-Id: Id597f0c80fa256ef53777f26cbc0bcfa463dac5e
Reviewed-on: https://chromium-review.googlesource.com/5527253
WPT-Export-Revision: 313ac3c3526caf94928b7b45e8c640fb2fe0629d

Component: web-platform-tests → Layout: Scrolling and Overflow
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS : 1

Chrome

OK : 1
PASS : 1

Safari

TIMEOUT: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/338a0844e9fa [wpt PR 46168] - Fix updating snap containers on loss/gain of focus, a=testonly
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.