html5/spec Overview.html,1.1507,1.1508

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

Modified Files:
	Overview.html 
Log Message:
Clean up event dispatch issues in the media element section. (there were some asychronous event dispatches without event loops) (whatwg r2335)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1507
retrieving revision 1.1508
diff -u -d -r1.1507 -r1.1508
--- Overview.html	15 Oct 2008 21:01:51 -0000	1.1507
+++ Overview.html	15 Oct 2008 21:13:50 -0000	1.1508
@@ -13745,9 +13745,9 @@
    <li><p>If the element's <a href=#begun-flag>begun flag</a> is true, then the
    <a href=#begun-flag>begun flag</a> must be set to false, the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute must be set 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>,
-   and the user agent must synchronously <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>.</li>
+   and the user agent must <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>.</li>
 
    <li><p>The <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute
    must be set to null and the <a href=#autoplaying-flag>autoplaying flag</a> must be
@@ -13787,14 +13787,14 @@
      <li>The <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> DOM
      attribute must be set to 0.</li>
 
-     <!--<li>The user agent must synchronously <span>fire a simple
-     event</span> at the <span>media element</span> for each event
-     name in <var title="">events</var>, in the same order that they
-     were added to that list.</li>-->
+     <!--<li>The user agent must <span>fire a simple event</span> at
+     the <span>media element</span> for each event name in <var
+     title="">events</var>, in the same order that they were added to
+     that list.</li>-->
 
-     <li>The user agent must synchronously <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>The user agent must <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>
 
     </ol></li>
 
@@ -13810,13 +13810,16 @@
    returning the new value.</li>
 
    <li><p>The user agent must then set the <a href=#begun-flag>begun flag</a> to
-   true and synchronously <a href=#fire-a-progress-event>fire a progress event</a> called
-   <code title=event-loadstart><a href=#event-loadstart>loadstart</a></code> at the <a href=#media-element>media
+   true and <a href=#fire-a-progress-event>fire a progress event</a> called <code title=event-loadstart><a href=#event-loadstart>loadstart</a></code> at the <a href=#media-element>media
    element</a>.</li>
 
    <li><p>The method must return, but these steps must
    continue.</li>
 
+
+   <!-- SYNCHRONOUS / ASYNCHRONOUS BOUNDARY FOR EVENT DISPATCH -->
+
+
    <li><p class=note>Playback of any previously playing <a href=#media-resource>media
    resource</a> for this element stops.</li>
  
@@ -14279,24 +14282,25 @@
 
    <!-- going up to future -->
    <dt>If the prevous ready state was <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or
-   less, and the new ready state is <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> or
-   more</dt>
+   less, and the new ready state is <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code></dt>
 
-   <dd><p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> called
-   <code title=event-canplay><a href=#event-canplay>canplay</a></code>.</dd>
+   <dd><p>The user agent must <a href=#queue-a-task>queue a task</a> to
+   <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-canplay><a href=#event-canplay>canplay</a></code>.</dd>
 
+   <!-- going up to enough -->
    <dt>If the new ready state is <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code></dt>
 
    <dd>
 
-    <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> called
-    <code title=event-canplaythrough><a href=#event-canplaythrough>canplaythrough</a></code> event.</p>
-    <!-- XXX make sure it fires after canplay when fixing queueing here -->
+    <p>The user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
+    simple event</a> called <code title=event-canplay><a href=#event-canplay>canplay</a></code>, and then <a href=#queue-a-task>queue a
+    task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-canplaythrough><a href=#event-canplaythrough>canplaythrough</a></code>.</p>
 
     <p>If the <a href=#autoplaying-flag>autoplaying flag</a> is true, and the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, and the
     <a href=#media-element>media element</a> has an <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute specified,
     then the user agent may also set the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute to false and
-    <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-play><a href=#event-play>play</a></code>.</p>
+    <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+    called <code title=event-play><a href=#event-play>play</a></code>.</p>
 
     <p class=note>User agents are not required to autoplay, and it
     is suggested that user agents honor user preferences on the

Received on Wednesday, 15 October 2008 21:14:01 UTC