Closed Bug 1538316 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 15959 - Make pointerlock on mac lock cursor at display center

Categories

(Core :: DOM: Events, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ella Ge <eirage@chromium.org> wrote:

Make pointerlock on mac lock cursor at display center

Before this change, when pointerlock, we "lock" mouse position at where
it is. This causes that we may not receiving mouse events when pointer
is locked outside browser window.

This CL doing a few things:

  1. Move mac setCursorLock to cocoa view (instead of NSViewBridge).
  2. Make mac pointerlock stores the lock position, move cursor to window
    center when entering lock state, and move it back when unlock.
  3. In blink, stores the last_mouse_position_ as the lock position, and
    always use the lock position to override event's coordiantes when pointer
    is locked.

Bug: 542574, 802067
Change-Id: I054ace9342c531c41d6b509879d3c19ba20b4078
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1516354
Reviewed-by: Avi Drissman \<avi@chromium.org>
Reviewed-by: David Bokan \<bokan@chromium.org>
Reviewed-by: Navid Zolghadr \<nzolghadr@chromium.org>
Reviewed-by: Elly Fong-Jones \<ellyjones@chromium.org>
Commit-Queue: Ella Ge \<eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642681}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → DOM: Events
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Failed to get results from try push
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/45c315454fd0
[wpt PR 15959] - Make pointerlock on mac lock cursor at display center, a=testonly
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b955e9e7e458
[wpt PR 15959] - Make pointerlock on mac lock cursor at display center, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.