Skip to content

Commit cf02423

Browse files
authored
Fragment navigation should use replacement enabled
Tests: web-platform-tests/wpt#6877. Fixes whatwg#2796.
1 parent 384c30c commit cf02423

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

source

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81732,7 +81732,8 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
8173281732
data-x="concept-document-url">URL</span> with <var>exclude fragments flag</var> set, and
8173381733
<var>resource</var>'s <span data-x="concept-request-url">url</span>'s <span
8173481734
data-x="concept-url-fragment">fragment</span> is non-null, then <span
81735-
data-x="navigate-fragid">navigate to that fragment</span> and abort these steps.</p></li>
81735+
data-x="navigate-fragid">navigate to that fragment</span>, with <span>replacement enabled</span>
81736+
if this was invoked with <span>replacement enabled</span>, and abort these steps.</p></li>
8173681737

8173781738
<li><p>Cancel any preexisting but not yet <span data-x="concept-navigate-mature">mature</span>
8173881739
attempt to navigate <var>browsingContext</var>, including canceling any instances of the <span
@@ -82785,20 +82786,19 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
8278582786

8278682787
<h4 id="scroll-to-fragid"><dfn data-x="navigate-fragid">Navigating to a fragment</dfn></h4>
8278782788

82788-
<p>When a user agent is supposed to navigate to a <span data-x="concept-url-fragment">fragment</span>, then the user agent must
82789-
run the following steps:</p>
82789+
<p>When a user agent is supposed to navigate to a <span
82790+
data-x="concept-url-fragment">fragment</span>, optionally with <span>replacement enabled</span>,
82791+
then the user agent must run the following steps:</p>
8279082792

8279182793
<ol>
82792-
8279382794
<li>
82794-
82795-
<p>Remove all the entries in the <span>browsing context</span>'s <span>session history</span>
82796-
after the <span>current entry</span>. If the <span>current entry</span> is the last entry in the
82797-
session history, then no entries are removed.</p>
82795+
<p>If not with <span>replacement enabled</span>, then remove all the entries in the
82796+
<span>browsing context</span>'s <span>session history</span> after the <span>current
82797+
entry</span>. If the <span>current entry</span> is the last entry in the session history, then
82798+
no entries are removed.</p>
8279882799

8279982800
<p class="note">This <a href="#history-notes">doesn't necessarily have to affect</a> the user
8280082801
agent's user interface.</p>
82801-
8280282802
</li>
8280382803

8280482804
<li><p>Remove any <span data-x="concept-task">tasks</span> queued by the <span>history traversal
@@ -82811,10 +82811,10 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
8281182811
the user agent was <span data-x="navigate">navigating</span>. The title must be left
8281282812
unset.</p></li>
8281382813

82814-
<li><p><span>Traverse the history</span> to the new entry, with the <i>non-blocking events</i> flag
82815-
set. This will <span>scroll to the fragment</span> given in what is now the document's <span
82816-
data-x="concept-document-url">URL</span>.</p></li>
82817-
82814+
<li><p><span>Traverse the history</span> to the new entry, with <span>replacement enabled</span>
82815+
if this was invoked with <span>replacement enabled</span>, and with the <i>non-blocking
82816+
events</i> flag set. This will <span>scroll to the fragment</span> given in what is now the
82817+
document's <span data-x="concept-document-url">URL</span>.</p></li>
8281882818
</ol>
8281982819

8282082820
<p class="note">If the scrolling fails because the relevant <span data-x="concept-id">ID</span> has
@@ -120555,6 +120555,7 @@ INSERT INTERFACES HERE
120555120555
Felix Sanz,
120556120556
Felix Sasaki,
120557120557
Fernando Altomare Serboncini,
120558+
Forbes Lindesay,
120558120559
Francesco Schwarz,
120559120560
Francis Brosnan Blazquez,
120560120561
Franck 'Shift' Qu&eacute;lain,

0 commit comments

Comments
 (0)