Skip to content

Commit

Permalink
Various minor fixes to "apply the history step"
Browse files Browse the repository at this point in the history
* Remove the unused  fireNavigateEventOnCommit argument. Closes #9800.

* Fix "apply the reload history step"'s declaration to match its call site.

* Add the missing anchor for descendant navigable traversal navigate events.

* Make the linking text clearer for a note that referenced a specific part of the "apply the history step" algorithm.
  • Loading branch information
domenic committed Oct 17, 2023
1 parent 4277faa commit ce23076
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -95750,8 +95750,8 @@ interface <dfn interface>BeforeUnloadEvent</dfn> : <span>Event</span> {
data-x="session-history-traversal-parallel-queue-sync-nav-steps">Synchronous navigation
steps</span> are tagged in the <span
data-x="session-history-traversal-parallel-queue-algorithm-set">algorithm set</span> to allow
them to conditionally "jump the queue". This is handled within <a
href="#sync-navigations-jump-queue">apply the history step</a>.</p>
them to conditionally "jump the queue". This is handled <a
href="#sync-navigations-jump-queue">within apply the history step</a>.</p>

<div class="example" id="example-sync-navigation-steps-queue-jumping-basic">
<p>Imagine the joint session history depicted by this <span>Jake diagram</span>:</p>
Expand Down Expand Up @@ -99323,34 +99323,31 @@ location.href = '#foo';</code></pre>
data-x="tn-current-session-history-step">current session history step</span>.</p></li>

<li><p>Return the result of <span data-x="apply the history step">applying the history
step</span> <var>step</var> to <var>traversable</var> given false, false, null, null, and
null.</p></li>
step</span> <var>step</var> to <var>traversable</var> given false, null, null, and null.</p></li>
</ol>

<p>To <dfn>apply the push/replace history step</dfn> given a non-negative integer <var>step</var>
to a <span>traversable navigable</span> <var>traversable</var>:</p>

<ol>
<li><p>Return the result of <span data-x="apply the history step">applying the history
step</span> <var>step</var> to <var>traversable</var> given false, false, null, null, and
null.</p></li>
step</span> <var>step</var> to <var>traversable</var> given false, null, null, and null.</p></li>
</ol>

<p class="note"><span>Apply the push/replace history step</span> never passes <span>source
snapshot params</span> or an initiator <span>navigable</span> to <span>apply the history
step</span>. This is because those checks are done earlier in the <span
data-x="navigate">navigation</span> algorithm.</p>

<p>To <dfn>apply the reload history step</dfn> given a non-negative integer <var>step</var> to a
<span>traversable navigable</span> <var>traversable</var>:</p>
<p>To <dfn>apply the reload history step</dfn> to a <span>traversable navigable</span>
<var>traversable</var>:</p>

<ol>
<li><p>Let <var>step</var> be <var>traversable</var>'s <span
data-x="tn-current-session-history-step">current session history step</span>.</p></li>

<li><p>Return the result of <span data-x="apply the history step">applying the history
step</span> <var>step</var> to <var>traversable</var> given true, false, null, null, and
null.</p></li>
step</span> <var>step</var> to <var>traversable</var> given true, null, null, and null.</p></li>
</ol>

<p class="note"><span>Apply the reload history step</span> never passes <span>source snapshot
Expand All @@ -99365,7 +99362,7 @@ location.href = '#foo';</code></pre>

<ol>
<li><p>Return the result of <span data-x="apply the history step">applying the history
step</span> <var>step</var> to <var>traversable</var> given true, true,
step</span> <var>step</var> to <var>traversable</var> given true,
<var>sourceSnapshotParams</var>, <var>initiatorToCheck</var>, and
<var>userInvolvement</var>.</p></li>
</ol>
Expand All @@ -99376,13 +99373,12 @@ location.href = '#foo';</code></pre>

<p id="update-the-session-history-with-the-new-page">To <dfn>apply the history step</dfn> given a
non-negative integer <var>step</var> to a <span>traversable navigable</span>
<var>traversable</var>, with booleans <var>checkForCancelation</var> and
<var>fireNavigateEventOnCommit</var>, <span>source snapshot params</span>-or-null
<var>sourceSnapshotParams</var>, <span>navigable</span>-or-null <var>initiatorToCheck</var>, and
<span>user navigation involvement</span>-or-null <var>userInvolvementForNavigateEvents</var>,
perform the following steps. They return "<code data-x="">initiator-disallowed</code>", "<code
data-x="">canceled-by-beforeunload</code>", "<code data-x="">canceled-by-navigate</code>", or
"<code data-x="">applied</code>".</p>
<var>traversable</var>, with boolean <var>checkForCancelation</var>, <span>source snapshot
params</span>-or-null <var>sourceSnapshotParams</var>, <span>navigable</span>-or-null
<var>initiatorToCheck</var>, and <span>user navigation involvement</span>-or-null
<var>userInvolvementForNavigateEvents</var>, perform the following steps. They return "<code
data-x="">initiator-disallowed</code>", "<code data-x="">canceled-by-beforeunload</code>", "<code
data-x="">canceled-by-navigate</code>", or "<code data-x="">applied</code>".</p>

<ol>
<li><p><span>Assert</span>: This is running within <var>traversable</var>'s <span
Expand Down Expand Up @@ -99766,13 +99762,13 @@ location.href = '#foo';</code></pre>
</ol>
</li>

<li><p>If <var>navigable</var> is not <var>traversable</var>, and <var>targetEntry</var> is
not <var>navigable</var>'s <span data-x="nav-current-history-entry">current session history
entry</span>, and <var>targetEntry</var>'s <span data-x="she-document-state">document
state</span>'s <span data-x="document-state-origin">origin</span> is the <span data-x="same
origin">same</span> as <var>navigable</var>'s <span
data-x="nav-current-history-entry">current session history entry</span>'s <span
data-x="she-document-state">document state</span>'s <span
<li id="descendant-navigable-traversal-navigate-events"><p>If <var>navigable</var> is not
<var>traversable</var>, and <var>targetEntry</var> is not <var>navigable</var>'s <span
data-x="nav-current-history-entry">current session history entry</span>, and
<var>targetEntry</var>'s <span data-x="she-document-state">document state</span>'s <span
data-x="document-state-origin">origin</span> is the <span data-x="same origin">same</span> as
<var>navigable</var>'s <span data-x="nav-current-history-entry">current session history
entry</span>'s <span data-x="she-document-state">document state</span>'s <span
data-x="document-state-origin">origin</span>, then <span>fire a traverse <code
data-x="event-navigate">navigate</code> event</span> given <var>targetEntry</var> and
<var>userInvolvementForNavigateEvents</var>.</p></li>
Expand Down

0 comments on commit ce23076

Please sign in to comment.