[html5] r8751 - [giow] (3) appcache: coalesce queued progress events. Fixing https://www.w3.org/ [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Sep 5 14:55:34 PDT 2014


Author: ianh
Date: 2014-09-05 14:55:29 -0700 (Fri, 05 Sep 2014)
New Revision: 8751

Modified:
   complete.html
   index
   source
Log:
[giow] (3) appcache: coalesce queued progress events.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17688
Affected topics: Offline Web Applications

Modified: complete.html
===================================================================
--- complete.html	2014-09-05 20:47:46 UTC (rev 8750)
+++ complete.html	2014-09-05 21:55:29 UTC (rev 8751)
@@ -61274,7 +61274,7 @@
       lesser-used resources first.</p>
 
      <li><p>For each <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-16>cache host</a> associated with an <a href=#application-cache id=downloading-or-updating-an-application-cache:application-cache-14>application cache</a> in
-     <var>cache group</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-8>queue a post-load task</a> to <a href=#concept-event-fire id=downloading-or-updating-an-application-cache:concept-event-fire>fire</a> a <a href=#concept-events-trusted id=downloading-or-updating-an-application-cache:concept-events-trusted>trusted</a>
+     <var>cache group</var>, <a href=#queue-a-progress-post-load-task id=downloading-or-updating-an-application-cache:queue-a-progress-post-load-task>queue a progress post-load task</a> to <a href=#concept-event-fire id=downloading-or-updating-an-application-cache:concept-event-fire>fire</a> a <a href=#concept-events-trusted id=downloading-or-updating-an-application-cache:concept-events-trusted>trusted</a>
      event with the name <code id=downloading-or-updating-an-application-cache:event-appcache-progress><a href=#event-appcache-progress>progress</a></code>, which does not
      bubble, which is cancelable, and which uses the <code id=downloading-or-updating-an-application-cache:progressevent><a href=#progressevent>ProgressEvent</a></code> interface, at the
      <code id=downloading-or-updating-an-application-cache:applicationcache-11><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-17>cache host</a>. The <code id=downloading-or-updating-an-application-cache:dom-progressevent-lengthcomputable><a href=#dom-progressevent-lengthcomputable>lengthComputable</a></code> attribute must be set to
@@ -61365,7 +61365,7 @@
 
     </ol>
 
-   <li><p>For each <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-18>cache host</a> associated with an <a href=#application-cache id=downloading-or-updating-an-application-cache:application-cache-17>application cache</a> in <var>cache group</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-9>queue a post-load task</a> to <a href=#concept-event-fire id=downloading-or-updating-an-application-cache:concept-event-fire-2>fire</a> a <a href=#concept-events-trusted id=downloading-or-updating-an-application-cache:concept-events-trusted-2>trusted</a>
+   <li><p>For each <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-18>cache host</a> associated with an <a href=#application-cache id=downloading-or-updating-an-application-cache:application-cache-17>application cache</a> in <var>cache group</var>, <a href=#queue-a-progress-post-load-task id=downloading-or-updating-an-application-cache:queue-a-progress-post-load-task-2>queue a progress post-load task</a> to <a href=#concept-event-fire id=downloading-or-updating-an-application-cache:concept-event-fire-2>fire</a> a <a href=#concept-events-trusted id=downloading-or-updating-an-application-cache:concept-events-trusted-2>trusted</a>
    event with the name <code id=downloading-or-updating-an-application-cache:event-appcache-progress-2><a href=#event-appcache-progress>progress</a></code>, which does not bubble,
    which is cancelable, and which uses the <code id=downloading-or-updating-an-application-cache:progressevent-2><a href=#progressevent>ProgressEvent</a></code> interface, at the
    <code id=downloading-or-updating-an-application-cache:applicationcache-12><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-19>cache host</a>. The <code id=downloading-or-updating-an-application-cache:dom-progressevent-lengthcomputable-2><a href=#dom-progressevent-lengthcomputable>lengthComputable</a></code> attribute must be set to
@@ -61387,7 +61387,7 @@
     "no-store" cache directive, then run these substeps:</p>
 
     <ol><li><p>Unassociate the <code id=downloading-or-updating-an-application-cache:document-7><a href=#document>Document</a></code> for this entry from <var>new
-     cache</var>.<li><p><a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-10>Queue a post-load task</a> to <a href=#fire-a-simple-event id=downloading-or-updating-an-application-cache:fire-a-simple-event-10>fire a simple event</a> that is
+     cache</var>.<li><p><a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-8>Queue a post-load task</a> to <a href=#fire-a-simple-event id=downloading-or-updating-an-application-cache:fire-a-simple-event-10>fire a simple event</a> that is
      cancelable named <code id=downloading-or-updating-an-application-cache:event-appcache-error-3><a href=#event-appcache-error>error</a></code> at the
      <code id=downloading-or-updating-an-application-cache:applicationcache-13><a href=#applicationcache>ApplicationCache</a></code> singleton of the <code id=downloading-or-updating-an-application-cache:document-8><a href=#document>Document</a></code> for this entry, if there
      still is one. The default action of this event must be, if the user agent <a href=#shows-caching-progress id=downloading-or-updating-an-application-cache:shows-caching-progress-12>shows caching
@@ -61459,7 +61459,7 @@
 
    <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
    progress.<li><p>Set the <a href=#concept-appcache-status id=downloading-or-updating-an-application-cache:concept-appcache-status-8>update status</a> of <var>cache
-   group</var> to <i>idle</i>.<li><p>For each <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-13>task</a> in <var>task list</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-11>queue that task as a post-load task</a>.</ol>
+   group</var> to <i>idle</i>.<li><p>For each <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-13>task</a> in <var>task list</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-9>queue that task as a post-load task</a>.</ol>
 
   <p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:</p>
 
@@ -61496,7 +61496,7 @@
    progress.<li><p>Let the <a href=#concept-appcache-status id=downloading-or-updating-an-application-cache:concept-appcache-status-9>status</a> of <var>cache
    group</var> be <i>idle</i>.<li><p>If this was a <a href=#concept-appcache-cache id=downloading-or-updating-an-application-cache:concept-appcache-cache-4>cache attempt</a>, discard <var>cache group</var> altogether.</p>
 
-   <li><p>For each <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-17>task</a> in <var>task list</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-12>queue that task as a post-load task</a>.<li><p>Abort the <a href=#application-cache-download-process id=downloading-or-updating-an-application-cache:application-cache-download-process-11>application cache download process</a>.</ol>
+   <li><p>For each <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-17>task</a> in <var>task list</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-10>queue that task as a post-load task</a>.<li><p>Abort the <a href=#application-cache-download-process id=downloading-or-updating-an-application-cache:application-cache-download-process-11>application cache download process</a>.</ol>
 
   <p>Attempts to <a href=#fetch id=downloading-or-updating-an-application-cache:fetch-6>fetch</a> resources as part of the <a href=#application-cache-download-process id=downloading-or-updating-an-application-cache:application-cache-download-process-12>application cache download
   process</a> may be done with cache-defeating semantics, to avoid problems with stale or
@@ -61524,7 +61524,16 @@
    <a href=#ready-for-post-load-tasks id=downloading-or-updating-an-application-cache:ready-for-post-load-tasks>ready for post-load tasks</a><dd><p><a href=#queue-a-task id=downloading-or-updating-an-application-cache:queue-a-task>Queue</a> the task <var>task</var>.<dt>Otherwise<dd><p>Add <var>task</var> to <var>target</var>'s <a id=downloading-or-updating-an-application-cache:node-document-2 href=http://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a>'s list
    of <a href=#pending-application-cache-download-process-tasks id=downloading-or-updating-an-application-cache:pending-application-cache-download-process-tasks>pending application cache download process tasks</a>.</dl>
 
-  <p>The <a href=#task-source id=downloading-or-updating-an-application-cache:task-source>task source</a> for these <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-19>tasks</a> is the
+  <p>When the steps above say to <dfn id=queue-a-progress-post-load-task>queue a progress post-load task</dfn> <var>task</var>, where
+  <var>task</var> is a <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-19>task</a> that dispatches an event on a
+  target <code id=downloading-or-updating-an-application-cache:applicationcache-19><a href=#applicationcache>ApplicationCache</a></code> object <var>target</var>, the user agent must run
+  the following steps:</p>
+
+  <ol><li><p>If there is a <var>task</var> in <var>target</var>'s <a id=downloading-or-updating-an-application-cache:node-document-3 href=http://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a>'s list
+   of <a href=#pending-application-cache-download-process-tasks id=downloading-or-updating-an-application-cache:pending-application-cache-download-process-tasks-2>pending application cache download process tasks</a> that is labeled as a
+   <i>progress task</i>, then remove that task from the list.<li><p>Label <var>task</var> as a <i>progress task</i>.<li><p><a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-11>Queue a post-load task</a> <var>task</var>.</ol>
+
+  <p>The <a href=#task-source id=downloading-or-updating-an-application-cache:task-source>task source</a> for these <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-20>tasks</a> is the
   <a href=#networking-task-source id=downloading-or-updating-an-application-cache:networking-task-source>networking task source</a>.</p>
 
 

Modified: index
===================================================================
--- index	2014-09-05 20:47:46 UTC (rev 8750)
+++ index	2014-09-05 21:55:29 UTC (rev 8751)
@@ -61274,7 +61274,7 @@
       lesser-used resources first.</p>
 
      <li><p>For each <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-16>cache host</a> associated with an <a href=#application-cache id=downloading-or-updating-an-application-cache:application-cache-14>application cache</a> in
-     <var>cache group</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-8>queue a post-load task</a> to <a href=#concept-event-fire id=downloading-or-updating-an-application-cache:concept-event-fire>fire</a> a <a href=#concept-events-trusted id=downloading-or-updating-an-application-cache:concept-events-trusted>trusted</a>
+     <var>cache group</var>, <a href=#queue-a-progress-post-load-task id=downloading-or-updating-an-application-cache:queue-a-progress-post-load-task>queue a progress post-load task</a> to <a href=#concept-event-fire id=downloading-or-updating-an-application-cache:concept-event-fire>fire</a> a <a href=#concept-events-trusted id=downloading-or-updating-an-application-cache:concept-events-trusted>trusted</a>
      event with the name <code id=downloading-or-updating-an-application-cache:event-appcache-progress><a href=#event-appcache-progress>progress</a></code>, which does not
      bubble, which is cancelable, and which uses the <code id=downloading-or-updating-an-application-cache:progressevent><a href=#progressevent>ProgressEvent</a></code> interface, at the
      <code id=downloading-or-updating-an-application-cache:applicationcache-11><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-17>cache host</a>. The <code id=downloading-or-updating-an-application-cache:dom-progressevent-lengthcomputable><a href=#dom-progressevent-lengthcomputable>lengthComputable</a></code> attribute must be set to
@@ -61365,7 +61365,7 @@
 
     </ol>
 
-   <li><p>For each <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-18>cache host</a> associated with an <a href=#application-cache id=downloading-or-updating-an-application-cache:application-cache-17>application cache</a> in <var>cache group</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-9>queue a post-load task</a> to <a href=#concept-event-fire id=downloading-or-updating-an-application-cache:concept-event-fire-2>fire</a> a <a href=#concept-events-trusted id=downloading-or-updating-an-application-cache:concept-events-trusted-2>trusted</a>
+   <li><p>For each <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-18>cache host</a> associated with an <a href=#application-cache id=downloading-or-updating-an-application-cache:application-cache-17>application cache</a> in <var>cache group</var>, <a href=#queue-a-progress-post-load-task id=downloading-or-updating-an-application-cache:queue-a-progress-post-load-task-2>queue a progress post-load task</a> to <a href=#concept-event-fire id=downloading-or-updating-an-application-cache:concept-event-fire-2>fire</a> a <a href=#concept-events-trusted id=downloading-or-updating-an-application-cache:concept-events-trusted-2>trusted</a>
    event with the name <code id=downloading-or-updating-an-application-cache:event-appcache-progress-2><a href=#event-appcache-progress>progress</a></code>, which does not bubble,
    which is cancelable, and which uses the <code id=downloading-or-updating-an-application-cache:progressevent-2><a href=#progressevent>ProgressEvent</a></code> interface, at the
    <code id=downloading-or-updating-an-application-cache:applicationcache-12><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host id=downloading-or-updating-an-application-cache:cache-host-19>cache host</a>. The <code id=downloading-or-updating-an-application-cache:dom-progressevent-lengthcomputable-2><a href=#dom-progressevent-lengthcomputable>lengthComputable</a></code> attribute must be set to
@@ -61387,7 +61387,7 @@
     "no-store" cache directive, then run these substeps:</p>
 
     <ol><li><p>Unassociate the <code id=downloading-or-updating-an-application-cache:document-7><a href=#document>Document</a></code> for this entry from <var>new
-     cache</var>.<li><p><a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-10>Queue a post-load task</a> to <a href=#fire-a-simple-event id=downloading-or-updating-an-application-cache:fire-a-simple-event-10>fire a simple event</a> that is
+     cache</var>.<li><p><a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-8>Queue a post-load task</a> to <a href=#fire-a-simple-event id=downloading-or-updating-an-application-cache:fire-a-simple-event-10>fire a simple event</a> that is
      cancelable named <code id=downloading-or-updating-an-application-cache:event-appcache-error-3><a href=#event-appcache-error>error</a></code> at the
      <code id=downloading-or-updating-an-application-cache:applicationcache-13><a href=#applicationcache>ApplicationCache</a></code> singleton of the <code id=downloading-or-updating-an-application-cache:document-8><a href=#document>Document</a></code> for this entry, if there
      still is one. The default action of this event must be, if the user agent <a href=#shows-caching-progress id=downloading-or-updating-an-application-cache:shows-caching-progress-12>shows caching
@@ -61459,7 +61459,7 @@
 
    <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
    progress.<li><p>Set the <a href=#concept-appcache-status id=downloading-or-updating-an-application-cache:concept-appcache-status-8>update status</a> of <var>cache
-   group</var> to <i>idle</i>.<li><p>For each <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-13>task</a> in <var>task list</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-11>queue that task as a post-load task</a>.</ol>
+   group</var> to <i>idle</i>.<li><p>For each <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-13>task</a> in <var>task list</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-9>queue that task as a post-load task</a>.</ol>
 
   <p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:</p>
 
@@ -61496,7 +61496,7 @@
    progress.<li><p>Let the <a href=#concept-appcache-status id=downloading-or-updating-an-application-cache:concept-appcache-status-9>status</a> of <var>cache
    group</var> be <i>idle</i>.<li><p>If this was a <a href=#concept-appcache-cache id=downloading-or-updating-an-application-cache:concept-appcache-cache-4>cache attempt</a>, discard <var>cache group</var> altogether.</p>
 
-   <li><p>For each <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-17>task</a> in <var>task list</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-12>queue that task as a post-load task</a>.<li><p>Abort the <a href=#application-cache-download-process id=downloading-or-updating-an-application-cache:application-cache-download-process-11>application cache download process</a>.</ol>
+   <li><p>For each <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-17>task</a> in <var>task list</var>, <a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-10>queue that task as a post-load task</a>.<li><p>Abort the <a href=#application-cache-download-process id=downloading-or-updating-an-application-cache:application-cache-download-process-11>application cache download process</a>.</ol>
 
   <p>Attempts to <a href=#fetch id=downloading-or-updating-an-application-cache:fetch-6>fetch</a> resources as part of the <a href=#application-cache-download-process id=downloading-or-updating-an-application-cache:application-cache-download-process-12>application cache download
   process</a> may be done with cache-defeating semantics, to avoid problems with stale or
@@ -61524,7 +61524,16 @@
    <a href=#ready-for-post-load-tasks id=downloading-or-updating-an-application-cache:ready-for-post-load-tasks>ready for post-load tasks</a><dd><p><a href=#queue-a-task id=downloading-or-updating-an-application-cache:queue-a-task>Queue</a> the task <var>task</var>.<dt>Otherwise<dd><p>Add <var>task</var> to <var>target</var>'s <a id=downloading-or-updating-an-application-cache:node-document-2 href=http://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a>'s list
    of <a href=#pending-application-cache-download-process-tasks id=downloading-or-updating-an-application-cache:pending-application-cache-download-process-tasks>pending application cache download process tasks</a>.</dl>
 
-  <p>The <a href=#task-source id=downloading-or-updating-an-application-cache:task-source>task source</a> for these <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-19>tasks</a> is the
+  <p>When the steps above say to <dfn id=queue-a-progress-post-load-task>queue a progress post-load task</dfn> <var>task</var>, where
+  <var>task</var> is a <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-19>task</a> that dispatches an event on a
+  target <code id=downloading-or-updating-an-application-cache:applicationcache-19><a href=#applicationcache>ApplicationCache</a></code> object <var>target</var>, the user agent must run
+  the following steps:</p>
+
+  <ol><li><p>If there is a <var>task</var> in <var>target</var>'s <a id=downloading-or-updating-an-application-cache:node-document-3 href=http://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a>'s list
+   of <a href=#pending-application-cache-download-process-tasks id=downloading-or-updating-an-application-cache:pending-application-cache-download-process-tasks-2>pending application cache download process tasks</a> that is labeled as a
+   <i>progress task</i>, then remove that task from the list.<li><p>Label <var>task</var> as a <i>progress task</i>.<li><p><a href=#queue-a-post-load-task id=downloading-or-updating-an-application-cache:queue-a-post-load-task-11>Queue a post-load task</a> <var>task</var>.</ol>
+
+  <p>The <a href=#task-source id=downloading-or-updating-an-application-cache:task-source>task source</a> for these <a href=#concept-task id=downloading-or-updating-an-application-cache:concept-task-20>tasks</a> is the
   <a href=#networking-task-source id=downloading-or-updating-an-application-cache:networking-task-source>networking task source</a>.</p>
 
 

Modified: source
===================================================================
--- source	2014-09-05 20:47:46 UTC (rev 8750)
+++ source	2014-09-05 21:55:29 UTC (rev 8751)
@@ -82813,7 +82813,7 @@
      </li>
 
      <li><p>For each <span>cache host</span> associated with an <span>application cache</span> in
-     <var>cache group</var>, <span>queue a post-load task</span> to <span
+     <var>cache group</var>, <span>queue a progress post-load task</span> to <span
      data-x="concept-event-fire">fire</span> a <span data-x="concept-events-trusted">trusted</span>
      event with the name <code data-x="event-appcache-progress">progress</code>, which does not
      bubble, which is cancelable, and which uses the <code>ProgressEvent</code> interface, at the
@@ -82945,7 +82945,7 @@
 
    </li>
 
-   <li><p>For each <span>cache host</span> associated with an <span>application cache</span> in <var>cache group</var>, <span>queue a post-load task</span> to <span
+   <li><p>For each <span>cache host</span> associated with an <span>application cache</span> in <var>cache group</var>, <span>queue a progress post-load task</span> to <span
    data-x="concept-event-fire">fire</span> a <span data-x="concept-events-trusted">trusted</span>
    event with the name <code data-x="event-appcache-progress">progress</code>, which does not bubble,
    which is cancelable, and which uses the <code>ProgressEvent</code> interface, at the
@@ -83192,6 +83192,23 @@
 
   </dl>
 
+  <p>When the steps above say to <dfn>queue a progress post-load task</dfn> <var>task</var>, where
+  <var>task</var> is a <span data-x="concept-task">task</span> that dispatches an event on a
+  target <code>ApplicationCache</code> object <var>target</var>, the user agent must run
+  the following steps:</p>
+
+  <ol>
+
+   <li><p>If there is a <var>task</var> in <var>target</var>'s <span>node document</span>'s list
+   of <span>pending application cache download process tasks</span> that is labeled as a
+   <i>progress task</i>, then remove that task from the list.</p></li>
+
+   <li><p>Label <var>task</var> as a <i>progress task</i>.</p></li>
+
+   <li><p><span>Queue a post-load task</span> <var>task</var>.</p></li>
+
+  </ol>
+
   <p>The <span>task source</span> for these <span data-x="concept-task">tasks</span> is the
   <span>networking task source</span>.</p>
 



More information about the Commit-Watchers mailing list