Change the way pointerlock works on e10s
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: xidorn, Assigned: edgar)
References
(Blocks 2 open bugs, Regressed 1 open bug)
Details
(Whiteboard: btpp-fixlater)
Attachments
(4 files, 7 obsolete files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
| Reporter | ||
Updated•10 years ago
|
Comment 1•10 years ago
|
||
| Reporter | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
| Reporter | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
| Reporter | ||
Comment 8•10 years ago
|
||
| Reporter | ||
Comment 9•10 years ago
|
||
| Reporter | ||
Comment 10•10 years ago
|
||
Updated•7 years ago
|
| Assignee | ||
Comment 11•5 years ago
|
||
quote from bug 853160 comment# 13:
The issue here is that we are just repeatedly trying to move the pointer back to the center of the window, but we never really restrict the pointer within the window area.
IIRC all desktop platforms provide some kind of mouse movement restriction API, for example on macOS we may use CGAssociateMouseAndMouseCursorPosition to forbid the mouse cursor from being moved at all.
Updated•3 years ago
|
Comment 12•3 years ago
|
||
Using this API prevents the mouse pointer from escaping from
PointerLocked windows.
Comment 13•3 years ago
|
||
| Assignee | ||
Comment 14•2 years ago
|
||
| Assignee | ||
Comment 15•2 years ago
|
||
Depends on D195726
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 16•2 years ago
|
||
by factoring out PointerLockManager::DispatchPointerLockChange() from
PointerLockManager::ChangePointerLockedElement().
This is needed for subsequent patches which tries to setup pointer lock in
chrome document as well when content request pointer lock and we don't want to
trigger pointerlock change event in chrome document in this case.
And this should not change currrent behavior.
Depends on D195728
| Assignee | ||
Comment 17•2 years ago
|
||
| Assignee | ||
Comment 18•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 19•2 years ago
|
||
| Assignee | ||
Comment 20•2 years ago
|
||
Comment 21•2 years ago
|
||
Comment on attachment 9367377 [details]
WIP: Bug 1255338 - Part 1: Remove unused member from UIEvent;
Revision D195728 was moved to bug 1880187. Setting attachment 9367377 [details] to obsolete.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•7 months ago
|
Updated•7 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
| Assignee | ||
Comment 22•5 months ago
|
||
Updated•5 months ago
|
| Assignee | ||
Comment 23•5 months ago
|
||
Hmm, Wayland currently has quite different setup on Pointer Lock, I need to think about how to make this change support that as well.
| Assignee | ||
Updated•5 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 24•4 months ago
|
||
Recentering the pointer on every mousemove causes too much overhead when it is
handled in the parent process, as it prevents mousemove events from being
compressed or coalesced.
This patch introduces an optimization that recenters the pointer only when it
moves within a 25% boundary buffer near the edge of the window, reducing the
number of recentering operations. Since each platform now uses a native API to
"lock" the pointer, we do not need to worry as much about the pointer escaping
pointer lock by moving outside the browser window at high speed.
Updated•4 months ago
|
Updated•4 months ago
|
Comment 25•3 months ago
|
||
Comment 26•3 months ago
|
||
Comment 27•3 months ago
•
|
||
Backed out for causing bp-nu bustages at /base/Document.h and mochitests failures
Backout Link
Push with failures
Failure Log
mochitests
Failure line /builds/worker/checkouts/gecko/dom/base/Document.h:1254:25: error: inline function 'mozilla::dom::Document::GetPresContext' is not defined [-Werror,-Wundefined-inline]
| Assignee | ||
Comment 28•3 months ago
|
||
Comment 29•3 months ago
|
||
Comment 30•3 months ago
|
||
Comment 31•3 months ago
|
||
Reverted this because it was causing wpt failures in pointerlock-maintains-mousedown.html.
- Revert link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-PASS | /pointerlock/pointerlock-maintains-mousedown.html?unadjustedmovement=false | Tests that mousemove events during pointer lock report correct button state - expected FAIL
| Assignee | ||
Comment 32•3 months ago
|
||
(In reply to Serban Stanca [:SerbanS] from comment #31)
- Failure line: TEST-UNEXPECTED-PASS | /pointerlock/pointerlock-maintains-mousedown.html?unadjustedmovement=false | Tests that mousemove events during pointer lock report correct button state - expected FAIL
Oh, this patch surprisingly fixes a test.
I think the test failed because there was an initial zero-movement mousemove event right after the pointer was locked. With recentering from the parent process, we no longer generate that initial zero-movement mousemove event.
| Assignee | ||
Comment 33•3 months ago
|
||
| Assignee | ||
Updated•3 months ago
|
Comment 34•3 months ago
|
||
Comment 35•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a27616a299ac
https://hg.mozilla.org/mozilla-central/rev/799ad36be320
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 39•2 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D200837
Updated•2 months ago
|
Comment 40•2 months ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: This makes pointer lock works better on Windows.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: None
- Risk associated with taking this patch: medium
- Explanation of risk level: This changes how pointer lock is handled. The changes have been in Nightly for a while, have been tested by several people, and no regressions have been reported. So I don't think this would be too risky.
- String changes made/needed?: None
- Is Android affected?: yes
| Assignee | ||
Comment 41•2 months ago
|
||
This is gated behind a new pref: dom.pointer-lock.reset-to-center-from-parent.enabled.
The patch preserves the original behavior as much as possible when the pref is off.
There are some changes that affect both code paths, but they are minor and
should not affect the main logic.
Here are some major change when the pref is enabled:
- Pointer recentering and computation of the center point are now handled in the parent process.
- Locking native pointer is initiated from parent process as well.
- When a remote target requests pointer lock, the parent process captures the mouse
on the top-level browser element. This is necessary because the center of the
chrome window may not correspond to the web page (for example, when a DevTools
panel is open and resized to be very large). - This patch introduces an optimization that recenters the pointer only when it
moves within a 25% boundary buffer near the edge of the window, reducing the
number of recentering operations. Since each platform now uses a native API to
"lock" the pointer, we do not need to worry as much about the pointer escaping
pointer lock by moving outside the browser window at high speed.
Original Revision: https://phabricator.services.mozilla.com/D296321
Comment 42•2 months ago
|
||
Edgar, this is a fix for a 10 year old bug marked as P3/S3 and there is some risk of regression, is there a specific business need to have it uplifted to production now instead of letting it ship with 154 mid-August?
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Comment 43•2 months ago
|
||
| uplift | ||
Updated•2 months ago
|
Description
•