[html5] r4593 - [giow] (2) Rationalise the various places that require the session history to be [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Jan 14 22:37:14 PST 2010


Author: ianh
Date: 2010-01-14 22:37:12 -0800 (Thu, 14 Jan 2010)
New Revision: 4593

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Rationalise the various places that require the session history to be cleared. Make sure document.open() with replace=true also clears the session history.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8629

Modified: complete.html
===================================================================
--- complete.html	2010-01-15 06:14:53 UTC (rev 4592)
+++ complete.html	2010-01-15 06:37:12 UTC (rev 4593)
@@ -9837,24 +9837,31 @@
 
    <li>
 
-    <p>If <var title="">replace</var> is false, then:
+    <p>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
+    <a href=#session-history>session history</a> after the <a href=#current-entry>current
+    entry</a>. If the <a href=#current-entry>current entry</a> is the last entry
+    in the session history, then no entries are removed.</p>
 
-    <ol><li>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
-     <a href=#session-history>session history</a> after the <a href=#current-entry>current entry</a>
-     in its <code>Document</code>'s <code><a href=#history-0>History</a></code> object</li>
+    <p class=note>This <a href=#history-notes>doesn't necessarily
+    have to affect</a> the user agent's user interface.</p>
 
-     <li>Remove any earlier entries that share the same
-     <code>Document</code></li>
+   </li>
 
-     <li>Add a new entry just before the last entry that is associated
-     with the text that was parsed by the previous parser associated
-     with the <code>Document</code> object, as well as the state of
-     the document at the start of these steps. (This allows the user
-     to step backwards in the session history to see the page before
-     it was blown away by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> call.)</li>
+   <li>Remove any earlier entries that share the same
+   <code>Document</code>.</li>
 
-    </ol></li>
+   <li>
 
+    <p>If <var title="">replace</var> is false, then add a new entry,
+    just before the last entry, and assocaite with the new entry the
+    text that was parsed by the previous parser associated with the
+    <code>Document</code> object, as well as the state of the document
+    at the start of these steps. (This allows the user to step
+    backwards in the session history to see the page before it was
+    blown away by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> call.)</p>
+
+   </li>
+
    <li><p>Finally, set the <a href=#insertion-point>insertion point</a> to point at
    just before the end of the <a href=#the-input-stream>input stream</a> (which at this
    point will be empty).</li>
@@ -55679,15 +55686,20 @@
 
     <p>If the method invoked was the <code title=dom-history-pushState><a href=#dom-history-pushstate>pushState()</a></code> method:</p>
 
-    <ol><li><p>Remove from the <a href=#session-history>session history</a> any entries for
-     the <code>Document</code> from the entry after the <a href=#current-entry>current
-     entry</a> up to the last entry in the session history that
-     references the same <code>Document</code> object, if any. If the
-     <a href=#current-entry>current entry</a> is the last entry in the session
-     history, or if there are no entries after the <a href=#current-entry>current
-     entry</a> that reference the same <code>Document</code> object,
-     then no entries are removed.</li>
+    <ol><li>
 
+      <p>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
+      <a href=#session-history>session history</a> after the <a href=#current-entry>current
+      entry</a>. If the <a href=#current-entry>current entry</a> is the last
+      entry in the session history, then no entries are
+      removed.</p>
+
+      <p class=note>This <a href=#history-notes>doesn't
+      necessarily have to affect</a> the user agent's user
+      interface.</p>
+
+     </li>
+
      <li><p>Add a state object entry to the session history, after the
      <a href=#current-entry>current entry</a>, with <var title="">cloned data</var> as
      the state object, the given <var title="">title</var> as the title,
@@ -56548,20 +56560,32 @@
        <li><p><a href=#traverse-the-history>Traverse the history</a> to the new
        entry.</li>
 
-      </ol></dd>
+      </ol><p class=note>This can only happen if the entry being updated
+      is no the <a href=#current-entry>current entry</a>. (It happens when the user
+      tried to traverse to a session history entry that no longer had
+      a <code>Document</code> object.)</p>
 
+     </dd>
 
+
      <dt>Otherwise</dt>
 
      <dd>
 
-      <ol><li><p>Remove all the entries after the <a href=#current-entry>current
-       entry</a> in the <a href=#browsing-context>browsing context</a>'s
-       <code>Document</code> object's <code><a href=#history-0>History</a></code> object.</p>
-       <p class=note>This <a href=#history-notes>doesn't
-       necessarily have to affect</a> the user agent's user
-       interface.</p> </li>
+      <ol><li>
 
+        <p>Remove all the entries in the <a href=#browsing-context>browsing
+        context</a>'s <a href=#session-history>session history</a> after the
+        <a href=#current-entry>current entry</a>. If the <a href=#current-entry>current entry</a>
+        is the last entry in the session history, then no entries are
+        removed.</p>
+
+        <p class=note>This <a href=#history-notes>doesn't
+        necessarily have to affect</a> the user agent's user
+        interface.</p>
+
+       </li>
+
        <li><p>Append a new entry at the end of the <code><a href=#history-0>History</a></code>
        object representing the new resource and its
        <code>Document</code> object and related state.</li>
@@ -56837,11 +56861,18 @@
   identifier, then the user agent must <a href=#queue-a-task>queue a task</a> to
   run the following steps:</p>
 
-  <ol><li><p>Remove all the entries after the <a href=#current-entry>current entry</a>
-   in the <a href=#browsing-context>browsing context</a>'s <code>Document</code>
-   object's <code><a href=#history-0>History</a></code> object.</p> <p class=note>This <a href=#history-notes>doesn't necessarily have to affect</a> the
-   user agent's user interface.</p> </li>
+  <ol><li>
 
+    <p>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
+    <a href=#session-history>session history</a> after the <a href=#current-entry>current
+    entry</a>. If the <a href=#current-entry>current entry</a> is the last entry
+    in the session history, then no entries are removed.</p>
+
+    <p class=note>This <a href=#history-notes>doesn't necessarily
+    have to affect</a> the user agent's user interface.</p>
+
+   </li>
+
    <li><p>Append a new entry at the end of the <code><a href=#history-0>History</a></code>
    object representing the new resource and its <code>Document</code>
    object and related state. Its <a href=#url>URL</a> must be set to the
@@ -56955,8 +56986,8 @@
    then the user agent must run the following substeps:</p>
 
     <ol><li>If the browsing context is a <a href=#top-level-browsing-context>top-level browsing
-     context</a> (and not an <a href=#auxiliary-browsing-context>auxiliary browsing
-     context</a>), and the <a href=#origin>origin</a> of the
+     context</a>, but not an <a href=#auxiliary-browsing-context>auxiliary browsing
+     context</a>, and the <a href=#origin>origin</a> of the
      <code>Document</code> of the <i>specified entry</i> is not the
      <a href=#same-origin title="same origin">same</a> as the <a href=#origin>origin</a>
      of the <code>Document</code> of the <a href=#current-entry>current entry</a>,

Modified: index
===================================================================
--- index	2010-01-15 06:14:53 UTC (rev 4592)
+++ index	2010-01-15 06:37:12 UTC (rev 4593)
@@ -9737,24 +9737,31 @@
 
    <li>
 
-    <p>If <var title="">replace</var> is false, then:
+    <p>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
+    <a href=#session-history>session history</a> after the <a href=#current-entry>current
+    entry</a>. If the <a href=#current-entry>current entry</a> is the last entry
+    in the session history, then no entries are removed.</p>
 
-    <ol><li>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
-     <a href=#session-history>session history</a> after the <a href=#current-entry>current entry</a>
-     in its <code>Document</code>'s <code><a href=#history-0>History</a></code> object</li>
+    <p class=note>This <a href=#history-notes>doesn't necessarily
+    have to affect</a> the user agent's user interface.</p>
 
-     <li>Remove any earlier entries that share the same
-     <code>Document</code></li>
+   </li>
 
-     <li>Add a new entry just before the last entry that is associated
-     with the text that was parsed by the previous parser associated
-     with the <code>Document</code> object, as well as the state of
-     the document at the start of these steps. (This allows the user
-     to step backwards in the session history to see the page before
-     it was blown away by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> call.)</li>
+   <li>Remove any earlier entries that share the same
+   <code>Document</code>.</li>
 
-    </ol></li>
+   <li>
 
+    <p>If <var title="">replace</var> is false, then add a new entry,
+    just before the last entry, and assocaite with the new entry the
+    text that was parsed by the previous parser associated with the
+    <code>Document</code> object, as well as the state of the document
+    at the start of these steps. (This allows the user to step
+    backwards in the session history to see the page before it was
+    blown away by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> call.)</p>
+
+   </li>
+
    <li><p>Finally, set the <a href=#insertion-point>insertion point</a> to point at
    just before the end of the <a href=#the-input-stream>input stream</a> (which at this
    point will be empty).</li>
@@ -55593,15 +55600,20 @@
 
     <p>If the method invoked was the <code title=dom-history-pushState><a href=#dom-history-pushstate>pushState()</a></code> method:</p>
 
-    <ol><li><p>Remove from the <a href=#session-history>session history</a> any entries for
-     the <code>Document</code> from the entry after the <a href=#current-entry>current
-     entry</a> up to the last entry in the session history that
-     references the same <code>Document</code> object, if any. If the
-     <a href=#current-entry>current entry</a> is the last entry in the session
-     history, or if there are no entries after the <a href=#current-entry>current
-     entry</a> that reference the same <code>Document</code> object,
-     then no entries are removed.</li>
+    <ol><li>
 
+      <p>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
+      <a href=#session-history>session history</a> after the <a href=#current-entry>current
+      entry</a>. If the <a href=#current-entry>current entry</a> is the last
+      entry in the session history, then no entries are
+      removed.</p>
+
+      <p class=note>This <a href=#history-notes>doesn't
+      necessarily have to affect</a> the user agent's user
+      interface.</p>
+
+     </li>
+
      <li><p>Add a state object entry to the session history, after the
      <a href=#current-entry>current entry</a>, with <var title="">cloned data</var> as
      the state object, the given <var title="">title</var> as the title,
@@ -56462,20 +56474,32 @@
        <li><p><a href=#traverse-the-history>Traverse the history</a> to the new
        entry.</li>
 
-      </ol></dd>
+      </ol><p class=note>This can only happen if the entry being updated
+      is no the <a href=#current-entry>current entry</a>. (It happens when the user
+      tried to traverse to a session history entry that no longer had
+      a <code>Document</code> object.)</p>
 
+     </dd>
 
+
      <dt>Otherwise</dt>
 
      <dd>
 
-      <ol><li><p>Remove all the entries after the <a href=#current-entry>current
-       entry</a> in the <a href=#browsing-context>browsing context</a>'s
-       <code>Document</code> object's <code><a href=#history-0>History</a></code> object.</p>
-       <p class=note>This <a href=#history-notes>doesn't
-       necessarily have to affect</a> the user agent's user
-       interface.</p> </li>
+      <ol><li>
 
+        <p>Remove all the entries in the <a href=#browsing-context>browsing
+        context</a>'s <a href=#session-history>session history</a> after the
+        <a href=#current-entry>current entry</a>. If the <a href=#current-entry>current entry</a>
+        is the last entry in the session history, then no entries are
+        removed.</p>
+
+        <p class=note>This <a href=#history-notes>doesn't
+        necessarily have to affect</a> the user agent's user
+        interface.</p>
+
+       </li>
+
        <li><p>Append a new entry at the end of the <code><a href=#history-0>History</a></code>
        object representing the new resource and its
        <code>Document</code> object and related state.</li>
@@ -56751,11 +56775,18 @@
   identifier, then the user agent must <a href=#queue-a-task>queue a task</a> to
   run the following steps:</p>
 
-  <ol><li><p>Remove all the entries after the <a href=#current-entry>current entry</a>
-   in the <a href=#browsing-context>browsing context</a>'s <code>Document</code>
-   object's <code><a href=#history-0>History</a></code> object.</p> <p class=note>This <a href=#history-notes>doesn't necessarily have to affect</a> the
-   user agent's user interface.</p> </li>
+  <ol><li>
 
+    <p>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
+    <a href=#session-history>session history</a> after the <a href=#current-entry>current
+    entry</a>. If the <a href=#current-entry>current entry</a> is the last entry
+    in the session history, then no entries are removed.</p>
+
+    <p class=note>This <a href=#history-notes>doesn't necessarily
+    have to affect</a> the user agent's user interface.</p>
+
+   </li>
+
    <li><p>Append a new entry at the end of the <code><a href=#history-0>History</a></code>
    object representing the new resource and its <code>Document</code>
    object and related state. Its <a href=#url>URL</a> must be set to the
@@ -56869,8 +56900,8 @@
    then the user agent must run the following substeps:</p>
 
     <ol><li>If the browsing context is a <a href=#top-level-browsing-context>top-level browsing
-     context</a> (and not an <a href=#auxiliary-browsing-context>auxiliary browsing
-     context</a>), and the <a href=#origin>origin</a> of the
+     context</a>, but not an <a href=#auxiliary-browsing-context>auxiliary browsing
+     context</a>, and the <a href=#origin>origin</a> of the
      <code>Document</code> of the <i>specified entry</i> is not the
      <a href=#same-origin title="same origin">same</a> as the <a href=#origin>origin</a>
      of the <code>Document</code> of the <a href=#current-entry>current entry</a>,

Modified: source
===================================================================
--- source	2010-01-15 06:14:53 UTC (rev 4592)
+++ source	2010-01-15 06:37:12 UTC (rev 4593)
@@ -10086,26 +10086,29 @@
 
    <li>
 
-    <p>If <var title="">replace</var> is false, then:
+    <p>Remove all the entries in the <span>browsing context</span>'s
+    <span>session history</span> after the <span>current
+    entry</span>. If the <span>current entry</span> is the last entry
+    in the session history, then no entries are removed.</p>
 
-    <ol>
+    <p class="note">This <a href="#history-notes">doesn't necessarily
+    have to affect</a> the user agent's user interface.</p>
 
-     <li>Remove all the entries in the <span>browsing context</span>'s
-     <span>session history</span> after the <span>current entry</span>
-     in its <code>Document</code>'s <code>History</code> object</li>
+   </li>
 
-     <li>Remove any earlier entries that share the same
-     <code>Document</code></li>
+   <li>Remove any earlier entries that share the same
+   <code>Document</code>.</li>
 
-     <li>Add a new entry just before the last entry that is associated
-     with the text that was parsed by the previous parser associated
-     with the <code>Document</code> object, as well as the state of
-     the document at the start of these steps. (This allows the user
-     to step backwards in the session history to see the page before
-     it was blown away by the <code
-     title="dom-document-open">document.open()</code> call.)</li>
+   <li>
 
-    </ol>
+    <p>If <var title="">replace</var> is false, then add a new entry,
+    just before the last entry, and assocaite with the new entry the
+    text that was parsed by the previous parser associated with the
+    <code>Document</code> object, as well as the state of the document
+    at the start of these steps. (This allows the user to step
+    backwards in the session history to see the page before it was
+    blown away by the <code
+    title="dom-document-open">document.open()</code> call.)</p>
 
    </li>
 
@@ -62942,15 +62945,20 @@
 
     <ol>
 
-     <li><p>Remove from the <span>session history</span> any entries for
-     the <code>Document</code> from the entry after the <span>current
-     entry</span> up to the last entry in the session history that
-     references the same <code>Document</code> object, if any. If the
-     <span>current entry</span> is the last entry in the session
-     history, or if there are no entries after the <span>current
-     entry</span> that reference the same <code>Document</code> object,
-     then no entries are removed.</p></li>
+     <li>
 
+      <p>Remove all the entries in the <span>browsing context</span>'s
+      <span>session history</span> after the <span>current
+      entry</span>. If the <span>current entry</span> is the last
+      entry in the session history, then no entries are
+      removed.</p>
+
+      <p class="note">This <a href="#history-notes">doesn't
+      necessarily have to affect</a> the user agent's user
+      interface.</p>
+
+     </li>
+
      <li><p>Add a state object entry to the session history, after the
      <span>current entry</span>, with <var title="">cloned data</var> as
      the state object, the given <var title="">title</var> as the title,
@@ -63942,6 +63950,11 @@
 
       </ol>
 
+      <p class="note">This can only happen if the entry being updated
+      is no the <span>current entry</span>. (It happens when the user
+      tried to traverse to a session history entry that no longer had
+      a <code>Document</code> object.)</p>
+
      </dd>
 
 
@@ -63951,13 +63964,20 @@
 
       <ol>
 
-       <li><p>Remove all the entries after the <span>current
-       entry</span> in the <span>browsing context</span>'s
-       <code>Document</code> object's <code>History</code> object.</p>
-       <p class="note">This <a href="#history-notes">doesn't
-       necessarily have to affect</a> the user agent's user
-       interface.</p> </li>
+       <li>
 
+        <p>Remove all the entries in the <span>browsing
+        context</span>'s <span>session history</span> after the
+        <span>current entry</span>. If the <span>current entry</span>
+        is the last entry in the session history, then no entries are
+        removed.</p>
+
+        <p class="note">This <a href="#history-notes">doesn't
+        necessarily have to affect</a> the user agent's user
+        interface.</p>
+
+       </li>
+
        <li><p>Append a new entry at the end of the <code>History</code>
        object representing the new resource and its
        <code>Document</code> object and related state.</p></li>
@@ -64264,12 +64284,18 @@
 
   <ol>
 
-   <li><p>Remove all the entries after the <span>current entry</span>
-   in the <span>browsing context</span>'s <code>Document</code>
-   object's <code>History</code> object.</p> <p class="note">This <a
-   href="#history-notes">doesn't necessarily have to affect</a> the
-   user agent's user interface.</p> </li>
+   <li>
 
+    <p>Remove all the entries in the <span>browsing context</span>'s
+    <span>session history</span> after the <span>current
+    entry</span>. If the <span>current entry</span> is the last entry
+    in the session history, then no entries are removed.</p>
+
+    <p class="note">This <a href="#history-notes">doesn't necessarily
+    have to affect</a> the user agent's user interface.</p>
+
+   </li>
+
    <li><p>Append a new entry at the end of the <code>History</code>
    object representing the new resource and its <code>Document</code>
    object and related state. Its <span>URL</span> must be set to the
@@ -64403,8 +64429,8 @@
     <ol>
 
      <li>If the browsing context is a <span>top-level browsing
-     context</span> (and not an <span>auxiliary browsing
-     context</span>), and the <span>origin</span> of the
+     context</span>, but not an <span>auxiliary browsing
+     context</span>, and the <span>origin</span> of the
      <code>Document</code> of the <i>specified entry</i> is not the
      <span title="same origin">same</span> as the <span>origin</span>
      of the <code>Document</code> of the <span>current entry</span>,




More information about the Commit-Watchers mailing list