Closed Bug 1748726 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 32257 - Fix visual viewport scroll event ordering

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

David Bokan <bokan@chromium.org> wrote:

Fix visual viewport scroll event ordering

This change ensures the DOMWindow scroll event is fired before the
VisualVisual scroll event if both are scrolled in the same rAF. We do
this in DistributeScrollBetweenViewports which can distribute scroll
to either viewport first (though usually it's the visual viewport). This
method now computes the offset distribution based on the scroll_first
argument but always applies the scroll to the layout viewport first in
so that the event dispatch works in the correct order.

Added WPT for to ensure this ordering for both scroll and resize events.
The resize event behavior was fixed inadvertently in
https://crrev.com/ae16ed0d42708721662e6b4382659222ccddcf3d.

See https://github.com/WICG/visual-viewport/issues/65 and
https://github.com/WICG/visual-viewport/issues/66

Bug: 1016210
Change-Id: Ibb241cf27d163b7dfe4d83b9f65bf172d7f38769

Reviewed-on: https://chromium-review.googlesource.com/3359003
WPT-Export-Revision: 7e5f9cad83deca0f53f95403a9fb668f7b6a66e5

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

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

Total 2 tests and 1 subtests

Status Summary

Firefox

TIMEOUT: 1[Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt, GitHub] 2[Gecko-android-em-7.0-x86_64-qr-opt-geckoview]
ERROR : 1[Gecko-android-em-7.0-x86_64-qr-opt-geckoview] 2[Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt, GitHub]
NOTRUN : 1

Chrome

OK : 1
PASS : 2
TIMEOUT: 1
ERROR : 1

Safari

TIMEOUT: 3
ERROR : 1
NOTRUN : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/visual-viewport/resize-event-order.html: ERROR [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt, GitHub], TIMEOUT [Gecko-android-em-7.0-x86_64-qr-opt-geckoview] (Chrome: OK, Safari: TIMEOUT)
Popup: DOMWindow resize fired before VisualViewport.: TIMEOUT (Chrome: PASS, Safari: TIMEOUT)
iframe: DOMWindow resize fired before VisualViewport.: NOTRUN (Chrome: PASS, Safari: NOTRUN)
/visual-viewport/scroll-event-order.html: ERROR (Chrome: ERROR, Safari: ERROR)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f27d1055d704
[wpt PR 32257] - Fix visual viewport scroll event ordering, a=testonly
https://hg.mozilla.org/integration/autoland/rev/244fd069a055
[wpt PR 32257] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.