hixie: Tidy up how 'abort' and 'emptied' events fire when you call load() while it's already loading. (whatwg r3756)

hixie: Tidy up how 'abort' and 'emptied' events fire when you call
load() while it's already loading. (whatwg r3756)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2925&r2=1.2926&f=h
http://html5.org/tools/web-apps-tracker?from=3755&to=3756

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2925
retrieving revision 1.2926
diff -u -d -r1.2925 -r1.2926
--- Overview.html 4 Sep 2009 20:48:41 -0000 1.2925
+++ Overview.html 4 Sep 2009 22:03:20 -0000 1.2926
@@ -18575,20 +18575,9 @@
 
    </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>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 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-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>Let <var title="">emptied</var> be false.</li>
 
    <li>
 
@@ -18614,11 +18603,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>
 
@@ -20474,7 +20481,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>.

Received on Friday, 4 September 2009 22:04:28 UTC