html5/spec history.html,1.1023,1.1024 spec.html,1.1332,1.1333 the-end.html,1.26,1.27

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv17391

Modified Files:
	history.html spec.html the-end.html 
Log Message:
Change pushState() and replaceState() so that they update the pending state object as well (otherwise, pushState vs pushState;back;forward would result in different state objects in the initial popostate which is just silly). (whatwg r5686)

[updated by splitter]


Index: the-end.html
===================================================================
RCS file: /sources/public/html5/spec/the-end.html,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- the-end.html	30 Nov 2010 01:46:40 -0000	1.26
+++ the-end.html	30 Nov 2010 02:46:41 -0000	1.27
@@ -448,8 +448,8 @@
    attribute set to false. This event must not bubble, must not be
    cancelable, and has no default action.</p></li>
 
-   <li><p>If the <code><a href="infrastructure.html#document">Document</a></code> has a <a href="history.html#pending-state-object">pending state
-   object</a>, then <a href="webappapis.html#queue-a-task">queue a task</a> to fire a <code title="event-popstate"><a href="history.html#event-popstate">popstate</a></code> event at the
+   <li><p>If the <code><a href="infrastructure.html#document">Document</a></code> is in a <a href="browsers.html#browsing-context">browsing
+   context</a>, then <a href="webappapis.html#queue-a-task">queue a task</a> to fire a <code title="event-popstate"><a href="history.html#event-popstate">popstate</a></code> event at the
    <code><a href="infrastructure.html#document">Document</a></code>'s <code><a href="browsers.html#window">Window</a></code> object using the
    <code><a href="history.html#popstateevent">PopStateEvent</a></code> interface, with the <code title="dom-PopStateEvent-state"><a href="history.html#dom-popstateevent-state">state</a></code> attribute set to the
    current value of the <a href="history.html#pending-state-object">pending state object</a>. This event

Index: history.html
===================================================================
RCS file: /sources/public/html5/spec/history.html,v
retrieving revision 1.1023
retrieving revision 1.1024
diff -u -d -r1.1023 -r1.1024
--- history.html	30 Nov 2010 01:46:40 -0000	1.1023
+++ history.html	30 Nov 2010 02:46:41 -0000	1.1024
@@ -714,6 +714,21 @@
 
    </li>
 
+   <li>
+
+     <p>If the <a href="dom.html#current-document-readiness">current document readiness</a> is not yet set
+     to the string "complete", let the <code><a href="infrastructure.html#document">Document</a></code>'s
+     <a href="#pending-state-object">pending state object</a> be another <a href="common-dom-interfaces.html#structured-clone">structured
+     clone</a> of the specified <var title="">data</var>. (If there
+     was already a <a href="#pending-state-object">pending state object</a>, the previous one
+     is discarded.)</p>
+
+     <p class="note">This ensures that the <code title="event-popstate"><a href="#event-popstate">popstate</a></code> event that will be fired
+     when the document finally loads will accurately reflect the
+     pushed or replaced state object.</p>
+
+   </li>
+
   </ol><p class="note">The <var title="">title</var> is purely
   advisory. User agents might use the title in the user interface.</p>
 
@@ -2007,6 +2022,12 @@
      attribute set to true. This event must not bubble, must not be
      cancelable, and has no default action.</p></li>
 
+     <!-- an interesting thing to test would be to traverse back
+     during onload, before the first pageshow has fired, and then to
+     traverse forward again, and see if we get _two_ pageshows. If so,
+     it indicates that the history traversal task source has a higher
+     priority than the DOM manipulation task source. -->
+
     </ol></li>
 
    <li><p>Set <a href="dom.html#the-document-s-current-address">the document's current address</a> to the URL
@@ -2052,8 +2073,8 @@
 
      <dt>Otherwise</dt>
 
-     <dd><p>Let the <code><a href="infrastructure.html#document">Document</a></code>'s <dfn id="pending-state-object">pending state
-     object</dfn> be <var title="">state</var>. (If there was already
+     <dd><p>Let the <code><a href="infrastructure.html#document">Document</a></code>'s <a href="#pending-state-object">pending state
+     object</a> be <var title="">state</var>. (If there was already
      a <a href="#pending-state-object">pending state object</a>, the previous one is
      discarded.)</p>
 
@@ -2072,7 +2093,10 @@
    <li><p>The <a href="#current-entry">current entry</a> is now the <i>specified
    entry</i>.</p></li>
 
-  </ol><p>The <a href="#pending-state-object">pending state object</a> must be initially null.</p>
+  </ol><p>The <dfn id="pending-state-object">pending state object</dfn> is used to keep track of what
+  state object to use in the inital <code title="event-popstate"><a href="#event-popstate">popstate</a></code> event fired by the parser
+  once it <a href="the-end.html#stop-parsing" title="stop parsing">stops parsing</a>. The
+  <a href="#pending-state-object">pending state object</a> must be initially null.</p>
 
   <p>The <a href="webappapis.html#task-source">task source</a> for the tasks mentioned above is the
   <a href="webappapis.html#dom-manipulation-task-source">DOM manipulation task source</a>.</p>

Index: spec.html
===================================================================
RCS file: /sources/public/html5/spec/spec.html,v
retrieving revision 1.1332
retrieving revision 1.1333
diff -u -d -r1.1332 -r1.1333
--- spec.html	30 Nov 2010 01:46:40 -0000	1.1332
+++ spec.html	30 Nov 2010 02:46:41 -0000	1.1333
@@ -385,7 +385,7 @@
     <a href="Overview.html">single page HTML</a>,
     <a href="spec.html">multipage HTML</a>,
     <a href="author/">web developer edition</a>.
-This is revision 1.4553.
+This is revision 1.4554.
    </p> 
      <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
    &#169; 2010 <a href="http://www.w3.org/"><abbr title="World Wide

Received on Tuesday, 30 November 2010 02:46:45 UTC