diff --git a/fullscreen.bs b/fullscreen.bs index 538d446..735c229 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -296,18 +296,33 @@ attribute's getter must run these steps:
Return null. +
A document is said to be a simple fullscreen document if there is exactly one +element in its top layer that has its fullscreen flag set. + +
A document with two elements in its top layer can be a +simple fullscreen document. For example, in addition to the fullscreen element there +could be an open <{dialog}> element. +
To collect documents to unfullscreen given doc, run these steps:
If doc's top layer consists of more than a single element that has - its fullscreen flag set, return the empty set. -
Let docs be an ordered set consisting of doc. -
While docs's last document has a browsing context container - whose node document's top layer consists of a single element that has its - fullscreen flag set and does not have its iframe fullscreen flag set (if any), append - that node document to docs. +
While true: + +
Let lastDoc be docs's last document. + +
If lastDoc is not a simple fullscreen document, break. + +
Let container be lastDoc's browsing context container, if + any, and otherwise break. + +
If container's iframe fullscreen flag is set, break. + +
Append container's node document to docs. +
Return docs.
If topLevelDoc is in docs, then set resize to true. +
If topLevelDoc is in docs, and it is a + simple fullscreen document, then set resize to true.
Return promise, and run the remaining steps in parallel. @@ -349,15 +365,10 @@ attribute's getter must run these steps: doc. -
If resize is true and topLevelDoc is not in exitDocs, +
If resize is true and topLevelDoc is either not in
+ exitDocs, or not a simple fullscreen document,
fully exit fullscreen topLevelDoc, reject promise with a
TypeError
exception, and terminate these steps.
-
-
If exitDocs is the empty set, append doc to exitDocs. - -
If exitDocs's last document has a - browsing context container, append that browsing context container's - node document to exitDocs.
Let descendantDocs be an ordered set consisting of doc's