Closed Bug 756334 Opened 8 years ago Closed 4 years ago

Don't dispatch fullscreenchange until after sizemode transition is complete


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

Not set





(Reporter: cpearce, Unassigned)


(Blocks 3 open bugs)


(Whiteboard: [games:p2])


(1 file)

The source of much of the orange in our pointer lock (and probably fullscreen) tests seems to be caused because we can dispatch the (moz)fullscreenchange event before the transition to fullscreen is complete.

We should only dispatch fullscreenchange once the transition is complete. I've been trying to get the spec changed (and it looks like it's going to happen).
I'm hoping this is going to fix pointer lock bugs 745047, 745009, 754451, 753323, 744909, 745056, 712225.
Let's hope so.
Blocks: gecko-games
Whiteboard: [games:p1]
(In reply to David Humphrey (:humph) from comment #1)
> I'm hoping this is going to fix pointer lock bugs 745047, 745009, 754451,
> 753323, 744909, 745056, 712225.

I added code to work around this issue in our pointer lock and fullscreen mochitests, and it indeed stopped the majority of the orange problems in those tests.
Did any necessary spec changes happen here?
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #4)
> Did any necessary spec changes happen here?

Yes. In the spec [1] for the requestFullscreen() and exitFullscreen() algorithms, the steps that dispatch "fullscreenchange" and update the fullscreen stacks are now performed by tasks that are queued after the step to "optionally perform some animation".

Arguably the spec could be more explicit that the "perform some animation" step is synchronous though.
Whiteboard: [games:p1] → [games:p2]
Are we spec compliant now?  (That is, is there anything more to do on this bug?)
This is not fixed, we still sometimes fire fullscreenchange before the transition is complete.

I've resorted to working around this bug in the mochitests by checking whether the window has reached the screen size like so:
Here's where I got to last time, this doesn't work but it might give whomever follows up here some ideas.
Requesting a status update for this ticket. Is there a plan to land a fix?

Note that Chromium also delivers the fullscreenchange event too early:

Link to the relevant spec bug
I don't have time to work on this unfortunately. Anyone else is welcome to take it.
Assignee: cpearce → nobody
This should have been fixed by bug 1161802 (actually these two seems to be duplicate)
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1161802
You need to log in before you can comment on or make changes to this bug.