@@ -24,6 +24,8 @@ Boilerplate: omit feedback-header, omit conformance, omit index, omit idl-index
24
24
spec:dom
25
25
type:dfn; for:/; text:element
26
26
type:interface; text:Document
27
+ spec:infra
28
+ type:dfn; for:set; text:for each
27
29
</pre>
28
30
29
31
<pre class=anchors>
@@ -74,8 +76,8 @@ stated otherwise it is unset.
74
76
and <a for="top layer">add</a> it to its <a>node document</a> 's <a>top layer</a> .
75
77
76
78
<p> To <dfn>unfullscreen an <var>element</var></dfn> , unset <var> element</var> 's
77
- <a>fullscreen flag</a> and <a>iframe fullscreen flag</a> (if any), and <a for="top layer" >remove</a>
78
- it from its <a>node document</a> 's <a>top layer</a> .
79
+ <a>fullscreen flag</a> and <a>iframe fullscreen flag</a> (if any), and <a for=set >remove</a> it from
80
+ its <a>node document</a> 's <a>top layer</a> .
79
81
80
82
<p> To <dfn>unfullscreen a <var>document</var></dfn> ,
81
83
<a lt="unfullscreen an element">unfullscreen</a> all <a>elements</a> , within <var> document</var> 's
@@ -102,7 +104,7 @@ it from its <a>node document</a>'s <a>top layer</a>.
102
104
that have their <a>fullscreen flag</a> set, in <a>shadow-including tree order</a> .
103
105
104
106
<li>
105
- <p> For each <var> node</var> in <var> nodes</var> , run these substeps:
107
+ <p> <a> For each</a> <var> node</var> in <var> nodes</var> , run these substeps:
106
108
107
109
<ol>
108
110
<li><p> If <var> node</var> is its <a>node document</a> 's <a>fullscreen element</a> ,
@@ -229,18 +231,18 @@ these steps:
229
231
<code> TypeError</code> exception, and terminate these steps.
230
232
<!-- cross-process; check is only needed on pending as it is recursive already -->
231
233
232
- <li><p> Let <var> fullscreenElements</var> be an ordered set initially consisting of
234
+ <li><p> Let <var> fullscreenElements</var> be an <a> ordered set</a> initially consisting of
233
235
<var> pending</var> .
234
236
235
237
<li><p> While the first element in <var> fullscreenElements</var> is in a
236
- <a>nested browsing context</a> , prepend its <a>browsing context container</a> to
238
+ <a>nested browsing context</a> , <a for=set> prepend</a> its <a>browsing context container</a> to
237
239
<var> fullscreenElements</var> .
238
240
<!-- cross-process -->
239
241
240
- <li><p> Let <var> eventDocs</var> be an empty list .
242
+ <li><p> Let <var> eventDocs</var> be a new <a>ordered set</a> .
241
243
242
244
<li>
243
- <p> For each <var> element</var> in <var> fullscreenElements</var> , in order , run these
245
+ <p> <a> For each</a> <var> element</var> in <var> fullscreenElements</var> , run these
244
246
subsubsteps:
245
247
246
248
<ol>
@@ -252,16 +254,16 @@ these steps:
252
254
253
255
<p class=note> No need to notify observers when nothing has changed.
254
256
255
- <li><p> Otherwise, append <var> doc</var> to <var> eventDocs</var> .
257
+ <li><p> Otherwise, <a for=set> append</a> <var> doc</var> to <var> eventDocs</var> .
256
258
257
259
<li><p> If <var> element</var> is <var> pending</var> and <var> pending</var> is an <{iframe}>
258
260
<a>element</a> , then set <var> element</var> 's <a>iframe fullscreen flag</a> .
259
261
260
262
<li><p> <a lt="Fullscreen an element">Fullscreen <var>element</var></a> within <var> doc</var> .
261
263
</ol>
262
264
263
- <li><p> For each <var> doc</var> in <var> eventDocs</var> , in order, <a>fire an event</a> named
264
- <code> fullscreenchange</code> on <var> doc</var> .
265
+ <li><p> <a> For each</a> <var> doc</var> in <var> eventDocs</var> , <a>fire an event</a>
266
+ named <code> fullscreenchange</code> on <var> doc</var> .
265
267
266
268
<li><p> Resolve <var> promise</var> with undefined.
267
269
</ol>
@@ -309,7 +311,7 @@ could be an open <{dialog}> element.
309
311
<p> To <dfn>collect documents to unfullscreen</dfn> given <var> doc</var> , run these steps:
310
312
311
313
<ol>
312
- <li><p> Let <var> docs</var> be an ordered set consisting of <var> doc</var> .
314
+ <li><p> Let <var> docs</var> be an <a> ordered set</a> consisting of <var> doc</var> .
313
315
314
316
<li>
315
317
<p> While true:
@@ -324,7 +326,7 @@ could be an open <{dialog}> element.
324
326
325
327
<li><p> If <var> container</var> 's <a>iframe fullscreen flag</a> is set, break.
326
328
327
- <li><p> Append <var> container</var> 's <a>node document</a> to <var> docs</var> .
329
+ <li><p> <a for=set> Append</a> <var> container</var> 's <a>node document</a> to <var> docs</var> .
328
330
</ol>
329
331
330
332
<li><p> Return <var> docs</var> .
@@ -374,23 +376,23 @@ could be an open <{dialog}> element.
374
376
<code> TypeError</code> exception, and terminate these steps.
375
377
<!-- cross-process -->
376
378
377
- <li><p> Let <var> descendantDocs</var> be an ordered set consisting of <var> doc</var> 's
379
+ <li><p> Let <var> descendantDocs</var> be an <a> ordered set</a> consisting of <var> doc</var> 's
378
380
<a>descendant browsing contexts</a> ' <a>active documents</a> whose <a>fullscreen element</a> is
379
381
non-null, if any, in <em> reverse</em> <a>tree order</a> .
380
382
<!-- cross-process -->
381
383
382
- <li><p> For each <var> descendantDoc</var> in <var> descendantDocs</var> , in order ,
384
+ <li><p> <a> For each</a> <var> descendantDoc</var> in <var> descendantDocs</var> ,
383
385
<a lt="unfullscreen a document">unfullscreen <var>descendantDoc</var></a> .
384
386
<!-- cross-process -->
385
387
386
- <li><p> For each <var> exitDoc</var> in <var> exitDocs</var> , in order ,
388
+ <li><p> <a> For each</a> <var> exitDoc</var> in <var> exitDocs</var> ,
387
389
<a lt="unfullscreen an element">unfullscreen</a> <var> exitDoc</var> 's <a>fullscreen element</a> .
388
390
389
- <li><p> For each <var> descendantDoc</var> in <var> descendantDocs</var> , in order ,
391
+ <li><p> <a> For each</a> <var> descendantDoc</var> in <var> descendantDocs</var> ,
390
392
<a>fire an event</a> named <code> fullscreenchange</code> on <var> descendantDoc</var> .
391
393
<!-- cross-process -->
392
394
393
- <li><p> For each <var> exitDoc</var> in <var> exitDocs</var> , in order , <a>fire an event</a> named
395
+ <li><p> <a> For each</a> <var> exitDoc</var> in <var> exitDocs</var> , <a>fire an event</a> named
394
396
<code> fullscreenchange</code> on <var> exitDoc</var> .
395
397
<!-- cross-process -->
396
398
@@ -455,8 +457,8 @@ associated viewport and therefore also one <a>top layer</a>. [[!CSS]]
455
457
<p class=note> The terminology used in this and following subsection attempts to match CSS 2.1
456
458
Appendix E.
457
459
458
- <p> The <a>top layer</a> consists of an ordered set of elements, rendered in the order they have been
459
- added to the set. The last element added is rendered closest to the user .
460
+ <p> The <a>top layer</a> is an <a> ordered set</a> of elements, rendered in the order they appear in
461
+ the set. The last element in the set is rendered last, and thus appears on top .
460
462
461
463
<p class=note> The <code> z-index</code> property has no effect in the <a>top layer</a> .
462
464
@@ -496,11 +498,12 @@ following characteristics:
496
498
<code> right</code> , and <code> top</code> is zero.
497
499
</ul>
498
500
499
- <p> To <dfn export for="top layer">add</dfn> an <var> element</var> to a <var> top layer</var> , add, or
500
- move if already present, <var> element</var> on top of <var> top layer</var> .
501
+ <p> To <dfn export for="top layer">add</dfn> an <var> element</var> to a <var> top layer</var> ,
502
+ <a for=set>remove</a> it from <var> top layer</var> and then <a for=set>append</a> it to
503
+ <var> top layer</var> .
501
504
502
- <p> To <dfn export for="top layer">remove</dfn> an <var> element</var> from a <var> top layer</var> ,
503
- remove <var> element </var> from <var> top layer </var> .
505
+ <p class=note> In other words, <var> element</var> is moved to the end of <var> top layer</var> if it
506
+ is already present .
504
507
505
508
506
509
<h3 id=::backdrop-pseudo-element><code>::backdrop</code> pseudo-element</h3>
0 commit comments