[html5] r3756 - [gw] (2) Tidy up how 'abort' and 'emptied' events fire when you call load() whil [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Sep 4 15:06:43 PDT 2009


Author: ianh
Date: 2009-09-04 15:06:42 -0700 (Fri, 04 Sep 2009)
New Revision: 3756

Modified:
   index
   source
Log:
[gw] (2) Tidy up how 'abort' and 'emptied' events fire when you call load() while it's already loading.

Modified: index
===================================================================
--- index	2009-09-04 20:52:01 UTC (rev 3755)
+++ index	2009-09-04 22:06:42 UTC (rev 3756)
@@ -21325,21 +21325,10 @@
 
    </li>
 
-   <li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is set to <code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code> or <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>, set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute to a new
-   <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to <code title=dom-MediaError-MEDIA_ERR_ABORTED><a href=#dom-mediaerror-media_err_aborted>MEDIA_ERR_ABORTED</a></code>,
-   <a href=#fire-a-progress-event>fire a progress event</a> called <code title=event-abort><a href=#event-abort>abort</a></code> at the <a href=#media-element>media element</a>,
-   in the context of the <a href=#fetch title=fetch>fetching process</a>
-   that is in progress for the element, and <a href=#fire-a-progress-event>fire a progress
-   event</a> called <code title=event-loadend><a href=#event-loadend>loadend</a></code> at
-   the <a href=#media-element>media element</a>, in the context of the same <a href=#fetch title=fetch>fetching process</a>.</li>
+   <li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is set to <code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code> or <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>, let <var title="">aborted</var> be true; otherwise, let <var title="">aborted</var> be false.</li>
 
-   <li><p>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute
-   to null and the <a href=#autoplaying-flag>autoplaying flag</a> to true.</li>
+   <li><p>Let <var title="">emptied</var> be false.</li>
 
-   <li><p>Set the <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> attribute to the
-   value of the <code title=dom-media-defaultPlaybackRate><a href=#dom-media-defaultplaybackrate>defaultPlaybackRate</a></code>
-   attribute.</li>
-
    <li>
 
     <p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is not set to
@@ -21364,11 +21353,29 @@
 
      <li>Set the <a href=#current-playback-position>current playback position</a> to 0.</li>
 
-     <li><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-emptied><a href=#event-emptied>emptied</a></code> at the <a href=#media-element>media
-     element</a>.</li>
+     <li>Let <var title="">emptied</var> be true.</li>
 
     </ol></li>
 
+   <li><p>Set the <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> attribute to the
+   value of the <code title=dom-media-defaultPlaybackRate><a href=#dom-media-defaultplaybackrate>defaultPlaybackRate</a></code>
+   attribute.</li>
+
+   <li>If <var title="">aborted</var> is true, set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute to a new
+   <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to <code title=dom-MediaError-MEDIA_ERR_ABORTED><a href=#dom-mediaerror-media_err_aborted>MEDIA_ERR_ABORTED</a></code>,
+   <a href=#fire-a-progress-event>fire a progress event</a> called <code title=event-abort><a href=#event-abort>abort</a></code> at the <a href=#media-element>media element</a>,
+   in the context of the <a href=#fetch title=fetch>fetching process</a>
+   that is in progress for the element, and <a href=#fire-a-progress-event>fire a progress
+   event</a> called <code title=event-loadend><a href=#event-loadend>loadend</a></code> at
+   the <a href=#media-element>media element</a>, in the context of the same <a href=#fetch title=fetch>fetching process</a>.</li>
+
+   <li><p>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute
+   to null and the <a href=#autoplaying-flag>autoplaying flag</a> to true.</li>
+
+   <li><p>If <var title="">emptied</var> is true, <a href=#fire-a-simple-event>fire a simple
+   event</a> called <code title=event-emptied><a href=#event-emptied>emptied</a></code> at
+   the <a href=#media-element>media element</a>.</li>
+
    <li><p>Invoke the <a href=#media-element>media element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
    algorithm</a>.</li>
 
@@ -23303,7 +23310,7 @@
      <td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
      <td>The user agent stops fetching the <a href=#media-data>media data</a> before it is completely downloaded, but not due to an error.
      <td><code title=dom-media-error><a href=#dom-media-error>error</a></code> is an object with the code <code title=dom-MediaError-MEDIA_ERR_ABORTED><a href=#dom-mediaerror-media_err_aborted>MEDIA_ERR_ABORTED</a></code>.
-         <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals either <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> or <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>, depending on when the download was aborted.
+         <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals either <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> or <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>, depending on when the download was aborted.
     <tr><td><dfn id=event-error title=event-error><code>error</code></dfn>
      <td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
      <td>An error occurs while fetching the <a href=#media-data>media data</a>.

Modified: source
===================================================================
--- source	2009-09-04 20:52:01 UTC (rev 3755)
+++ source	2009-09-04 22:06:42 UTC (rev 3756)
@@ -23014,28 +23014,12 @@
    <li><p>If the <span>media element</span>'s <code
    title="dom-media-networkState">networkState</code> is set to <code
    title="dom-media-NETWORK_LOADING">NETWORK_LOADING</code> or <code
-   title="dom-media-NETWORK_IDLE">NETWORK_IDLE</code>, set the <code
-   title="dom-media-error">error</code> attribute to a new
-   <code>MediaError</code> object whose <code
-   title="dom-MediaError-code">code</code> attribute is set to <code
-   title="dom-MediaError-MEDIA_ERR_ABORTED">MEDIA_ERR_ABORTED</code>,
-   <span>fire a progress event</span> called <code
-   title="event-abort">abort</code> at the <span>media element</span>,
-   in the context of the <span title="fetch">fetching process</span>
-   that is in progress for the element, and <span>fire a progress
-   event</span> called <code title="event-loadend">loadend</code> at
-   the <span>media element</span>, in the context of the same <span
-   title="fetch">fetching process</span>.</p></li>
+   title="dom-media-NETWORK_IDLE">NETWORK_IDLE</code>, let <var
+   title="">aborted</var> be true; otherwise, let <var
+   title="">aborted</var> be false.</p></li>
 
-   <li><p>Set the <code title="dom-media-error">error</code> attribute
-   to null and the <span>autoplaying flag</span> to true.</p></li>
+   <li><p>Let <var title="">emptied</var> be false.</p></li>
 
-   <li><p>Set the <code
-   title="dom-media-playbackRate">playbackRate</code> attribute to the
-   value of the <code
-   title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code>
-   attribute.</p></li>
-
    <li>
 
     <p>If the <span>media element</span>'s <code
@@ -23065,14 +23049,38 @@
 
      <li>Set the <span>current playback position</span> to 0.</li>
 
-     <li><span>Fire a simple event</span> called <code
-     title="event-emptied">emptied</code> at the <span>media
-     element</span>.</li>
+     <li>Let <var title="">emptied</var> be true.</li>
 
     </ol>
 
    </li>
 
+   <li><p>Set the <code
+   title="dom-media-playbackRate">playbackRate</code> attribute to the
+   value of the <code
+   title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code>
+   attribute.</p></li>
+
+   <li>If <var title="">aborted</var> is true, set the <code
+   title="dom-media-error">error</code> attribute to a new
+   <code>MediaError</code> object whose <code
+   title="dom-MediaError-code">code</code> attribute is set to <code
+   title="dom-MediaError-MEDIA_ERR_ABORTED">MEDIA_ERR_ABORTED</code>,
+   <span>fire a progress event</span> called <code
+   title="event-abort">abort</code> at the <span>media element</span>,
+   in the context of the <span title="fetch">fetching process</span>
+   that is in progress for the element, and <span>fire a progress
+   event</span> called <code title="event-loadend">loadend</code> at
+   the <span>media element</span>, in the context of the same <span
+   title="fetch">fetching process</span>.</p></li>
+
+   <li><p>Set the <code title="dom-media-error">error</code> attribute
+   to null and the <span>autoplaying flag</span> to true.</p></li>
+
+   <li><p>If <var title="">emptied</var> is true, <span>fire a simple
+   event</span> called <code title="event-emptied">emptied</code> at
+   the <span>media element</span>.</p></li>
+
    <li><p>Invoke the <span>media element</span>'s <span
    title="concept-media-load-algorithm">resource selection
    algorithm</span>.</li>
@@ -25370,7 +25378,7 @@
      <td><code>ProgressEvent</code> <a href="#refsPROGRESS">[PROGRESS]</a>
      <td>The user agent stops fetching the <span>media data</span> before it is completely downloaded, but not due to an error.
      <td><code title="dom-media-error">error</code> is an object with the code <code title="dom-MediaError-MEDIA_ERR_ABORTED">MEDIA_ERR_ABORTED</code>.
-         <code title="dom-media-networkState">networkState</code> equals either <code title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code> or <code title="dom-media-NETWORK_LOADED">NETWORK_LOADED</code>, depending on when the download was aborted.
+         <code title="dom-media-networkState">networkState</code> equals either <code title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code> or <code title="dom-media-NETWORK_IDLE">NETWORK_IDLE</code>, depending on when the download was aborted.
     <tr>
      <td><dfn title="event-error"><code>error</code></dfn>
      <td><code>ProgressEvent</code> <a href="#refsPROGRESS">[PROGRESS]</a>




More information about the Commit-Watchers mailing list