Multiple nsCocoaWindows can interfere with each others' native fullscreen requests.
Categories
(Core :: Widget: Cocoa, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: bradwerth, Assigned: bradwerth)
References
Details
Attachments
(1 file)
Native fullscreen transitions within a single nsCocoaWindow are serialized via the QueueTransition
and ProcessTransitions
methods. But when there are multiple windows, there is no coordination between them and it is possible for one window to request fullscreen while a native fullscreen transition is still being processed for another window. In such a case the fullscreen request will fail and the windowDidFailToEnterFullscreen
delegate method will be called.
This calling pattern is almost impossible for a user to encounter normally -- it's hard to trigger a fullscreen transition in one window, then switch to another window and trigger another transition before the first is complete. However, this is easily encountered by the test harness and it is possible in theory that complicated web content could encounter this issue.
Assignee | ||
Comment 1•1 year ago
|
||
We can fix this by adding some global state to nsCocoaWindow
and running our own event loop when we need to wait for a native fullscreen transition to complete. I'll build a patch that does that.
Assignee | ||
Comment 2•1 year ago
|
||
This added code is only run for programmatic fullscreen transitions. It
has no knowledge of user-initiated actions. This means that if a user is
manually toggling fullscreen while programmatic actions are being
proceessed, it's still possible for a fullscreen transition to fail.
Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/09ef52ec2299 Part 1: Make nsCocoaWindow run its own event loop when any window is in a native fullscreen transition. r=mstange
Comment 4•1 year ago
|
||
Backed out for causing bc failures in browser/base/content/test/fullscreen/browser_fullscreen_from_minimize.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/954d7d588e595404fbe8f79a002de1a32f4175fc
Assignee | ||
Comment 5•1 year ago
|
||
Looks like the test browser_fullscreen_from_minimize.js
is failing because transitioning to fullscreen sends the fullscreenchange
event early, which causes the test to close the window. The patch's new code in DestroyNativeWindow
clears the pending transitions so the miniaturize transition is never executed. I'll figure out a fix.
Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/27e0676b9c09 Part 1: Make nsCocoaWindow run its own event loop when any window is in a native fullscreen transition. r=mstange
Comment 7•1 year ago
|
||
bugherder |
Description
•