This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26626 - Populate the full list of event targets before firing any events
Summary: Populate the full list of event targets before firing any events
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Fullscreen (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-21 09:01 UTC by Philip Jägenstedt
Modified: 2014-08-26 12:59 UTC (History)
2 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2014-08-21 09:01:11 UTC
http://fullscreen.spec.whatwg.org/#dom-document-exitfullscreen

9.6. If exitDocs's last document has a browsing context container, let topDoc be that browsing context container's node document, and then remove the top element from topDoc's fullscreen element stack and fire an event named fullscreenchange on topDoc.

The event handlers already fired in these steps can have moved the iframe element of exitDocs's last document, so that the fullscreenchange event ends up firing on a document other than the document that the iframe went fullscreen in.

It looks like moving part of step 9.6 to 9.3 and letting step 9.5 fire all of the events should fix this.

It would also be nice if step 9.4 were also more explicit about first creating a list of documents and then firing events.

For requestFullscreen(), bug 26601 should solve the problem.
Comment 1 Philip Jägenstedt 2014-08-21 09:22:07 UTC
(In reply to Philip Jägenstedt from comment #0)
> It would also be nice if step 9.4 were also more explicit about first
> creating a list of documents and then firing events.

This bit looks like it shouldn't matter much because event handlers can't synchronously modify the fullscreen element stack, but they can change the tree order of the documents.

(Test cases for this will be fun.)