Skip to content

Commit 1360f4c

Browse files
authored
[css-conditional-5] Link scroll-state snapshotting to cssom-view #10796 (#11056)
* [css-conditional-5] Link scroll-state snapshotting to cssom-view #10796 scroll-state() snapshotting should happen as part of "run snapshot post- layout state steps". * Typo * should -> must --------- Co-authored-by: Rune Lillesveen <futhark@google.com>
1 parent 71b3614 commit 1360f4c

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

css-conditional-5/Overview.bs

+8-11
Original file line numberDiff line numberDiff line change
@@ -1109,20 +1109,17 @@ Scroll State Container Features</h3>
11091109
<h4 id="updating-scroll-state">
11101110
Updating Scroll State</h4>
11111111

1112-
Issue(10796): This section is subject to change as a result of resolving
1113-
the issue of unifying scroll-snapshotting layout state across several specifications.
1114-
11151112
Scroll state may cause layout cycles since queried scroll state may cause style changes,
1116-
which may lead to scroll state changes as a result of layout. The same issue exists for
1117-
[=scroll progress timelines=], and scroll state is handled in a similar manner.
1113+
which may lead to scroll state changes as a result of layout.
11181114

11191115
To avoid such layout cycles, ''scroll-state'' [=query containers=] update their
1120-
current state once as the last step of [=run the scroll steps=]. Then, after the
1121-
resizeObserver loop in the
1122-
<a href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model">HTML event loop processing model</a>,
1123-
update the current state of every ''scroll-state'' [=query container=].
1124-
If that state has changed since the scroll state update in [=run the scroll steps=],
1125-
re-run the style and layout update a single time if necessary.
1116+
current state as part of [=run snapshot post-layout state steps=] which is only
1117+
run at specific points in the
1118+
<a href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model">HTML event loop processing model</a>.
1119+
1120+
When asked to [=run snapshot post-layout state steps=], update the current state
1121+
of every ''scroll-state'' [=query container=]. This snapshotted state will be used
1122+
for any style and layout updates until the next time these steps are run.
11261123

11271124
<h4 id="stuck">
11281125
Sticky positioning: the '@container/stuck' feature</h4>

cssom-view-1/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ When asked to <dfn export>run snapshot post-layout state steps</dfn> for a {{Doc
20242024

20252025
1. For each CSS feature that needs to snapshot post-layout state, take a snapshot of the relevant state in <var>doc</var>.
20262026

2027-
The state that is snapshot is defined in other specifications. These steps must not invalidate <var>doc</var> or any other {{Document}}s in such a way that other post-layout snapshotting steps can observe that such snapshotting happened. It follows that the order of which such snapshotting takes place should not matter.
2027+
The state that is snapshot is defined in other specifications. These steps must not invalidate <var>doc</var> or any other {{Document}}s in such a way that other post-layout snapshotting steps can observe that such snapshotting happened. It follows that the order of which such snapshotting takes place must not matter.
20282028

20292029

20302030
Security and Privacy Considerations {#priv-sec}

0 commit comments

Comments
 (0)