hixie: Rationalise the various places that require the session history to be cleared. Make sure document.open() with replace=true also clears the session history. (whatwg r4593)

hixie: Rationalise the various places that require the session history
to be cleared. Make sure document.open() with replace=true also clears
the session history. (whatwg r4593)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.3669&r2=1.3670&f=h
http://html5.org/tools/web-apps-tracker?from=4592&to=4593

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3669
retrieving revision 1.3670
diff -u -d -r1.3669 -r1.3670
--- Overview.html 15 Jan 2010 06:14:59 -0000 1.3669
+++ Overview.html 15 Jan 2010 06:37:18 -0000 1.3670
@@ -8467,23 +8467,30 @@
 
    <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
@@ -43309,14 +43316,19 @@
 
     <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
@@ -44135,19 +44147,31 @@
        <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
@@ -44424,10 +44448,17 @@
   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>
@@ -44542,8 +44573,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>,

Received on Friday, 15 January 2010 06:38:03 UTC