Skip to content

Commit e62a7be

Browse files
authored
Make fragment loop not depend on spin the event loop
1 parent 1d9995a commit e62a7be

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

source

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83699,8 +83699,9 @@ new PaymentRequest(…); // Allowed to use
8369983699

8370083700
<p>Some of the sections below, to which the above algorithm defers in certain cases, require the
8370183701
user agent to <dfn>update the session history with the new page</dfn>. When a user agent is
83702-
required to do this, it must <span>queue a task</span> (associated with the <code>Document</code>
83703-
object of the <span>current entry</span>, not the new one) to run the following steps:</p>
83702+
required to do this, it must <span>queue a task</span> on the <span>networking task source</span>,
83703+
associated with the <code>Document</code> object of the <span>current entry</span> (not the new
83704+
one), to run the following steps:</p>
8370483705

8370583706
<ol>
8370683707

@@ -83791,24 +83792,32 @@ new PaymentRequest(&hellip;); // Allowed to use
8379183792
<li><p>The <span data-x="navigate">navigation algorithm</span> has now <dfn
8379283793
data-x="concept-navigate-mature">matured</dfn>.</p></li>
8379383794

83794-
<li><p><i>Fragment loop</i>: <span>Spin the event loop</span> for a user-agent-defined amount of
83795-
time, as desired by the user agent implementer. (This is intended to allow the user agent to
83796-
optimize the user experience in the face of performance concerns.)</p></li>
83795+
<li><p><span>Try to scroll to the fragment</span> for the <code>Document</code>.</p></li>
83796+
</ol>
8379783797

83798-
<li><p>If the <code>Document</code> object has no parser, or its parser has <span data-x="stop
83799-
parsing">stopped parsing</span>, or the user agent has reason to believe the user is no longer
83800-
interested in scrolling to the <span data-x="concept-url-fragment">fragment</span>, then
83801-
return.</p></li>
83798+
<p>To <dfn>try to scroll to the fragment</dfn> for a <code>Document</code> <var>document</var>,
83799+
perform the following steps <span>in parallel</span>:</p>
8380283800

83803-
<li><p><span>Scroll to the fragment</span> given in the document's <span
83804-
data-x="concept-document-url">URL</span>. If this fails to find <span data-x="the indicated part
83805-
of the document">an indicated part of the document</span>, then return to the <i>fragment
83806-
loop</i> step.</p></li>
83801+
<ol>
83802+
<li><p>Wait for an implementation-defined amount of time. (This is intended to allow the user
83803+
agent to optimize the user experience in the face of performance concerns.)</p></li>
8380783804

83808-
</ol>
83805+
<li>
83806+
<p><span>Queue a task</span> on the <span>networking task source</span> to run these steps:</p>
8380983807

83810-
<p>The <span>task source</span> for this <span data-x="concept-task">task</span> is the
83811-
<span>networking task source</span>.</p>
83808+
<ol>
83809+
<li><p>If <var>document</var> has no parser, or its parser has <span data-x="stop
83810+
parsing">stopped parsing</span>, or the user agent has reason to believe the user is no longer
83811+
interested in scrolling to the <span data-x="concept-url-fragment">fragment</span>, then abort
83812+
these steps.</p></li>
83813+
83814+
<li><p><span>Scroll to the fragment</span> given in <var>document</var>'s <span
83815+
data-x="concept-document-url">URL</span>. If this does not find <span data-x="the indicated
83816+
part of the document">an indicated part of the document</span>, then <span>try to scroll to the
83817+
fragment</span> for <var>document</var>.</p></li>
83818+
</ol>
83819+
</li>
83820+
</ol>
8381283821

8381383822

8381483823
<h4 id="read-html"><dfn data-x="navigate-html">Page load processing model for HTML files</dfn></h4>

0 commit comments

Comments
 (0)