- From: poot <cvsmail@w3.org>
- Date: Tue, 31 Mar 2009 10:09:50 +0900 (JST)
- To: public-html-diffs@w3.org
Make pushState() and <a href='#foo'> actually update the window.location object's value. (whatwg r2924) implied strong reference http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#implied-strong-reference location http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#dom-location replace(url) http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#dom-location-replace The document's current address http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#the-document-s-current-address seamless http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#attr-iframe-seamless Status of this document http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#status-of-this-document 3 Semantics and structure of HTML documents http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#dom 5.10.8 Navigating to a fragment identifier http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#scroll-to-fragid A vocabulary and associated APIs for HTML and XHTML http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#a-vocabulary-and-associated-apis-for-html-and-xhtml protocol http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#dom-location-protocol scroll to the fragment identifier http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#scroll-to-the-fragment-identifier W3C Working Draft 12 February 2009 http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#w3c-working-draft-12-february-year XML documents http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#xml-documents seamless browsing context flag http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#seamless-browsing-context-flag Location http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#location pushState(data, title, url) http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#dom-history-pushstate The user agent must make the specified entry's Document object the active document of the browsing context. http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#appcache-history-2 replacement enabled http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#replacement-enabled href http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#dom-location-href The document's address http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#the-document-s-address resolveURL(url) http://people.w3.org/mike/diffs/html5/spec/Overview.1.2089.html#dom-location-resolveurl http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2088&r2=1.2089&f=h http://html5.org/tools/web-apps-tracker?from=2923&to=2924 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.2088 retrieving revision 1.2089 diff -u -d -r1.2088 -r1.2089 --- Overview.html 30 Mar 2009 23:53:46 -0000 1.2088 +++ Overview.html 31 Mar 2009 01:07:44 -0000 1.2089 @@ -146,7 +146,7 @@ <p><a href=http://www.w3.org/><img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72></a></p> <h1>HTML 5</h1> <h2 class="no-num no-toc" id=a-vocabulary-and-associated-apis-for-html-and-xhtml>A vocabulary and associated APIs for HTML and XHTML</h2> - <h2 class="no-num no-toc" id=w3c-working-draft-12-february-year><!--ZZZ:--> W3C Working Draft 12 February 2009<!-- fix date ZZZ --><!-- Editor's Draft 30 March 2009 --><!--:ZZZ--></h2> + <h2 class="no-num no-toc" id=w3c-working-draft-12-february-year><!--ZZZ:--> W3C Working Draft 12 February 2009<!-- fix date ZZZ --><!-- Editor's Draft 31 March 2009 --><!--:ZZZ--></h2> <dl><!-- ZZZ: update the month/day (twice), uncomment out --><dt>This Version:</dt> <dd><a href=http://www.w3.org/TR/2009/WD-html5-20090212/>http://www.w3.org/TR/2009/WD-html5-20090212/</a></dd> <!-- :ZZZ --> @@ -236,7 +236,7 @@ track. <!--ZZZ:--> This specification is the 12 February 2009 Working Draft. - <!-- This specification is the 30 March 2009 Editor's Draft. --> + <!-- This specification is the 31 March 2009 Editor's Draft. --> <!--:ZZZ--> </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href=http://www.whatwg.org/>WHATWG</a>. The two specifications are identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of) @@ -6097,7 +6097,14 @@ </div><h2 id=dom><span class=secno>3 </span>Semantics and structure of HTML documents</h2><h3 id=semantics-intro><span class=secno>3.1 </span>Introduction</h3><p><em>This section is non-normative.</em><p class=XXX>An introduction to marking up a document.<h3 id=documents><span class=secno>3.2 </span>Documents</h3><p>Every XML and HTML document in an HTML UA is represented by a <code>Document</code> object. <a href=#references>[DOM3CORE]</a><p><dfn id=the-document-s-address>The document's address</dfn> is an <a href=#absolute-url>absolute URL</a> - that is set when the <code>Document</code> is created.<p>When a <code>Document</code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title="">createDocument()</code> API, <a href=#the-document-s-address>the document's + that is set when the <code>Document</code> is created. <dfn id=the-document-s-current-address>The + document's current address</dfn> is an <a href=#absolute-url>absolute URL</a> + that can change during the lifetime of the <code>Document</code>, + for example when the user <a href=#navigate title=navigate>navigates</a> to + a <a href=#scroll-to-fragid title=navigate-fragid>fragment identifier</a> on the + page. <span class=impl><a href=#the-document-s-current-address>The document's current address</a> + must be set to <a href=#the-document-s-address>the document's address</a> when the + <code>Document</code> is created.</span><p>When a <code>Document</code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title="">createDocument()</code> API, <a href=#the-document-s-address>the document's address</a> is the same as <a href=#the-document-s-address>the document's address</a> of the <a href=#active-document>active document</a> of the <a href=#script-s-browsing-context>script's browsing context</a>.<p><code>Document</code> objects are assumed to be <dfn id=xml-documents>XML @@ -15643,9 +15650,9 @@ <a href=#active-document>active document</a> has the <a href=#same-origin>same origin</a> as the <code><a href=#the-iframe-element>iframe</a></code> element's document, or the <a href=#browsing-context>browsing context</a>'s <a href=#active-document>active document</a>'s <em><a href=#the-document-s-address title="the - document's address">address</a><!-- XXX xref --></em> has the - <a href=#same-origin>same origin</a> as the <code><a href=#the-iframe-element>iframe</a></code> element's - document, the following requirements apply:</span><div class=impl> + document's address">address</a></em> has the <a href=#same-origin>same + origin</a> as the <code><a href=#the-iframe-element>iframe</a></code> element's document, the + following requirements apply:</span><div class=impl> <ul><li><p>The user agent must set the <dfn id=seamless-browsing-context-flag>seamless browsing context flag</dfn> to true for that <a href=#browsing-context>browsing @@ -39354,7 +39361,9 @@ URL</a> that was found earlier in this algorithm as the <a href=#url>URL</a> of the entry.</li> - <!-- XXX update the current address as per bug 6437 --> + <li><p>If the third argument is present, set <a href=#the-document-s-current-address>the document's + current address</a> to the <a href=#absolute-url>absolute URL</a> that was + found earlier in this algorithm.</li> <li><p>Update the <a href=#current-entry>current entry</a> to be the this newly added entry.</li> @@ -39473,11 +39482,10 @@ <code><a href=#location>Location</a></code> object for that <code><a href=#window>Window</a></code> object's <code>Document</code>.</p> - </div><p><code><a href=#location>Location</a></code> objects provide a representation of <a href=#the-document-s-address title="the document's address">their document's address</a>, and - allow the <a href=#current-entry>current entry</a> of the <a href=#browsing-context>browsing - context</a>'s session history to be changed, by adding or - replacing entries in the <code title=dom-history><a href=#dom-history>history</a></code> - object.<pre class=idl>interface <dfn id=location>Location</dfn> { + </div><p><code><a href=#location>Location</a></code> objects provide a representation of <a href=#the-document-s-current-address title="the document's current address">their document's current + address</a>, and allow the <a href=#current-entry>current entry</a> of the + <a href=#browsing-context>browsing context</a>'s session history to be changed, by + adding or replacing entries in the <code title=dom-history><a href=#dom-history>history</a></code> object.<pre class=idl>interface <dfn id=location>Location</dfn> { readonly attribute DOMString <a href=#dom-location-href title=dom-location-href>href</a>; void <a href=#dom-location-assign title=dom-location-assign>assign</a>(in DOMString url); void <a href=#dom-location-replace title=dom-location-replace>replace</a>(in DOMString url); @@ -39539,9 +39547,9 @@ </dl><div class=impl> <p>The <dfn id=dom-location-href title=dom-location-href><code>href</code></dfn> - attribute must return <a href=#the-document-s-address title="the document's address">the - address</a> of the associated <code>Document</code> object, as an - <a href=#absolute-url>absolute URL</a>.</p> + attribute must return <a href=#the-document-s-current-address title="the document's current + address">the current address</a> of the associated + <code>Document</code> object, as an <a href=#absolute-url>absolute URL</a>.</p> <p>On setting, <!--XXX Mozilla does this, but IE doesn't. What should we do?: the behavior depends on the context in which the @@ -39599,12 +39607,11 @@ </div><p>The <code><a href=#location>Location</a></code> interface also has the complement of <a href=#url-decomposition-attributes>URL decomposition attributes</a>, <dfn id=dom-location-protocol title=dom-location-protocol><code>protocol</code></dfn>, <dfn id=dom-location-host title=dom-location-host><code>host</code></dfn>, <dfn id=dom-location-port title=dom-location-port><code>port</code></dfn>, <dfn id=dom-location-hostname title=dom-location-hostname><code>hostname</code></dfn>, <dfn id=dom-location-pathname title=dom-location-pathname><code>pathname</code></dfn>, <dfn id=dom-location-search title=dom-location-search><code>search</code></dfn>, and <dfn id=dom-location-hash title=dom-location-hash><code>hash</code></dfn>. <span class=impl>These must follow the rules given for URL decomposition attributes, with the <a href=#concept-uda-input title=concept-uda-input>input</a> - being <a href=#the-document-s-address title="the document's address">the address</a> of the - associated <code>Document</code> object, as an <a href=#absolute-url>absolute - URL</a> (same as the <code title=dom-location-href><a href=#dom-location-href>href</a></code> - attribute), and the <a href=#concept-uda-setter title=concept-uda-setter>common setter - action</a> being the same as setting the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute to the new output - value.</span><div class=impl> + being <a href=#the-document-s-current-address title="the document's current address">the current + address</a> of the associated <code>Document</code> object, as an + <a href=#absolute-url>absolute URL</a> (same as the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute), and the <a href=#concept-uda-setter title=concept-uda-setter>common setter action</a> being the + same as setting the <code title=dom-location-href><a href=#dom-location-href>href</a></code> + attribute to the new output value.</span><div class=impl> <hr><p>The <dfn id=dom-location-resolveurl title=dom-location-resolveURL><code>resolveURL(<var title="">url</var>)</code></dfn> method must <a href=#resolve-a-url title="resolve a url">resolve</a> its <var title="">url</var> argument, relative @@ -40016,9 +40023,10 @@ these substeps.</li> <li><p><a href=#scroll-to-the-fragment-identifier>Scroll to the fragment identifier</a> given in - <a href=#the-document-s-address>the document's address</a>. If this fails to find <a href=#the-indicated-part-of-the-document title="the indicated part of the document">an indicated part of - the document</a>, then return to the first step of these - substeps.</li> + <a href=#the-document-s-current-address>the document's current address</a>. If this fails to + find <a href=#the-indicated-part-of-the-document title="the indicated part of the document">an + indicated part of the document</a>, then return to the first + step of these substeps.</li> </ol></li> @@ -40260,16 +40268,28 @@ <h4 id=scroll-to-fragid><span class=secno>5.10.8 </span><dfn title=navigate-fragid>Navigating to a fragment identifier</dfn></h4> <p>When a user agent is supposed to navigate to a fragment - identifier, then the user agent must <a href=#update-the-session-history-with-the-new-page>update the session - history with the new page</a>, where "the new page" has the same - <code>Document</code> as before but with the URL having the newly - specified fragment identifier.</p> + identifier, then the user agent must <a href=#queue-a-task>queue a task</a> to + run the following steps:</p> - <p>Part of that algorithm involves the user agent having to - <a href=#scroll-to-the-fragment-identifier>scroll to the fragment identifier</a>, which is the - important part for this step.</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-1>History</a></code> object.</p> + <p class=note>This <a href=#history-notes>doesn't necessarily + have to affect</a><!--XXX change to auto-xref?--> the user + agent's user interface.</p> </li> - <p>When the user agent is required to <dfn id=scroll-to-the-fragment-identifier>scroll to the fragment + <li><p>Append a new entry at the end of the <code><a href=#history-1>History</a></code> + object representing the new resource and its <code>Document</code> + object and related state, and set its URL to the address to which + the user agent was <a href=#navigate title=navigate>navigating</a>. (This + will be the same as <a href=#the-document-s-address>the document's address</a>, but with a + new fragment identifier.)</li> + + <li><p><a href=#traverse-the-history>Traverse the history</a> to the new entry. This + will <a href=#scroll-to-the-fragment-identifier>scroll to the fragment identifier</a> given in + <a href=#the-document-s-current-address>the document's current address</a>.</li> + + </ol><hr><p>When the user agent is required to <dfn id=scroll-to-the-fragment-identifier>scroll to the fragment identifier</dfn>, it must change the scrolling position of the document, or perform some other action, such that <a href=#the-indicated-part-of-the-document>the indicated part of the document</a> is brought to the user's @@ -40392,6 +40412,9 @@ </ol></li> + <li><p>Set <a href=#the-document-s-current-address>the document's current address</a> to the URL + of the <i>specified entry</i>.</li> + <li><p>If the <i>specified entry</i> is a state object or the first entry for a <code>Document</code>, the user agent must <a href=#activating-state-object-entries title="activate the state object">activate that entry</a>.</li>
Received on Tuesday, 31 March 2009 01:10:28 UTC