@@ -93037,10 +93037,8 @@ location.href = '#foo';</code></pre>
93037
93037
<ol>
93038
93038
<li>
93039
93039
<p>If <var>entry</var>'s <span data-x="she-scroll-restoration-mode">scroll restoration
93040
- mode</span> is "<code data-x="dom-ScrollRestoration-auto">auto</code>", then the user agent may
93041
- use <var>entry</var>'s <span data-x="she-scroll-position">scroll position data</span> to restore
93042
- the scroll positions of <var>entry</var>'s <span data-x="she-document">document</span>'s
93043
- <span>restorable scrollable regions</span>.</p>
93040
+ mode</span> is "<code data-x="dom-ScrollRestoration-auto">auto</code>", then <span>restore
93041
+ scroll position data</span> given <var>entry</var>.</p>
93044
93042
93045
93043
<p class="note">The user agent not restoring scroll positions does not imply that scroll
93046
93044
positions will be left at any particular value (e.g., (0,0)). The actual scroll position depends
@@ -93071,14 +93069,45 @@ location.href = '#foo';</code></pre>
93071
93069
93072
93070
<hr>
93073
93071
93074
- <p>The <dfn>restorable scrollable regions</dfn> of a <code>Document</code> <var>document</var> are
93075
- <var>document</var>'s <span>viewport</span>, and all of <var>document</var>'s scrollable regions
93076
- excepting any <span data-x="navigable container">navigable containers</span>.</p>
93072
+ <p>Each <code>Document</code> has a boolean <dfn>has been scrolled by the user</dfn>, initially
93073
+ false. If the user scrolls the document, the user agent must set that document's <span>has been
93074
+ scrolled by the user</span> to true.</p>
93075
+
93076
+ <p>The <dfn>restorable scrollable regions</dfn> of a <code>Document</code> <var>document</var>
93077
+ are <var>document</var>'s <span>viewport</span>, and all of <var>document</var>'s scrollable
93078
+ regions excepting any <span data-x="navigable container">navigable containers</span>.</p>
93077
93079
93078
93080
<p class="note"><span>Child navigable</span> scroll restoration is handled as part of state
93079
93081
restoration for the <span>session history entry</span> for those <span
93080
93082
data-x="navigable">navigables</span>' <code>Document</code>s.</p>
93081
93083
93084
+ <p>To <dfn>restore scroll position data</dfn> given a <span>session history entry</span>
93085
+ <var>entry</var>:</p>
93086
+
93087
+ <ol>
93088
+ <li><p>Let <var>document</var> be <var>entry</var>'s <span
93089
+ data-x="she-document">document</span>.</p></li>
93090
+
93091
+ <li><p>If <var>document</var>'s <span>has been scrolled by the user</span> is true, then the
93092
+ user agent should return.</p></li>
93093
+
93094
+ <li>
93095
+ <p>The user agent should attempt to use <var>entry</var>'s <span
93096
+ data-x="she-scroll-position">scroll position data</span> to restore the scroll positions of
93097
+ <var>entry</var>'s <span data-x="she-document">document</span>'s <span>restorable scrollable
93098
+ regions</span>. The user agent may continue to attempt to do so periodically, until
93099
+ <var>document</var>'s <span>has been scrolled by the user</span> becomes true.</p>
93100
+
93101
+ <p class="note">This is formulated as an <em>attempt</em>, which is potentially repeated until
93102
+ success or until the user scrolls, due to the fact that relevant content indicated by the <span
93103
+ data-x="she-scroll-position">scroll position data</span> might take some time to load from the
93104
+ network.</p>
93105
+
93106
+ <p class="note">Scroll restoration might be affected by scroll anchoring. <ref
93107
+ spec=CSSSCROLLANCHORING></p>
93108
+ </li>
93109
+ </ol>
93110
+
93082
93111
93083
93112
<h3 split-filename="document-lifecycle">Document lifecycle</h3>
93084
93113
@@ -93961,6 +93990,8 @@ new PaymentRequest(…); // Allowed to use
93961
93990
<span data-x="map get the keys">getting the keys</span> for the
93962
93991
<span>map of active timers</span>.</p></li>
93963
93992
93993
+ <li><p>Set <var>oldDocument</var>'s <span>has been scrolled by the user</span> to false.</p></li>
93994
+
93964
93995
<li><p>Run any <span>unloading document cleanup steps</span> for <var>oldDocument</var> that are
93965
93996
defined by this specification and <span>other applicable specifications</span>.</p></li>
93966
93997
@@ -130908,15 +130939,15 @@ INSERT INTERFACES HERE
130908
130939
<dt id="refsCSSSIZING">[CSSSIZING]</dt>
130909
130940
<dd><cite><a href="https://drafts.csswg.org/css-sizing/">CSS Intrinsic & Extrinsic Sizing Module</a></cite>, T. Atkins, E. Etemad. W3C.</dd>
130910
130941
130911
- <dt id="refsCSSTRANSITIONS">[CSSTRANSITIONS]</dt>
130912
- <dd>(Non-normative) <cite><a href="https://drafts.csswg.org/css-transitions/">CSS Transitions</a></cite>, D. Jackson, D. Hyatt, C. Marrin, L. Baron. W3C.</dd>
130913
-
130914
- <dt id="refsCSSUI">[CSSUI]</dt>
130915
- <dd><cite><a href="https://drafts.csswg.org/css-ui/">CSS3 Basic User Interface Module</a></cite>, T. Çelik. W3C.</dd>
130942
+ <dt id="refsCSSSCROLLANCHORING">[CSSSCROLLANCHORING]</dt>
130943
+ <dd>(Non-normative) <cite><a href="https://drafts.csswg.org/css-scroll-anchoring/">CSS Scroll Anchoring</a></cite>, T. Atkins-Bittner. W3C.</dd>
130916
130944
130917
130945
<dt id="refsCSSSYNTAX">[CSSSYNTAX]</dt>
130918
130946
<dd><cite><a href="https://drafts.csswg.org/css-syntax/">CSS Syntax</a></cite>, T. Atkins, S. Sapin. W3C.</dd>
130919
130947
130948
+ <dt id="refsCSSTRANSITIONS">[CSSTRANSITIONS]</dt>
130949
+ <dd>(Non-normative) <cite><a href="https://drafts.csswg.org/css-transitions/">CSS Transitions</a></cite>, L. Baron, D. Jackson, B. Birtles. W3C.</dd>
130950
+
130920
130951
<dt id="refsCSSTABLE">[CSSTABLE]</dt>
130921
130952
<dd><cite><a href="https://drafts.csswg.org/css-tables/">CSS Table</a></cite>, F. Remy, G. Whitworth. W3C.</dd>
130922
130953
@@ -130926,6 +130957,9 @@ INSERT INTERFACES HERE
130926
130957
<dt id="refsCSSVALUES">[CSSVALUES]</dt>
130927
130958
<dd><cite><a href="https://drafts.csswg.org/css-values/">CSS3 Values and Units</a></cite>, H. Lie, T. Atkins, E. Etemad. W3C.</dd>
130928
130959
130960
+ <dt id="refsCSSUI">[CSSUI]</dt>
130961
+ <dd><cite><a href="https://drafts.csswg.org/css-ui/">CSS3 Basic User Interface Module</a></cite>, F. Rivoal. W3C.</dd>
130962
+
130929
130963
<dt id="refsCSSWM">[CSSWM]</dt>
130930
130964
<dd><cite><a href="https://drafts.csswg.org/css-writing-modes/">CSS Writing Modes</a></cite>, E. Etemad, K. Ishii. W3C.</dd>
130931
130965
0 commit comments