Skip to content

Commit a95da45

Browse files
committed
[css-position-4] Add "afterRemoval" steps to top layer removal algorithms
1 parent 755ed0e commit a95da45

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

css-position-4/Overview.bs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Top Layer Manipulation {#top-manip}
316316

317317
<div algorithm>
318318
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 an optional ist of steps |afterRemoval|:
320320

321321
1. Let |doc| be |el|'s [=Node/node document=].
322322

@@ -327,12 +327,12 @@ Top Layer Manipulation {#top-manip}
327327

328328
3. Remove the UA !important ''overlay: auto'' rule targeting |el|.
329329

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=].
331331
</div>
332332

333333
<div algorithm>
334334
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 an optional list of steps |afterRemoval|:
336336

337337
1. Let |doc| be |el|'s [=Node/node document=].
338338

@@ -341,6 +341,8 @@ Top Layer Manipulation {#top-manip}
341341
3. Remove the UA !important ''overlay: auto'' rule targeting |el|,
342342
if it exists.
343343

344+
4. Run |afterRemoval|.
345+
344346
Note: This algorithm is only intended to be used in special cases
345347
where removing something from the top layer immediately
346348
(bypassing things like an 'overlay' transition)
@@ -353,10 +355,13 @@ Top Layer Manipulation {#top-manip}
353355
To <dfn export>process top layer removals</dfn>,
354356
given a {{Document}} |doc|:
355357

356-
1. For each element |el| in |doc|'s [=pending top layer removals=]:
357-
if |el|&apos;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|&apos;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|.
360365

361366
Note: This is intended to be called during the "Update the Rendering" step
362367
of HTML's rendering algorithm.

0 commit comments

Comments
 (0)