Differential D297193
Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS first; ClosedPublic Authored by edgar on Apr 29 2026, 12:08 AM. Tags Referenced Files
Details Summary Co-authored-by: Edgar Chen <echen@mozilla.com>
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes edgar requested changes to this revision.Apr 30 2026, 11:11 AM Comment ActionsThis revision now requires changes to proceed.Apr 30 2026, 11:11 AM edgar added a parent revision: D297981: Bug 2036482 - [Cocoa] Have PointerLock use native APIs;.May 4 2026, 6:39 PM edgar mentioned this in D297196: Bug 1829401 - Reject unadjustedMovement on platforms that can't honor it r?#dom-core,#mac-reviewers.May 6 2026, 11:37 PM edgar commandeered this revision.May 6 2026, 11:40 PM edgar planned changes to this revision.May 6 2026, 11:41 PM edgar updated this revision to Diff 1268526. edgar retitled this revision from Bug 1829401 - Add unadjustedMovement option and Promise return to Element.requestPointerLock r?#dom-core to WIP: Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS first;. edgar edited the summary of this revision. (Show Details) edgar planned changes to this revision.May 7 2026, 10:40 AM edgar updated this revision to Diff 1268828. edgar requested review of this revision.May 7 2026, 12:04 PM edgar updated this revision to Diff 1268870. edgar retitled this revision from WIP: Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS first; to Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS first;. edgar edited reviewers, added: smaug, mstange; removed: dom-core-reviewers, noahbpeterson1997.May 7 2026, 12:05 PM smaug accepted this revision.May 7 2026, 12:38 PM Comment ActionsCan't say about nsCocoaWindow.mm
edgar added a comment.May 7 2026, 1:09 PM Comment Actions
@mstange, can you help to review the changes in , thanks! edgar added inline comments.May 7 2026, 1:13 PM
edgar marked 2 inline comments as done.May 7 2026, 1:39 PM edgar added inline comments.
edgar marked 2 inline comments as done.May 7 2026, 2:10 PM edgar added inline comments.
edgar marked an inline comment as done.May 7 2026, 2:15 PM edgar marked an inline comment as done. edgar added inline comments.
edgar marked an inline comment as done.May 7 2026, 2:17 PM mstange accepted this revision.May 7 2026, 2:49 PM mstange added a project: testing-approved. Comment ActionsThe code changes are fine but the API is really strange. "Is supporting" sounds like something that depends on the moment and can change over time, but nsCocoaWindow just checks a pref. Could this be a NativePointerLockMode enum instead? Maybe with Unlocked, LockedRegular, LockedUnadjusted variants - or maybe Locked/Unlocked should be kept in a separate state. This revision is now accepted and ready to land.May 7 2026, 2:49 PM mstange added a comment.May 7 2026, 2:53 PM Comment ActionsOh, InitIsSupportingUnadjustedMovement goes from parent to content, I see. edgar added a comment.May 7 2026, 3:11 PM Comment Actions
Right, (It was ) is an API for querying whether the platform supports reporting unadjusted movement. Not all platforms support this capability, such as Linux X11. (Naming suggestions are welcome!)
Right, NativePointerLockMode maybe can be a , I will try this.
Will rename to . edgar added a comment.May 7 2026, 5:36 PM Comment Actions
I am going to land the patch as is for now, feel free to let me know if there is anything I should address, I will do that in a follow-up, thanks! mstange accepted this revision.May 7 2026, 6:12 PM Comment ActionsLooks good to me, thanks! As a follow-up you could make more use of PointerLockMode in places where you currently have bools, e.g. in . edgar added a comment.May 7 2026, 6:27 PM Comment Actions
I filed bug 2037988 as follow-up, thank you! Closed by commit rFIREFOXAUTOLAND782dcf9aee2e: Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS… (authored by edgar). · Explain WhyMay 7 2026, 11:40 PM This revision was automatically updated to reflect the committed changes. CosminS reopened this revision.May 8 2026, 9:18 PM This revision is now accepted and ready to land.May 8 2026, 9:18 PM edgar edited the summary of this revision. (Show Details) This revision was landed with ongoing or failed builds.May 10 2026, 7:06 AM Closed by commit rFIREFOXAUTOLAND90143df1b5db: Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS… (authored by edgar). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 1270892 testing/web-platform/meta/pointerlock/pointerlock-maintains-mousedown.html.iniLoading... testing/web-platform/meta/pointerlock/pointerlock_unadjustedMovement_update.html.iniLoading... testing/web-platform/tests/pointerlock/pointerlock_unadjustedMovement_update.htmlLoading... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
