Skip to content

Commit 66bf625

Browse files
committed
[css-scroll-anchoring-1] Move and expand section on anchor node invalidation
This commit moves the existing paragraph about anchor node invalidation into a subsection, and adds precise conditions upon when an anchor node is considered invalidated.
1 parent 3f7adf1 commit 66bf625

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

css-scroll-anchoring-1/Overview.bs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ In some cases, a scrolling box may not select any anchor node.
114114
content to shift without triggering any scroll anchoring adjustment.
115115
</div>
116116

117-
Conceptually, a new anchor node is computed for every scrolling box
118-
whenever the scroll position of any scrolling box changes.
119-
(As a performance optimization,
120-
the implementation may wait until the anchor node is needed before computing it.)
121-
122117
<div algorithm>
123118
A DOM node |N| is an <dfn>excluded subtree</dfn>
124119
if it is an element and any of the following conditions holds:
@@ -152,6 +147,18 @@ the implementation may wait until the anchor node is needed before computing it.
152147
or the bounding rect of its <a>line boxes</a> if |N| is a text node.
153148
</div>
154149

150+
<h4 id='anchor-node-invalidation'>
151+
Invalidation</h3>
152+
153+
An anchor node is considered valid for a <a>scrolling box</a> until any of the following occur:
154+
* The scroll position of the <a>scrolling box</a> changes (excluding adjustments originating from scroll anchoring).
155+
* A <a>suppression trigger</a> is encountered.
156+
* The <a>anchor node</a> is removed from the DOM.
157+
158+
Once an anchor node has become invalid, the <a>anchor node selection algorithm</a> must be run again to compute the anchor node
159+
160+
As a performance optimization, implementations may wait until the <a>anchor node</a> is needed before computing it.
161+
155162
<h3 id="scroll-adjustment">
156163
Scroll Adjustment</h3>
157164

0 commit comments

Comments
 (0)