W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] "fullscreenchange" event should be delayed to after transition is complete

From: Chris Pearce <cpearce@mozilla.com>
Date: Wed, 16 May 2012 12:33:15 +1200
Message-ID: <4FB2F5CB.80009@mozilla.com>
To: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Anne van Kesteren <annevk@opera.com>
Hi,

I think that the "fullscreenchange" even dispatch should be specified to 
be dispatched once the animation to transition to/from fullscreen has 
finished.

The problem is that at least two of the platforms we're supporting have 
non-instantaneous transitions from windowed to fullscreen mode. So if we 
dispatch "fullscreenchange" events as specified during 
HTMLElement.requestFullscreen() then the "fullscreenchange" events can 
arrive before the transition animation has finished, so things like 
window.screenY and window.size.* haven't reached their stable fullscreen 
values.

Our unit tests have been randomly failing because of this, so I'm sure 
this will cause problems with authors in the wild.

I think having the state changes performed by 
HTMLElement.requestFullscreen() happen synchronously before the 
animation/transition to enter fullscreen completes (as specified 
currently) and having them undone before the animation to exit 
fullscreen completes (also as specified currently in exitFullscreen()) 
is probably OK, since these state changes maybe required for the 
transition/animation. It's only the dispatch of "fullscreenchange" I 
think we should change.


Cheers,
Chris Pearce.
Received on Wednesday, 16 May 2012 00:33:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT