Skip to content

Commit

Permalink
Mostly-editorial fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Sep 16, 2021
1 parent 725ca64 commit 2c7e630
Showing 1 changed file with 94 additions and 70 deletions.
164 changes: 94 additions & 70 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -84903,15 +84903,23 @@ interface <dfn interface>History</dfn> {
data-x="concept-task">task</span> consisting of running the following steps:</p>

<ol>
<li><p>If the index of the <span>current entry of the joint session history</span> plus
<var>delta</var> is less than zero or greater than or equal to the number of items in the
<span>joint session history</span>, invoke <span>WebDriver BiDi navigation failed</span>
with <var>source browsing context</var>, and a <span>WebDriver BiDi navigation status</span> whose <span
data-x="navigation-status-id">id</span> is <var>navigationId</var>, <span
data-x="navigation-status-status">status</span> is "<code
data-x="navigation-status-canceled">canceled</code>", and <span
data-x="navigation-status-url">url</span> is <var>resource</var>'s <span
data-x="concept-request-url">url</span>, then return.</p></li>
<li>
<p>If the index of the <span>current entry of the joint session history</span> plus
<var>delta</var> is less than zero or greater than or equal to the number of items in the
<span>joint session history</span>, then:</p>

<ol>
<li><p>Invoke <span>WebDriver BiDi navigation failed</span> with <var>source browsing
context</var> and a <span>WebDriver BiDi navigation status</span> whose <span
data-x="navigation-status-id">id</span> is <var>navigationId</var>, <span
data-x="navigation-status-status">status</span> is "<code
data-x="navigation-status-canceled">canceled</code>", and <span
data-x="navigation-status-url">url</span> is <var>resource</var>'s <span
data-x="concept-request-url">URL</span>.</p></li>

<li><p>Return.</p></li>
</ol>
</li>

<li><p>Let <var>specified entry</var> be the entry in the <span>joint session
history</span> whose index is the sum of <var>delta</var> and the index of the
Expand All @@ -84920,31 +84928,39 @@ interface <dfn interface>History</dfn> {
<li><p>Let <var>specified browsing context</var> be the <span>browsing context</span> of
the <var>specified entry</var>.</p></li>

<li><p>If any of the following are true:</p>
<li>
<p>If any of the following are true:</p>

<ol>
<li><p><var>Source browsing context</var> is not <span>allowed to navigate</span>
<ul>
<li><p><var>source browsing context</var> is not <span>allowed to navigate</span>
<var>specified browsing context</var>; or<p></li>

<li><p>The <var>specified browsing context</var>'s <span>active document</span>'s <span>unload
counter</span> is greater than 0.</p></li>
</ol>
<li><p><var>specified browsing context</var>'s <span>active document</span>'s <span>unload
counter</span> is greater than 0</p></li>
</ul>

<p>then:</p>

<ol>
<li><p>Invoke <span>WebDriver BiDi navigation failed</span> with <var>source browsing
context</var> and a <span>WebDriver BiDi navigation status</span> whose <span
data-x="navigation-status-id">id</span> is <var>navigationId</var>, <span
data-x="navigation-status-status">status</span> is "<code
data-x="navigation-status-canceled">canceled</code>", and <span
data-x="navigation-status-url">url</span> is <var>resource</var>'s <span
data-x="concept-request-url">URL</span>.</p></li>

<p>Then invoke <span>WebDriver BiDi navigation failed</span> with
with <var>source browsing context</var>, and a <span>WebDriver BiDi navigation status</span> whose <span
data-x="navigation-status-id">id</span> is <var>navigationId</var>, <span
data-x="navigation-status-status">status</span> is "<code
data-x="navigation-status-canceled">canceled</code>", and <span
data-x="navigation-status-url">url</span> is <var>resource</var>'s <span
data-x="concept-request-url">url</span>, and return.</p></li>
<li><p>Return.</p>
</ol>
</li>

<li>
<p><span>Queue a global task</span> on the <span>history traversal task source</span> given
<var>specified browsing context</var>'s <span>active window</span> to perform the following
steps:</p>

<ol>
<li><p>If <var>navigationId</var> is null, let <var>navigation id</var> be the result of
<li><p>If <var>navigationId</var> is null, then set <var>navigationId</var> to the result of
<span>generating a random UUID</span>. <ref spec=UUID></p></li>

<li><p>If there is an ongoing attempt to navigate <var>specified browsing context</var>
Expand All @@ -84960,13 +84976,13 @@ interface <dfn interface>History</dfn> {
<ol>
<li><p><span>Prompt to unload</span> the <span>active document</span> of the <var>specified
browsing context</var>. If the user <span>refused to allow the document to be
unloaded</span>, then invoke <span>WebDriver BiDi navigation failed</span> with
with <var>source browsing context</var>, and a <span>WebDriver BiDi navigation status</span>
whose <span data-x="navigation-status-id">id</span> is <var>navigationId</var>, <span
unloaded</span>, then invoke <span>WebDriver BiDi navigation failed</span> with <var>source
browsing context</var> and a <span>WebDriver BiDi navigation status</span> whose <span
data-x="navigation-status-id">id</span> is <var>navigationId</var>, <span
data-x="navigation-status-status">status</span> is "<code
data-x="navigation-status-canceled">canceled</code>", and <span
data-x="navigation-status-url">url</span> is <var>resource</var>'s <span
data-x="concept-request-url">url</span>, then return.</p></li>
data-x="concept-request-url">url</span>, and then return.</p></li>

<li><p><span data-x="unload a document">Unload</span> the <span>active document</span> of the
<var>specified browsing context</var>.</p></li>
Expand All @@ -84975,8 +84991,8 @@ interface <dfn interface>History</dfn> {

<li><p><span>Traverse the history</span> of the <var>specified browsing context</var> to
the <var>specified entry</var> with <var><span>explicitHistoryNavigation</span></var> set to
true, and <span data-x="traverse-history-navigationid">navigation id</span> set to
<var>navigationId</var>.</p>
true and <var data-x="traverse-history-navigationid">navigationId</var> set to
<var>navigationId</var>.</p></li>
</ol>
</li>
</ol>
Expand Down Expand Up @@ -87671,8 +87687,8 @@ new PaymentRequest(&hellip;); // Allowed to use
<li><p><span>Traverse the history</span> to <var>sessionHistory</var>'s <span>current
entry</span> with <var data-x="traverse-history-hh">historyHandling</var> set to
<var>navigationParams</var>'s <span data-x="navigation-params-hh">history
handling</span>, and <span data-x="traverse-history-navigationid">navigation id</span>
set to <var>navigationId</var>.</p></li>
handling</span>, and <var data-x="traverse-history-navigationid">navigationId</var> set to
<var>navigationId</var>.</p></li>
</ol>
</dd>

Expand Down Expand Up @@ -87702,9 +87718,9 @@ new PaymentRequest(&hellip;); // Allowed to use

<li><p><span>Traverse the history</span> to <var>newEntry</var> with
<var data-x="traverse-history-hh">historyHandling</var> set to "<code
data-x="hh-replace">replace</code>", and <span
data-x="traverse-history-navigationid">navigation id</span> set to <var>navigationId</var>.
</p></li>
data-x="hh-replace">replace</code>", and <var
data-x="traverse-history-navigationid">navigationId</var> set to
<var>navigationId</var>.</p></li>
</ol>
</dd>

Expand Down Expand Up @@ -87733,9 +87749,9 @@ new PaymentRequest(&hellip;); // Allowed to use
<li><p><span data-x="list append">Append</span> <var>newEntry</var> to
<var>sessionHistory</var>.</p></li>

<li><p><span>Traverse the history</span> to <var>newEntry</var> with <span
data-x="traverse-history-navigationid">navigation id</span> set to <var>navigationId</var>.
</p></li>
<li><p><span>Traverse the history</span> to <var>newEntry</var> with <var
data-x="traverse-history-navigationid">navigationId</var> set to
<var>navigationId</var>.</p></li>
</ol>
</dd>
</dl>
Expand Down Expand Up @@ -88129,8 +88145,8 @@ new PaymentRequest(&hellip;); // Allowed to use

<li><p><span>Traverse the history</span> to the new entry, with <var
data-x="traverse-history-hh">historyHandling</var> set to <var>historyHandling</var>,
<var><span>nonBlockingEvents</span></var> set to true, and <span
data-x="traverse-history-navigationid">navigation id</span> set to <var>navigationId</var>.
<var><span>nonBlockingEvents</span></var> set to true, and <var
data-x="traverse-history-navigationid">navigationId</var> set to <var>navigationId</var>.
This will <span>scroll to the fragment</span> given in what is now the document's <span
data-x="concept-document-url">URL</span>.</p></li>
</ol>
Expand Down Expand Up @@ -88291,10 +88307,10 @@ new PaymentRequest(&hellip;); // Allowed to use
<li>
<p><span>Navigate</span><!--DONAV history traversal after eviction--> the <span>browsing
context</span> to <var>request</var> with <var data-x="navigation-hh">historyHandling</var>
set to "<code data-x="hh-entry-update">entry update</code>", with <var
set to "<code data-x="hh-entry-update">entry update</code>", <var
data-x="navigation-historypolicycontainer">historyPolicyContainer</var> set to
<var>entry</var>'s <span data-x="she-policy-container">policy container</span>, and with
<span data-x="navigation-navigationid">navigation id</span> set to <var>navigationId</var>.
<var>entry</var>'s <span data-x="she-policy-container">policy container</span>, and
<var data-x="navigation-navigationid">navigationId</var> set to <var>navigationId</var>.
The navigation must be done using the same <span>source browsing context</span> as was
used the first time <var>entry</var> was created.</p>

Expand All @@ -88318,15 +88334,19 @@ new PaymentRequest(&hellip;); // Allowed to use
<li><p>Let <var>newDocument</var> be <var>entry</var>'s <span
data-x="she-document">document</span>.</p></li>

<li><p>If <var>navigationId</var> is null:</p>
<li>
<p>If <var>navigationId</var> is null:</p>

<!-- In practice I think the only case that we use the navigation id in subsequent steps is
when we have a page loaded from the bfcache, in which case document's navigation id is always null.
We could just use null as the navigation id in that case, but it would mean a difference between
a WebDriver-initiated history traversal from the bfcache and a UA initated history traversal. -->
when we have a page loaded from the bfcache, in which case document's navigation id is always
null. We could just use null as the navigation id in that case, but it would mean a difference
between a WebDriver-initiated history traversal from the bfcache and a UA initated history
traversal. -->

<ol>
<li><p>If <var>newDocument</var>'s <span data-x="concept-document-navigation-id">navigation
id</span> is not null, set <var>navigationId</var> to <var>newDocument</var>'s <span
data-x="concept-document-navigation-id">navigation id</span>.
id</span> is not null, then set <var>navigationId</var> to <var>newDocument</var>'s <span
data-x="concept-document-navigation-id">navigation id</span>.</p></li>

<li><p>Otherwise, set <var>navigationId</var> to the result of <span>generating a random
UUID</span>. <ref spec=UUID></p></li>
Expand Down Expand Up @@ -88423,12 +88443,12 @@ new PaymentRequest(&hellip;); // Allowed to use
data-x="event-pageshow">pageshow</code> at <var>newDocument</var>'s <span>relevant global
object</span> with true.</p></li>

<li><p>Invoke <span>WebDriver BiDi page show</span> with <var>newDocument</var>'s
<span data-x="concept-document-bc">browsing context</span>, and a new <span>WebDriver BiDi
navigation status</span> whose <span data-x="navigation-status-id">id</span> is the
<var>navigationId</var>, <span data-x="navigation-status-status">status</span> is
"<code data-x="navigation-status-complete">complete</code>", and <span
data-x="navigation-status-url">url</span> is the <var>newDocument</var>'s <span
<li><p>Invoke <span>WebDriver BiDi page show</span> with <var>newDocument</var>'s <span
data-x="concept-document-bc">browsing context</span> and a new <span>WebDriver BiDi
navigation status</span> whose <span data-x="navigation-status-id">id</span> is
<var>navigationId</var>, <span data-x="navigation-status-status">status</span> is "<code
data-x="navigation-status-complete">complete</code>", and <span
data-x="navigation-status-url">url</span> is <var>newDocument</var>'s <span
data-x="concept-document-url">URL</span>.</p></li>
</ol>

Expand Down Expand Up @@ -88502,27 +88522,31 @@ new PaymentRequest(&hellip;); // Allowed to use
object</span> to run the following steps instead.</p>

<ol>
<li><p>If <var>stateChanged</var> is true:</p>
<li>
<p>If <var>stateChanged</var> is true, then:</p>

<ol>
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-popstate">popstate</code> at <var>newDocument</var>'s
<span>relevant global object</span>, using <code>PopStateEvent</code>, with the <code
data-x="dom-PopStateEvent-state">state</code> attribute initialized to <var>state</var>.
</p></li>

<li><p>Invoke <span>WebDriver BiDi pop state</span> with with <var>newDocument</var>'s
<span data-x="concept-document-bc">browsing context</span>, and a new <span>WebDriver
BiDi navigation status</span> whose <span data-x="navigation-status-id">id</span> is
<var>navigationId</var>, <span data-x="navigation-status-url">url</span> is
<var>resource</var>'s <span data-x="concept-request-url">URL</span>, and <span
data-x="navigation-status-status">status</span> is "<code
data-x="navigation-status-complete">complete</code>".</p></li>
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-popstate">popstate</code> at <var>newDocument</var>'s
<span>relevant global object</span>, using <code>PopStateEvent</code>, with the <code
data-x="dom-PopStateEvent-state">state</code> attribute initialized to <var>state</var>.
</p></li>

<li><p>Invoke <span>WebDriver BiDi pop state</span> with <var>newDocument</var>'s
<span data-x="concept-document-bc">browsing context</span> and a new <span>WebDriver
BiDi navigation status</span> whose <span data-x="navigation-status-id">id</span> is
<var>navigationId</var>, <span data-x="navigation-status-url">url</span> is
<var>resource</var>'s <span data-x="concept-request-url">URL</span>, and <span
data-x="navigation-status-status">status</span> is "<code
data-x="navigation-status-complete">complete</code>".</p></li>
</ol>
</li>

<li><p><span>Restore persisted state</span> from <var>entry</var>.</p></li>

<li><p>If <var>hashChanged</var> is true:</p>
<li>
<p>If <var>hashChanged</var> is true, then:</p>

<ol>
<li><p><span data-x="concept-event-fire">Fire an event</span> named
<code data-x="event-hashchange">hashchange</code> at the <span>browsing context</span>'s
Expand All @@ -88532,7 +88556,7 @@ new PaymentRequest(&hellip;); // Allowed to use
<var>newURL</var>.</p></li>

<li><p>Invoke <span>WebDriver BiDi fragment navigated</span> with <var>newDocument</var>'s
<span data-x="concept-document-bc">browsing context</span>, and a new <span>WebDriver
<span data-x="concept-document-bc">browsing context</span> and a new <span>WebDriver
BiDi navigation status</span> whose <span data-x="navigation-status-id">id</span> is
<var>navigationId</var>, <span data-x="navigation-status-url">url</span> is
<var>resource</var>'s <span data-x="concept-request-url">URL</span>, and <span
Expand Down

0 comments on commit 2c7e630

Please sign in to comment.