- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 24 Dec 2008 22:03:26 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv21829 Modified Files: Overview.html Log Message: Be more explicit about which document we're talking about in cache selection. (credit: ap) (whatwg r2582) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1752 retrieving revision 1.1753 diff -u -d -r1.1752 -r1.1753 --- Overview.html 24 Dec 2008 21:24:36 -0000 1.1752 +++ Overview.html 24 Dec 2008 22:03:21 -0000 1.1753 @@ -29930,24 +29930,28 @@ and removes the port if it is the default --> </div><hr><p>When the <dfn id=concept-appcache-init-with-attribute title=concept-appcache-init-with-attribute>application cache - selection algorithm</dfn> algorithm is invoked with a manifest URL, - the user agent must run the first applicable set of steps from the - following list:<dl class=switch><dt>If the resource is not being loaded as part of navigation of a + selection algorithm</dfn> algorithm is invoked with a manifest URL + and document, the user agent must run the first applicable set of + steps from the following list:<dl class=switch><dt>If the document is not being loaded as part of navigation of a <a href=#browsing-context>browsing context</a></dt> <dd> <p>Do nothing.</p> + <p class=note>For instance, the HTML parser can call this + algorithm during the processing of a document generated + exclusively from <code title=dom-document-write><a href=#dom-document-write>document.open()</a></code> and <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code>, without + navigation taking place.</p> + </dd> <!-- otherwise, we're talking browsing contexts only: --> - <dt>If the resource being loaded was loaded from an application - cache and the URL of that application cache's manifest is the - same as the manifest URL with which the algorithm was invoked</dt> - <dd> + <dt>If the document was loaded from an application cache and the + URL of that application cache's manifest is the same as the + manifest URL with which the algorithm was invoked</dt> <dd> <p>Associate the <code>Document</code> with the cache from which it was loaded. Invoke the <a href=#application-cache-update-process>application cache update @@ -29957,14 +29961,14 @@ </dd> - <dt>If the resource being loaded was loaded from an application + <dt>If the document being loaded was loaded from an application cache and the URL of that application cache's manifest is <em>not</em> the same as the manifest URL with which the algorithm was invoked</dt> <dd> - <p>Mark the entry for this resource in the application cache from + <p>Mark the entry for this document in the application cache from which it was loaded as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>.</p> <p>Restart the current navigation from the top of the <a href=#navigate title=navigate>navigation algorithm</a>, undoing any changes @@ -29979,24 +29983,24 @@ during navigation.</p> <p>User agents may notify the user of the inconsistency between - the cache manifest and the resource's own metadata, to aid in + the cache manifest and the document's own metadata, to aid in application development.</p> </dd> - <dt>If the resource being loaded was not loaded from an application + <dt>If the document being loaded was not loaded from an application cache, but it was loaded using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a></dt> <dd> <ol><li><p>If the manifest URL does not have the <a href=#same-origin>same - origin</a> as the resource's own URL, then invoke the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache + origin</a> as the document, then invoke the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache selection algorithm</a> again, but without a manifest, and abort these steps.</li> <li><p>Otherwise, invoke the <a href=#application-cache-update-process>application cache update process</a> for the given manifest URL, with the <a href=#browsing-context>browsing context</a> being navigated, and with the - resource's <code>Document</code> as the new <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource.</li> + <code>Document</code> as the new <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource.</li> </ol></dd> @@ -30009,13 +30013,13 @@ </dl><p>When the <dfn id=concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache selection algorithm</dfn> is invoked <em>without</em> a manifest, if - the resource is being loaded as part of navigation of a - <a href=#browsing-context>browsing context</a>, and the resource was fetched from a - particular <a href=#application-cache>application cache</a>, then the user agent must - associate the <code>Document</code> with that application cache and - invoke the <a href=#application-cache-update-process>application cache update process</a> for that - cache, with that <a href=#browsing-context>browsing context</a>. Otherwise, nothing - special happens.<h5 id=changesToNetworkingModel><span class=secno>5.7.5.1 </span>Changes to the networking model</h5><p>When a <a href=#browsing-context>browsing context</a> is associated with an + the document is being loaded as part of navigation of a + <a href=#browsing-context>browsing context</a>, and it was fetched from a particular + <a href=#application-cache>application cache</a>, then the user agent must associate + the <code>Document</code> with that application cache and invoke the + <a href=#application-cache-update-process>application cache update process</a> for that cache, with + that <a href=#browsing-context>browsing context</a>. Otherwise, nothing special + happens.<h5 id=changesToNetworkingModel><span class=secno>5.7.5.1 </span>Changes to the networking model</h5><p>When a <a href=#browsing-context>browsing context</a> is associated with an <a href=#application-cache>application cache</a>, any and all loads for resources in that <a href=#browsing-context>browsing context</a> other than those for <a href=#child-browsing-context title="child browsing context">child browsing contexts</a> must go through the following steps instead of immediately invoking the @@ -30973,11 +30977,12 @@ url">resolve</a> the value of that attribute, and if that is successful, must run the <a href=#concept-appcache-init-with-attribute title=concept-appcache-init-with-attribute>application cache selection algorithm</a> with the resulting <a href=#absolute-url>absolute - URL</a> as the manifest URL. Otherwise, if the attribute is - absent or resolving it fails, then as soon as the root element is - <a href=#insert-an-element-into-a-document title="insert an element into a document">inserted into the + URL</a> as the manifest URL, and passing in the newly-created + <code>Document</code>. Otherwise, if the attribute is absent or + resolving it fails, then as soon as the root element is <a href=#insert-an-element-into-a-document title="insert an element into a document">inserted into the document</a>, the user agent must run the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache - selection algorithm</a> with no manifest.<p class=note>Because the processing of the <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute happens + selection algorithm</a> with no manifest, passing in the + <code>Document</code>.<p class=note>Because the processing of the <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute happens only once the root element is parsed, any URLs referenced by processing instructions before the root element (such as <code title=""><?xml-styleesheet?></code> and <code title=""><?xbl?></code> PIs) will be fetched from the network and cannot be cached.</p><!-- XXX any ideas for avoiding this, that @@ -31008,7 +31013,8 @@ subsequent versions thereof. <a href=#references>[RFC2046]</a> <a href=#references>[RFC2646]</a><p>The <a href=#document-s-character-encoding>document's character encoding</a> must be set to the character encoding used to decode the document.<p>Upon creation of the <code>Document</code> object, the user agent must run the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache - selection algorithm</a> with no manifest.</p><!-- next two paragraphs are nearly identical to the navigate-html + selection algorithm</a> with no manifest, passing in the + newly-created <code>Document</code>.</p><!-- next two paragraphs are nearly identical to the navigate-html section and similar to the "navigate-ua-inline" section, and the next three are similar to the navigate-image and navigate-plugin sections; keep them all in sync --><p>When no more character are available, an EOF character is @@ -31029,7 +31035,8 @@ keep them in sync --><p>Then, the user agent must act as if it had <a href=#stop-parsing title="stop parsing">stopped parsing</a>.<p>Upon creation of the <code>Document</code> object, the user agent must run the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache - selection algorithm</a> with no manifest.<p>After creating the <code>Document</code> object, but potentially + selection algorithm</a> with no manifest, passing in the + newly-created <code>Document</code>.<p>After creating the <code>Document</code> object, but potentially before the page has finished fully loading, the user agent must <a href=#update-the-session-history-with-the-new-page>update the session history with the new page</a>.<p>User agents may add content to the <code><a href=#the-head-element>head</a></code> element of the <code>Document</code>, or attributes to the <code><a href=#the-img-element>img</a></code> @@ -31046,7 +31053,8 @@ keep them in sync --><p>Then, the user agent must act as if it had <a href=#stop-parsing title="stop parsing">stopped parsing</a>.<p>Upon creation of the <code>Document</code> object, the user agent must run the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache - selection algorithm</a> with no manifest.<p>After creating the <code>Document</code> object, but potentially + selection algorithm</a> with no manifest, passing in the + newly-created <code>Document</code>.<p>After creating the <code>Document</code> object, but potentially before the page has finished fully loading, the user agent must <a href=#update-the-session-history-with-the-new-page>update the session history with the new page</a>.<p>User agents may add content to the <code><a href=#the-head-element>head</a></code> element of the <code>Document</code>, or attributes to the <code><a href=#the-embed-element>embed</a></code> @@ -31064,7 +31072,8 @@ keep them in sync --><p>Once the page has been set up, the user agent must act as if it had <a href=#stop-parsing title="stop parsing">stopped parsing</a>.<p>Upon creation of the <code>Document</code> object, the user agent must run the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache - selection algorithm</a> with no manifest.<p>After creating the <code>Document</code> object, but potentially + selection algorithm</a> with no manifest, passing in the + newly-created <code>Document</code>.<p>After creating the <code>Document</code> object, but potentially before the page has been completely set up, the user agent must <a href=#update-the-session-history-with-the-new-page>update the session history with the new page</a>.<h4 id=scroll-to-fragid><span class=secno>5.9.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 @@ -39335,7 +39344,8 @@ selection algorithm</a> with the resulting <a href=#absolute-url>absolute URL</a>. Otherwise, if there is no such attribute or resolving it fails, run the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache - selection algorithm</a> with no manifest.</p> + selection algorithm</a> with no manifest. The algorithm must be + passed the <code>Document</code> object.</p> <p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before head</a>".</p> @@ -39350,7 +39360,8 @@ <a href=#stack-of-open-elements>stack of open elements</a>.</p> <p>Run the <a href=#concept-appcache-init-no-attribute title=concept-appcache-init-no-attribute>application cache - selection algorithm</a> with no manifest.</p> + selection algorithm</a> with no manifest, passing it the + <code>Document</code> object.</p> <p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before head</a>", then reprocess the current token.</p>
Received on Wednesday, 24 December 2008 22:03:35 UTC