[wpt-sync] Sync PR 61125 - Forward wheel events to main thread when pointer is locked.
Categories
(Core :: DOM: Events, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 61125 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/61125
Details from upstream follow.
Byungwoo Lee <blee@igalia.com> wrote:
Forward wheel events to main thread when pointer is locked.
When the pointer is locked, the position of wheel events can be outside
the viewport bounds. This causes HasBlockingWheelEventHandlerAt()
to miss, and HandleMouseWheel() incorrectly drops the event instead of
forwarding it to the main thread.Fix this by tracking pointer lock state in InputHandlerProxy with a new
is_pointer_locked_ flag. When set, HandleMouseWheel() returns
DID_NOT_HANDLE.PointerLockController sets the flag in DidAcquirePointerLock() and
clears it in ExitPointerLock(), posting a task that sets the flag on
the input thread through WidgetInputHandlerManager.A WPT test pointerlock/pointerlock_wheel_event_outside_target.html is
added with failure on chaining scroll from the pointer-locked element,
which will be handled by a separate CL (crbug.com/530589456).Bug: 497060679, 530589456
Change-Id: Ib5635d79d13d852b3426c3665716ec629cecc754
Reviewed-on: https://chromium-review.googlesource.com/8022943
WPT-Export-Revision: 6f42785f4912976e1b185b7d0da2fdbfafbde487
| Assignee | ||
Updated•10 days ago
|
| Assignee | ||
Comment 1•9 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=b4279f0e250114cf8df35a0ca5e5b614fca82e70
| Assignee | ||
Comment 2•9 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 20 tests and 1 subtests
Status Summary
Firefox
OK : 1[GitHub] 18[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 20[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 65[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 69[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 2[GitHub] 3[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 7[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
ERROR: 2
Chrome
OK : 1
FAIL : 2
Safari
OK : 1
FAIL : 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /pointerlock/pointerlock-maintains-mousedown.html?unadjustedmovement=true [wpt.fyi]:
ERROR[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt],OK[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]- Tests that mousemove events during pointer lock report correct button state:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt],PASS[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
- Tests that mousemove events during pointer lock report correct button state:
- /pointerlock/pointerlock_api_behavior.html [wpt.fyi]
- pointerlockchange event does not bubble and is not cancelable:
FAIL
- pointerlockchange event does not bubble and is not cancelable:
- /pointerlock/pointerlock_unadjustedMovement.html [wpt.fyi]
- pointerlock_unadjustedMovement:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt],PASS[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
- pointerlock_unadjustedMovement:
- /pointerlock/pointerlock_unadjustedMovement_update.html [wpt.fyi]:
ERROR[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt],OK[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]- request pointer lock with different unadjustedMovement on the same locked element should still fire pointerlockchange event:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt],PASS[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - request pointer lock with different unadjustedMovement on the different element should still fire pointerlockchange event:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt],PASS[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
- request pointer lock with different unadjustedMovement on the same locked element should still fire pointerlockchange event:
- /pointerlock/pointerlock_wheel_event_outside_target.html [wpt.fyi]
- acquire pointer lock and scroll when the cursor is not on locked element:
FAIL(Chrome:FAIL, Safari:FAIL) - wheel event is dispatched but scroll is prevented when locked element calls preventDefault:
FAIL(Chrome:FAIL, Safari:FAIL)
- acquire pointer lock and scroll when the cursor is not on locked element:
Comment 4•5 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8e6db6af2d97
https://hg.mozilla.org/mozilla-central/rev/4d0d8dc8d6e2
Description
•