#54432: fix: attribute pointer lock requests from in-process iframes to the requesting frame
Merged
Created: Sep 26, 2026, 4:01:17 AM
Merged: Sep 26, 2026, 5:08:18 AM
6 comments
Target: main
Description of Change
Follow-up to #53664.
requestPointerLock()reaches the browser over the requesting frame's local-root widget, so an iframe that shares its parent's renderer process (for example a same-site, cross-origin child) was reported tosetPermissionRequestHandlerwith the parent'srequestingUrlandisMainFrame. A new patch carries the requesting frame with the request andWebContentsImplrecords it; the permission helper reports that frame.keyboard.lock()is main-frame only, so the keyboard lock request is attributed to the primary main frame directly, and refused if the lock widget is ever not the main frame's.- The pointer lock spec now covers a cross-site child and a same-site cross-origin child.
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
- tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, past tense, and no longer than 80 characters.
Release Notes
Notes: Fixed pointerLock permission requests from in-process iframes reporting the parent frame instead of the requesting frame.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron