Skip to content

Commit bff8cc6

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

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
@@ -579,7 +579,7 @@ Top Layer Manipulation {#top-manip}
579579

580580
<div algorithm>
581581
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>,
582-
given an {{Element}} |el|:
582+
given an {{Element}} |el| and a list of steps |afterRemoval|:
583583

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

@@ -590,12 +590,12 @@ Top Layer Manipulation {#top-manip}
590590

591591
3. Remove the UA !important ''overlay: auto'' rule targeting |el|.
592592

593-
4. [=set/Append=] |el| to |doc|'s [=pending top layer removals=].
593+
4. [=set/Append=] (|el|, |afterRemoval|) to |doc|'s [=pending top layer removals=].
594594
</div>
595595

596596
<div algorithm>
597597
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>,
598-
given an {{Element}} |el|:
598+
given an {{Element}} |el| and a list of steps |afterRemoval|:
599599

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

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

607+
4. Run |afterRemoval|.
608+
607609
Note: This algorithm is only intended to be used in special cases
608610
where removing something from the top layer immediately
609611
(bypassing things like an 'overlay' transition)
@@ -616,10 +618,13 @@ Top Layer Manipulation {#top-manip}
616618
To <dfn export>process top layer removals</dfn>,
617619
given a {{Document}} |doc|:
618620

619-
1. For each element |el| in |doc|'s [=pending top layer removals=]:
620-
if |el|&apos;s computed value of 'overlay' is ''none'',
621-
or |el| is [=not rendered=],
622-
[=remove from the top layer immediately=] |el|.
621+
1. For each (element |el| and steps |afterRemoval|) in |doc|'s
622+
[=pending top layer removals=]: if |el|&apos;s computed value of
623+
'overlay' is ''none'', or |el| is [=not rendered=]:
624+
625+
1. [=remove from the top layer immediately=] |el|.
626+
627+
2. Run |afterRemoval|.
623628

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

0 commit comments

Comments
 (0)