MarshallOfSound

#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 to setPermissionRequestHandler with the parent's requestingUrl and isMainFrame. A new patch carries the requesting frame with the request and WebContentsImpl records 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

Release Notes

Notes: Fixed pointerLock permission requests from in-process iframes reporting the parent frame instead of the requesting frame.

Backports

42-x-y
In-flight
PR Number
#54437
Waiting to be merged
43-x-y
In-flight
PR Number
#54434
Waiting to be merged
44-x-y
In-flight
PR Number
#54435
Waiting to be merged
45-x-y
In-flight
PR Number
#54436
Waiting to be merged

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