Closed Bug 2033397 Opened 2 months ago Closed 1 month ago

Keyboard lock state isn't updated correctly, while top-level document goes into fullscreen (without keyboard lock) first then requesting fullscreen (with keyboard lock) on OOP iframe

Categories

(Core :: DOM: Core & HTML, defect)

defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox151 --- fixed
firefox152 --- fixed

People

(Reporter: edgar, Assigned: sfarre)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files, 2 obsolete files)

No description provided.
Summary: Keyboard lock state isn't updated correctly, while top-level document goes into first then requesting fullscreen on OOP iframe → Keyboard lock state isn't updated correctly, while top-level document goes into fullscreen (without keyboard lock) first then requesting fullscreen (with keyboard lock) on OOP iframe

Requesting fullscreen in a OOP iframe while top-level is already in fullscreen doesn't even work on Safari.

Blocks: 2032815

Initially I was thinking this here is probably the culprit but I'm not entirely sure now after having looked it over again.

Worth looking into, is if the right boolean value is getting passed in here

Attached file iframe.html

STR:

  1. load https://codepen.io/editor/edgarchen-the-decoder/pen/019d9acf-e39e-7654-b81b-4dd06fbe6aa8
  2. Click Fullscreen on top-level document
  3. Wait for top-level document goes into fullscreen
  4. Click Fullscreen with keyboardLock on the OOP-iframe
  5. wait for OOP-iframe goes into fullscreen
  6. Check initial warning and press Esc

Actual result:
Initial warning doesn't show the right message (pres and hold esc).
And pres Esc exits the fullscreen.

Expected result:
initial warning should show right message.
And pres Esc should not exit fullscreen.

Assignee: nobody → sfarre

Update the keyboard lock without checking if we had a previous
fullscreen dock, because when we have OOP frames, they are not
accessible there (and therefore will not update the state properly).

Added web platform tests that test for this specific scenario.

Attachment #9571700 - Attachment description: Bug 2033397 - Update keyboard lock every time r=edgar! → Bug 2033397 - Update keyboard lock appropriately r=edgar!
Severity: -- → S3
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d87156d73579 https://hg.mozilla.org/integration/autoland/rev/09efcbda4ab9 Revert "Bug 2033397 - Update keyboard lock appropriately r=edgar,avandolder" for causing wpt failures at iframe.tentative

Backed out for causing wpt failures at iframe.tentative
Backout Link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-FAIL | /fullscreen/api/keyboard-lock-cross-origin-iframe.tentative.sub.html | Cross-origin iframe fullscreen with keyboardLock:browser — hold Escape exits - assert_equals: single Escape should not exit fullscreen when keyboardLock is browser expected Element node <iframe id="cross-origin-iframe" src="http://not-web-plat... but got null

Flags: needinfo?(sfarre)

Test ran accidentally on android, fixed in latest submission

Flags: needinfo?(sfarre)

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/59671 for changes under testing/web-platform/tests

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch

Upstream PR merged by moz-wptsync-bot

Update keyboard lock state only when chrome document enters fullscreen,
and in the case where an optimization is performed when a content
process already sees itself to be in DOM fullscreen, then it should
update kblock state of the chrome document as well, so that the correct
warning is displayed.

Added web platform tests that test for this specific scenario.

Original Revision: https://phabricator.services.mozilla.com/D295315

Attachment #9583602 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Potential buggy behavior with OOP iframes
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Keyboard lock related only effects
  • String changes made/needed?: No
  • Is Android affected?: no
Attachment #9583603 - Flags: approval-mozilla-beta?
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/06bf41eda843 https://hg.mozilla.org/integration/autoland/rev/9ddcf6ffba44 Revert "Bug 2033397 - Add brower fullscreen warning test; r=avandolder" for causing bc failures at browser_fullscreen_keyboard_lock_warning

Backed out for causing bc failures at fullscreen_keyboard_lock_warning.js
Backout Link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-FAIL | browser/base/content/test/fullscreen/browser_fullscreen_keyboard_lock_warning.js | test_keyboard_lock_change_warning_change_oop_iframe - Test timed out

Status: RESOLVED → REOPENED
Flags: needinfo?(sfarre)
Resolution: FIXED → ---
Target Milestone: 152 Branch → ---

Try run for mochitest-browser-chrome https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=43409

Its hard to tell if this is an intermittent failure or not, but given that it (seems) to only fail on windows 11 32 bit, then it's a bit suspect.

Flags: needinfo?(sfarre)
Blocks: 2037849

Comment on attachment 9572426 [details]
Bug 2033397 - Add brower fullscreen warning test;

Revision D295810 was moved to bug 2037849. Setting attachment 9572426 [details] to obsolete.

Attachment #9572426 - Attachment is obsolete: true
Attachment #9583603 - Attachment is obsolete: true
Attachment #9583603 - Flags: approval-mozilla-beta?

This is reopened due the test patch got backed out.
We move the test patch into another bug to land (bug 2037849).
So I think we can close this one.

Status: REOPENED → RESOLVED
Closed: 2 months ago1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Attachment #9583602 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: