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
@@ -579,7 +579,7 @@ Top Layer Manipulation {#top-manip}
579
579
580
580
<div algorithm>
581
581
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|:
583
583
584
584
1. Let |doc| be |el|'s [=Node/node document=].
585
585
@@ -590,12 +590,12 @@ Top Layer Manipulation {#top-manip}
590
590
591
591
3. Remove the UA !important ''overlay: auto'' rule targeting |el|.
592
592
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=].
594
594
</div>
595
595
596
596
<div algorithm>
597
597
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|:
599
599
600
600
1. Let |doc| be |el|'s [=Node/node document=].
601
601
@@ -604,6 +604,8 @@ Top Layer Manipulation {#top-manip}
604
604
3. Remove the UA !important ''overlay: auto'' rule targeting |el|,
605
605
if it exists.
606
606
607
+
4. Run |afterRemoval|.
608
+
607
609
Note: This algorithm is only intended to be used in special cases
608
610
where removing something from the top layer immediately
609
611
(bypassing things like an 'overlay' transition)
@@ -616,10 +618,13 @@ Top Layer Manipulation {#top-manip}
616
618
To <dfn export>process top layer removals</dfn>,
617
619
given a {{Document}} |doc|:
618
620
619
-
1. For each element |el| in |doc|'s [=pending top layer removals=]:
620
-
if |el|'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|'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|.
623
628
624
629
Note: This is intended to be called during the "Update the Rendering" step
0 commit comments