[html5] r2582 - [e] (0) Be more explicit about which document we're talking about in cache selec [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Dec 24 14:03:17 PST 2008


Author: ianh
Date: 2008-12-24 14:03:16 -0800 (Wed, 24 Dec 2008)
New Revision: 2582

Modified:
   index
   source
Log:
[e] (0) Be more explicit about which document we're talking about in cache selection. (credit: ap)

Modified: index
===================================================================
--- index	2008-12-24 21:24:31 UTC (rev 2581)
+++ index	2008-12-24 22:03:16 UTC (rev 2582)
@@ -36730,26 +36730,30 @@
   </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:</p>
+  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:</p>
 
-  <dl class=switch><dt>If the resource is not being loaded as part of navigation of a
+  <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
@@ -36759,14 +36763,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
@@ -36781,24 +36785,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>
 
@@ -36811,13 +36815,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.</p>
+  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.</p>
 
 
 
@@ -38004,11 +38008,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>
+  selection algorithm</a> with no manifest, passing in the
+  <code>Document</code>.</p>
 
   <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
@@ -38058,7 +38063,8 @@
 
   <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>
+  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
@@ -38098,7 +38104,8 @@
 
   <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>
+  selection algorithm</a> with no manifest, passing in the
+  newly-created <code>Document</code>.</p>
 
   <p>After creating the <code>Document</code> object, but potentially
   before the page has finished fully loading, the user agent must
@@ -38130,7 +38137,8 @@
 
   <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>
+  selection algorithm</a> with no manifest, passing in the
+  newly-created <code>Document</code>.</p>
 
   <p>After creating the <code>Document</code> object, but potentially
   before the page has finished fully loading, the user agent must
@@ -38165,7 +38173,8 @@
 
   <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>
+  selection algorithm</a> with no manifest, passing in the
+  newly-created <code>Document</code>.</p>
 
   <p>After creating the <code>Document</code> object, but potentially
   before the page has been completely set up, the user agent must
@@ -48812,7 +48821,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>
 
@@ -48827,7 +48837,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>

Modified: source
===================================================================
--- source	2008-12-24 21:24:31 UTC (rev 2581)
+++ source	2008-12-24 22:03:16 UTC (rev 2582)
@@ -41795,28 +41795,34 @@
 
   <p>When the <dfn
   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:</p>
+  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:</p>
 
   <dl class="switch">
 
-   <dt>If the resource is not being loaded as part of navigation of a
+   <dt>If the document is not being loaded as part of navigation of a
    <span>browsing context</span></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">document.open()</code> and <code
+    title="dom-document-write">document.write()</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 <span>application cache update
@@ -41826,14 +41832,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 <span
     title="concept-appcache-foreign">foreign</span>.</p>
 
@@ -41850,20 +41856,20 @@
     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 <span
    title="concept-http-equivalent-get">or equivalent</span></dt> <dd>
 
     <ol>
 
      <li><p>If the manifest URL does not have the <span>same
-     origin</span> as the resource's own URL, then invoke the <span
+     origin</span> as the document, then invoke the <span
      title="concept-appcache-init-no-attribute">application cache
      selection algorithm</span> again, but without a manifest, and
      abort these steps.</p></li>
@@ -41871,7 +41877,7 @@
      <li><p>Otherwise, invoke the <span>application cache update
      process</span> for the given manifest URL, with the
      <span>browsing context</span> being navigated, and with the
-     resource's <code>Document</code> as the new <span
+     <code>Document</code> as the new <span
      title="concept-appcache-master">master</span> resource.</p></li>
 
     </ol>
@@ -41891,13 +41897,13 @@
   <p>When the <dfn
   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
-  <span>browsing context</span>, and the resource was fetched from a
-  particular <span>application cache</span>, then the user agent must
-  associate the <code>Document</code> with that application cache and
-  invoke the <span>application cache update process</span> for that
-  cache, with that <span>browsing context</span>. Otherwise, nothing
-  special happens.</p>
+  the document is being loaded as part of navigation of a
+  <span>browsing context</span>, and it was fetched from a particular
+  <span>application cache</span>, then the user agent must associate
+  the <code>Document</code> with that application cache and invoke the
+  <span>application cache update process</span> for that cache, with
+  that <span>browsing context</span>. Otherwise, nothing special
+  happens.</p>
 
 
 
@@ -43298,12 +43304,14 @@
   successful, must run the <span
   title="concept-appcache-init-with-attribute">application cache
   selection algorithm</span> with the resulting <span>absolute
-  URL</span> as the manifest URL. Otherwise, if the attribute is
-  absent or resolving it fails, then as soon as the root element is
-  <span title="insert an element into a document">inserted into the
+  URL</span> 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 <span
+  title="insert an element into a document">inserted into the
   document</span>, the user agent must run the <span
   title="concept-appcache-init-no-attribute">application cache
-  selection algorithm</span> with no manifest.</p>
+  selection algorithm</span> with no manifest, passing in the
+  <code>Document</code>.</p>
 
   <p class="note">Because the processing of the <code
   title="attr-html-manifest">manifest</code> attribute happens
@@ -43359,7 +43367,8 @@
   <p>Upon creation of the <code>Document</code> object, the user agent
   must run the <span
   title="concept-appcache-init-no-attribute">application cache
-  selection algorithm</span> with no manifest.</p>
+  selection algorithm</span> 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
@@ -43401,7 +43410,8 @@
   <p>Upon creation of the <code>Document</code> object, the user agent
   must run the <span
   title="concept-appcache-init-no-attribute">application cache
-  selection algorithm</span> with no manifest.</p>
+  selection algorithm</span> with no manifest, passing in the
+  newly-created <code>Document</code>.</p>
 
   <p>After creating the <code>Document</code> object, but potentially
   before the page has finished fully loading, the user agent must
@@ -43435,7 +43445,8 @@
   <p>Upon creation of the <code>Document</code> object, the user agent
   must run the <span
   title="concept-appcache-init-no-attribute">application cache
-  selection algorithm</span> with no manifest.</p>
+  selection algorithm</span> with no manifest, passing in the
+  newly-created <code>Document</code>.</p>
 
   <p>After creating the <code>Document</code> object, but potentially
   before the page has finished fully loading, the user agent must
@@ -43472,7 +43483,8 @@
   <p>Upon creation of the <code>Document</code> object, the user agent
   must run the <span
   title="concept-appcache-init-no-attribute">application cache
-  selection algorithm</span> with no manifest.</p>
+  selection algorithm</span> with no manifest, passing in the
+  newly-created <code>Document</code>.</p>
 
   <p>After creating the <code>Document</code> object, but potentially
   before the page has been completely set up, the user agent must
@@ -55692,7 +55704,8 @@
     URL</span>. Otherwise, if there is no such attribute or resolving
     it fails, run the <span
     title="concept-appcache-init-no-attribute">application cache
-    selection algorithm</span> with no manifest.</p>
+    selection algorithm</span> with no manifest. The algorithm must be
+    passed the <code>Document</code> object.</p>
 
     <p>Switch the <span>insertion mode</span> to "<span
     title="insertion mode: before head">before head</span>".</p>
@@ -55709,7 +55722,8 @@
 
     <p>Run the <span
     title="concept-appcache-init-no-attribute">application cache
-    selection algorithm</span> with no manifest.</p>
+    selection algorithm</span> with no manifest, passing it the
+    <code>Document</code> object.</p>
 
     <p>Switch the <span>insertion mode</span> to "<span
     title="insertion mode: before head">before head</span>", then




More information about the Commit-Watchers mailing list