Skip to content

Commit 0a4787a

Browse files
committed
Clarify what "collect documents to unfullscreen" returns
Given that there is an "unfullscreen a document" operation, this algorithm can easily be assumed to be the set of documents for which that should be called, i.e., that all of the documents returned will exit fully. At the beginning of the animation frame task there's no guarantee that doc still has a fullscreen element, but later in "unfullscreen exitDoc's fullscreen element" it is assumed to have one. Fix this with an early return. Test: web-platform-tests/wpt#5872
1 parent c8164af commit 0a4787a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

fullscreen.bs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ could be an open <{dialog}> element.
320320
<ol>
321321
<li><p>Let <var>lastDoc</var> be <var>docs</var>'s last <a for=/>document</a>.
322322

323+
<li><p>Assert: <var>lastDoc</var>'s <a>fullscreen element</a> is not null.
324+
323325
<li><p>If <var>lastDoc</var> is not a <a>simple fullscreen document</a>, <a>break</a>.
324326

325327
<li><p>Let <var>container</var> be <var>lastDoc</var>'s <a>browsing context container</a>, if
@@ -331,6 +333,11 @@ could be an open <{dialog}> element.
331333
</ol>
332334

333335
<li><p>Return <var>docs</var>.
336+
337+
<p class=note>This is the set of documents for which the <a>fullscreen element</a> will be
338+
<a lt="unfullscreen an element">unfullscreened</a>, but the last document in <var>docs</var> might
339+
have more than one <a>element</a> in its <a>top layer</a> with the <a>fullscreen flag</a> set,
340+
in which case that document will still remain in fullscreen.
334341
</ol>
335342

336343
<p>To <dfn>exit fullscreen</dfn> a <a for=/>document</a> <var>doc</var>, run these steps:
@@ -365,6 +372,8 @@ could be an open <{dialog}> element.
365372
<p>As part of the next <a>animation frame task</a>, run these substeps:
366373

367374
<ol>
375+
<li><p>If <var>doc</var>'s <a>fullscreen element</a> is null, then resolve <var>promise</var>
376+
with undefined and terminate these steps.
368377

369378
<li><p>Let <var>exitDocs</var> be the result of
370379
<a lt="collect documents to unfullscreen">collecting documents to unfullscreen</a> given

0 commit comments

Comments
 (0)