html5/spec Overview.html,1.1516,1.1517

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

Modified Files:
	Overview.html 
Log Message:
Make application caches work at the iframe level as well, not just whole-window level. This allows <iframe>s to contain gadgets from other hosts that are themselves cached. (whatwg r2344)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1516
retrieving revision 1.1517
diff -u -d -r1.1516 -r1.1517
--- Overview.html	16 Oct 2008 01:04:37 -0000	1.1516
+++ Overview.html	16 Oct 2008 01:39:53 -0000	1.1517
@@ -27320,16 +27320,14 @@
   chronological order).<p>Each group of application caches for the same manifest URL have a
   common <dfn id=concept-appcache-status title=concept-appcache-status>update status</dfn>,
   which is one of the following: <i>idle</i>, <i>checking</i>,
-  <i>downloading</i>.<p id=appcache-history-1>A <a href=#browsing-context>browsing context</a> can be
-  associated with an application cache. A <a href=#child-browsing-context>child browsing
-  context</a> is always associated with the same application cache
-  as its <a href=#parent-browsing-context>parent browsing context</a>, if any. A
-  <a href=#top-level-browsing-context>top-level browsing context</a> is associated with the
-  application cache appropriate for its <a href=#active-document>active
-  document</a>. (A browsing context's associated cache thus can <a href=#appcache-history-2>change</a> during <a href=#traverse-the-history title="traverse
-  the history">session history traversal</a>.)<p>A <code>Document</code> initially has no appropriate cache, but
-  steps <a href=#parser-appcache>in the parser</a> and in the <a href=#navigate title=navigate>navigation</a> sections cause <a href=#concept-appcache-init-with-attribute title=concept-appcache-init-with-attribute>cache selection</a>
-  to occur early in the page load process.<p>An application cache consists of:<ul><li>
+  <i>downloading</i>.<p id=appcache-history-1>A <a href=#browsing-context>browsing context</a> is
+  associated with the application cache appropriate for its
+  <a href=#active-document>active document</a>, if any. A <code>Document</code>
+  initially has no appropriate cache, but steps <a href=#parser-appcache>in the parser</a> and in the <a href=#navigate title=navigate>navigation</a> sections cause <a href=#concept-appcache-init-with-attribute title=concept-appcache-init-with-attribute>cache selection</a>
+  to occur early in the page load process. A browsing context's
+  associated cache can also <a href=#appcache-history-2>change</a>
+  during <a href=#traverse-the-history title="traverse the history">session history
+  traversal</a>.<p>An application cache consists of:<ul><li>
 
     <p>One of more resources (including their out-of-band metadata,
     such as HTTP headers, if any), identified by URLs, each falling
@@ -27784,11 +27782,12 @@
    <li>
 
     <p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-checking>checking</code> at the
-    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#top-level-browsing-context>top-level
-    browsing context</a> that is associated with a cache in <var title="">cache group</var>. The default action of this event
-    should be the display of some sort of user interface indicating to
-    the user that the user agent is checking for the availability of
-    updates.</p>
+    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#browsing-context>browsing
+    context</a> whose <a href=#active-document>active document</a> is associated
+    with a cache in <var title="">cache group</var>. The default
+    action of this event should be the display of some sort of user
+    interface indicating to the user that the user agent is checking
+    for the availability of updates.</p>
 
    </li>
 
@@ -27827,10 +27826,12 @@
     as "304 Not Modified" or equivalent, then run these substeps:</p>
 
     <ol><li><p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-noupdate>noupdate</code> at the
-     <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#top-level-browsing-context>top-level
-     browsing context</a> that is associated with a cache in <var title="">cache group</var>. The default action of this event
-     should be the display of some sort of user interface indicating
-     to the user that the application is up to date.</li>
+     <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#browsing-context>browsing
+     context</a> whose <a href=#active-document>active document</a> is associated
+     with a cache in <var title="">cache group</var>. The default
+     action of this event should be the display of some sort of user
+     interface indicating to the user that the application is up to
+     date.</li>
 
      <li><p>If there are any pending downloads of <span title="implicit entry">implicit entries</span> that are being
      stored in the cache, then wait for all of them to have
@@ -27853,10 +27854,12 @@
    of <var title="">cache group</var> to <i>downloading</i>.</li>
 
    <li><p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-downloading>downloading</code> at the
-   <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#top-level-browsing-context>top-level
-   browsing context</a> that is associated with a cache in <var title="">cache group</var>. The default action of this event should
-   be the display of some sort of user interface indicating to the
-   user that a new version is being downloaded.</li>
+   <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#browsing-context>browsing
+   context</a> whose <a href=#active-document>active document</a> is associated
+   with a cache in <var title="">cache group</var>. The default action
+   of this event should be the display of some sort of user interface
+   indicating to the user that a new version is being
+   downloaded.</li>
 
    <li><p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade
    attempt</a>, then let <var title="">new cache</var> be a newly
@@ -27894,12 +27897,13 @@
     more of the URLs at a time.</p>
 
     <ol><li><p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-progress><a href=#event-progress>progress</a></code> at the
-     <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#top-level-browsing-context>top-level
-     browsing context</a> that is associated with a cache in <var title="">cache group</var>. The default action of this event
-     should be the display of some sort of user interface indicating
-     to the user that a file is being downloaded in preparation for
-     updating the application.</li> <!-- XXX need to include
-     progress information -->
+     <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#browsing-context>browsing
+     context</a> whose <a href=#active-document>active document</a> is associated
+     with a cache in <var title="">cache group</var>. The default
+     action of this event should be the display of some sort of user
+     interface indicating to the user that a file is being downloaded
+     in preparation for updating the application.</li> <!-- XXX
+     need to include progress information -->
 
      <li>
 
@@ -27966,6 +27970,12 @@
      entry as a <a href=#concept-appcache-dynamic title=concept-appcache-dynamic>dynamic
      entry</a>.</li>
 
+     <li><p>As an optimization, if the resource is an HTML or XML file
+     whose root element is an <code><a href=#the-html-element>html</a></code> element with a <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute whose value
+     doesn't match the manifest URL of the application cache being
+     processed, then the user agent should mark the entry as being
+     <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>.</p>
+
     </ol></li>
 
    <li><p>Store <var title="">manifest</var> in <var title="">new
@@ -27985,7 +27995,7 @@
     entry">implicit entries</span> that are being stored in the cache
     to have completed.</p>
 
-    <p class=example>For example, if the <a href=#top-level-browsing-context>top-level browsing
+    <p class=example>For example, if the <a href=#browsing-context>browsing
     context</a>'s <a href=#active-document>active document</a> isn't itself listed
     in the cache manifest, then it might still be being
     downloaded.</p>
@@ -28008,11 +28018,12 @@
     manifest URL's caches with <var title="">cache</var>.</p>
 
     <p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-cached>cached</code> at the
-    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#top-level-browsing-context>top-level
-    browsing context</a> that is associated with a cache in <var title="">cache group</var>. The default action of this event
-    should be the display of some sort of user interface indicating to
-    the user that the application has been cached and that they can
-    now use it offline.</p>
+    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#browsing-context>browsing
+    context</a> whose <a href=#active-document>active document</a> is associated
+    with a cache in <var title="">cache group</var>. The default
+    action of this event should be the display of some sort of user
+    interface indicating to the user that the application has been
+    cached and that they can now use it offline.</p>
 
     <p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of
     <var title="">cache group</var> to <i>idle</i>.</p>
@@ -28024,11 +28035,12 @@
     <p>Otherwise, this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>:</p>
 
     <p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-updateready>updateready</code> at the
-    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#top-level-browsing-context>top-level
-    browsing context</a> that is associated with a cache in <var title="">cache group</var>. The default action of this event
-    should be the display of some sort of user interface indicating to
-    the user that a new version is available and that they can
-    activate it by reloading the page.</p>
+    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#browsing-context>browsing
+    context</a> whose <a href=#active-document>active document</a> is associated
+    with a cache in <var title="">cache group</var>. The default
+    action of this event should be the display of some sort of user
+    interface indicating to the user that a new version is available
+    and that they can activate it by reloading the page.</p>
 
     <p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of
     <var title="">cache group</var> to <i>idle</i>.</p>
@@ -28036,11 +28048,12 @@
    </li>
 
   </ol><p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:<ol><li><p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-error><a href=#event-error>error</a></code> at the
-   <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#top-level-browsing-context>top-level
-   browsing context</a> that is associated with a cache in <var title="">cache group</var>. The default action of this event should
-   be the display of some sort of user interface indicating to the
-   user that the user agent failed to save the application for offline
-   use.</li>
+   <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#browsing-context>browsing
+   context</a> whose <a href=#active-document>active document</a> is associated
+   with a cache in <var title="">cache group</var>. The default action
+   of this event should be the display of some sort of user interface
+   indicating to the user that the user agent failed to save the
+   application for offline use.</li>
 
    <li><p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
    attempt</a>, then discard <var title="">cache</var> and abort
@@ -28079,23 +28092,14 @@
   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
-   <a href=#top-level-browsing-context>top-level browsing context</a></dt>
+   <a href=#browsing-context>browsing context</a></dt>
 
    <dd>
-
-    <p>As an optimization, if the resource was loaded from an
-    <a href=#application-cache>application cache</a>, and the manifest URL of that cache
-    doesn't match the manifest URL with which the algorithm was
-    invoked, then the user agent should mark the entry in that
-    application cache corresponding to the resource that was just
-    loaded as being <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>.</p>
-
-    <p>Other than that, nothing special happens with respect to
-    application caches.</p>
-
+    <p>Do nothing.</p>
    </dd>
 
-   <!-- otherwise, we're talking top-level browsing contexts only: -->
+
+   <!-- 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
@@ -28189,16 +28193,44 @@
 
   </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,
-  then: if the resource is being loaded as part of navigation of a
-  <a href=#top-level-browsing-context>top-level 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; otherwise, nothing special happens
-  with respect to application caches.<h5 id=changesToNetworkingModel><span class=secno>5.7.5.1 </span>Changes to the networking model</h5><p>When a browsing context is associated with an <a href=#application-cache>application
-  cache</a>, any and all resource loads must go through the
-  following steps instead of immediately invoking the mechanisms
-  appropriate to that resource's scheme:<ol><li><p>If the resource is not to be fetched using the HTTP GET
+  then the user agent must run the first applicable set of steps from
+  the following list:<dl><dt>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></dt>
+
+   <dd>
+
+    <p>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.
+
+   </dd>
+
+   <dt>If the resource is being loaded as part of navigation of a
+   <a href=#child-browsing-context>child browsing context</a></dt>
+
+   <dd>
+
+    <!-- e.g. iframes to online whitelisted resources -->
+
+    <p>The user agent must associate the <code>Document</code> with
+    that application cache associated with the <a href=#active-document>active
+    document</a> of the <a href=#parent-browsing-context>parent browsing context</a>.</p>
+
+   </dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>
+
+    <p>Nothing special happens with respect to application caches.</p>
+
+   </dd>
+
+  </dl><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 resource loads must go
+  through the following steps instead of immediately invoking the
+  mechanisms appropriate to that resource's scheme:<ol><li><p>If the resource is not to be fetched using the HTTP GET
    mechanism or equivalent, then <a href=#fetch>fetch</a> the resource
    normally and abort these steps.</li>
 
@@ -28847,13 +28879,11 @@
    <li>
 
     <p>If the new resource is to be fetched using HTTP GET or
-    equivalent, and if the browsing context being navigated is a
-    <a href=#top-level-browsing-context>top-level browsing context</a>, then check if there are
-    any <a href=#application-cache title="application cache">application caches</a> that
-    have a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>
-    with the <a href=#same-origin>same origin</a> as the URL in question, and that
-    have this URL as one of their entries (excluding entries marked as
-    <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>), and that
+    equivalent, then check if there are any <a href=#application-cache title="application
+    cache">application caches</a> that have a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> with the
+    <a href=#same-origin>same origin</a> as the URL in question, and that have
+    this URL as one of their entries, excluding entries marked as
+    <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and that
     already contain their manifest, categorized as a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>. If so, then the
     user agent must then get the resource from the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application
     cache</a> of those that match.</p>
@@ -28900,13 +28930,12 @@
     and its URL <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches the fallback
     namespace</a> of one or more application caches, and the user
     didn't cancel the navigation attempt during the previous step, and
-    the browsing context being navigated is a <a href=#top-level-browsing-context>top-level browsing
-    context</a>, and the navigation attempt failed (e.g. the server
-    returned a 4xx or 5xx status code or equivalent, or there was a
-    DNS error), then:</p> <!-- note that a redirect can never reach
-    this point as it is handled earlier, meaning that a captive portal
-    captures URLs in fallback namespaces and you can't ever get to the
-    fallback file of a resource if you have a captive portal -->
+    the navigation attempt failed (e.g. the server returned a 4xx or
+    5xx status code or equivalent, or there was a DNS error),
+    then:</p> <!-- note that a redirect can never reach this point as
+    it is handled earlier, meaning that a captive portal captures URLs
+    in fallback namespaces and you can't ever get to the fallback file
+    of a resource if you have a captive portal -->
 
     <p>Let <var title="">candidate</var> be the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback resource</a>
     specified for the <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespace</a> in

Received on Thursday, 16 October 2008 01:40:06 UTC