You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-position-4/Overview.bs
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -316,7 +316,7 @@ Top Layer Manipulation {#top-manip}
316
316
317
317
<div algorithm>
318
318
To <dfn export lt="request an element to be removed from the top layer | request removal from the top layer">request an element to be removed from the top layer</dfn>,
319
-
given an {{Element}} |el|:
319
+
given an {{Element}} |el| and a list of steps |afterRemoval|:
320
320
321
321
1. Let |doc| be |el|'s [=Node/node document=].
322
322
@@ -327,12 +327,12 @@ Top Layer Manipulation {#top-manip}
327
327
328
328
3. Remove the UA !important ''overlay: auto'' rule targeting |el|.
329
329
330
-
4. [=set/Append=] |el| to |doc|'s [=pending top layer removals=].
330
+
4. [=set/Append=](|el|, |afterRemoval|) to |doc|'s [=pending top layer removals=].
331
331
</div>
332
332
333
333
<div algorithm>
334
334
To <dfn export lt="remove an element from the top layer immediately | remove from the top layer immediately">remove an element from the top layer immediately</dfn>,
335
-
given an {{Element}} |el|:
335
+
given an {{Element}} |el| and a list of steps |afterRemoval|:
336
336
337
337
1. Let |doc| be |el|'s [=Node/node document=].
338
338
@@ -341,6 +341,8 @@ Top Layer Manipulation {#top-manip}
341
341
3. Remove the UA !important ''overlay: auto'' rule targeting |el|,
342
342
if it exists.
343
343
344
+
4. Run |afterRemoval|.
345
+
344
346
Note: This algorithm is only intended to be used in special cases
345
347
where removing something from the top layer immediately
346
348
(bypassing things like an 'overlay' transition)
@@ -353,10 +355,13 @@ Top Layer Manipulation {#top-manip}
353
355
To <dfn export>process top layer removals</dfn>,
354
356
given a {{Document}} |doc|:
355
357
356
-
1. For each element |el| in |doc|'s [=pending top layer removals=]:
357
-
if |el|'s computed value of 'overlay' is ''none'',
358
-
or |el| is [=not rendered=],
359
-
[=remove from the top layer immediately=] |el|.
358
+
1. For each (element |el| and steps |afterRemoval|) in |doc|'s
359
+
[=pending top layer removals=]: if |el|'s computed value of
360
+
'overlay' is ''none'', or |el| is [=not rendered=]:
361
+
362
+
1. [=remove from the top layer immediately=] |el|.
363
+
364
+
2. Run |afterRemoval|.
360
365
361
366
Note: This is intended to be called during the "Update the Rendering" step
0 commit comments