From cf02423dc52686d084a3191833d939919b5907fd Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Sat, 19 Aug 2017 15:16:53 +0200 Subject: [PATCH] Fragment navigation should use replacement enabled Tests: https://github.com/w3c/web-platform-tests/pull/6877. Fixes #2796. --- source | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/source b/source index 30fc041c1c0..cbc6f44e7b4 100644 --- a/source +++ b/source @@ -81732,7 +81732,8 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O data-x="concept-document-url">URL with exclude fragments flag set, and resource's url's fragment is non-null, then navigate to that fragment and abort these steps.

+ data-x="navigate-fragid">navigate to that fragment, with replacement enabled + if this was invoked with replacement enabled, and abort these steps.

  • Cancel any preexisting but not yet mature attempt to navigate browsingContext, including canceling any instances of the 1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O

    Navigating to a fragment

    -

    When a user agent is supposed to navigate to a fragment, then the user agent must - run the following steps:

    +

    When a user agent is supposed to navigate to a fragment, optionally with replacement enabled, + then the user agent must run the following steps:

      -
    1. - -

      Remove all the entries in the browsing context's session history - after the current entry. If the current entry is the last entry in the - session history, then no entries are removed.

      +

      If not with replacement enabled, then remove all the entries in the + browsing context's session history after the current + entry. If the current entry is the last entry in the session history, then + no entries are removed.

      This doesn't necessarily have to affect the user agent's user interface.

      -
    2. Remove any tasks queued by the history traversal @@ -82811,10 +82811,10 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O the user agent was navigating. The title must be left unset.

    3. -
    4. Traverse the history to the new entry, with the non-blocking events flag - set. This will scroll to the fragment given in what is now the document's URL.

    5. - +
    6. Traverse the history to the new entry, with replacement enabled + if this was invoked with replacement enabled, and with the non-blocking + events flag set. This will scroll to the fragment given in what is now the + document's URL.

    If the scrolling fails because the relevant ID has @@ -120555,6 +120555,7 @@ INSERT INTERFACES HERE Felix Sanz, Felix Sasaki, Fernando Altomare Serboncini, + Forbes Lindesay, Francesco Schwarz, Francis Brosnan Blazquez, Franck 'Shift' Quélain,