[html5] r2083 - [] (0) Further work on the event loop front. (This should complete the bulk of t [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Aug 19 01:21:10 PDT 2008
Author: ianh
Date: 2008-08-19 01:21:09 -0700 (Tue, 19 Aug 2008)
New Revision: 2083
Modified:
index
source
Log:
[] (0) Further work on the event loop front. (This should complete the bulk of the changes required for the media elements section.)
Modified: index
===================================================================
--- index 2008-08-19 06:52:46 UTC (rev 2082)
+++ index 2008-08-19 08:21:09 UTC (rev 2083)
@@ -20174,15 +20174,13 @@
<li>
<p>If the second step above changed the value of <code
- title=dom-media-paused><a href="#paused">paused</a></code>, then, after
- any running scripts have finished executing, the user agent must first
- <a href="#firing2">fire a simple event</a> called <code
+ title=dom-media-paused><a href="#paused">paused</a></code>, then the
+ user agent must <a href="#queue">queue a task</a> to <a
+ href="#firing2">fire a simple event</a> called <code
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at
- the element, and then <a href="#firing2">fire a simple event</a> called
- <code title=event-pause><a href="#pause1">pause</a></code> at the
- element.
- </li>
- <!-- xxx queue -->
+ the element, and <a href="#queue">queue a task</a> to <a
+ href="#firing2">fire a simple event</a> called <code
+ title=event-pause><a href="#pause1">pause</a></code> at the element.
</ol>
<p>When a <a href="#media7">media element</a> is <span>removed from a
@@ -20279,18 +20277,11 @@
<p>The <code title=dom-media-seeking><a
href="#seeking0">seeking</a></code> DOM attribute must be set to true.
- <li>
- <p>If the seek was in response to a DOM method call or setting of a DOM
- attribute, then continue the script. The remainder of these steps must
- be run asynchronously.
-
<li id=seekUpdate>
- <p>Once any running scripts have finished executing, the user agent must
- <a href="#firing2">fire a simple event</a> called <code
- title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at
- the element.
- </li>
- <!-- xxx queue -->
+ <p>The user agent must <a href="#queue">queue a task</a> to <a
+ href="#queue">queue a task</a> to <a href="#firing2">fire a simple
+ event</a> called <code title=event-timeupdate><a
+ href="#timeupdate">timeupdate</a></code> at the element.
<li>
<p>If the <a href="#media7">media element</a> was <a
@@ -20299,20 +20290,25 @@
href="#readystate0">readyState</a></code> attribute to change to a value
lower than <code title=dom-media-CAN_PLAY><a
href="#canplay">CAN_PLAY</a></code>, the user agent must <a
- href="#firing2">fire a simple event</a> called <code
- title=event-waiting><a href="#waiting">waiting</a></code> at the
- element.
+ href="#queue">queue a task</a> to <a href="#firing2">fire a simple
+ event</a> called <code title=event-waiting><a
+ href="#waiting">waiting</a></code> at the element.
<li>
<p>If, when it reaches this step, the user agent has still not
established whether or not the <a href="#media9">media data</a> for the
<var title="">new playback position</var> is available, and, if it is,
decoded enough data to play back that position, the user agent must <a
- href="#firing2">fire a simple event</a> called <code
- title=event-seeking><a href="#seeking1">seeking</a></code> at the
- element.
+ href="#queue">queue a task</a> to <a href="#firing2">fire a simple
+ event</a> called <code title=event-seeking><a
+ href="#seeking1">seeking</a></code> at the element.
<li>
+ <p>If the seek was in response to a DOM method call or setting of a DOM
+ attribute, then continue the script. The remainder of these steps must
+ be run asynchronously.
+
+ <li>
<p>The user agent must wait until it has established whether or not the
<a href="#media9">media data</a> for the <var title="">new playback
position</var> is available, and, if it is, until it has decoded enough
@@ -20323,11 +20319,9 @@
href="#seeking0">seeking</a></code> DOM attribute must be set to false.
<li>
- <p>Once any running scripts have finished executing, the user agent must
- <a href="#firing2">fire a simple event</a> called <code
+ <p>The user agent must <a href="#queue">queue a task</a> to <a
+ href="#firing2">fire a simple event</a> called <code
title=event-seeked><a href="#seeked">seeked</a></code> at the element.
- </li>
- <!-- xxx queue -->
</ol>
<p>The <dfn id=seekable
@@ -20457,13 +20451,11 @@
<li>
<p>If the time was reached through the usual monotonic increase of the
current playback position during normal playback, the user agent must
- then <a href="#firing2">fire a simple event</a> called <code
- title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at
- the element. (In the other cases, such as explicit seeks, relevant
- events get fired as part of the overall process of changing the current
- playback position.)
- </li>
- <!-- xxx queue -->
+ then <a href="#queue">queue a task</a> to <a href="#firing2">fire a
+ simple event</a> called <code title=event-timeupdate><a
+ href="#timeupdate">timeupdate</a></code> at the element. (In the other
+ cases, such as explicit seeks, relevant events get fired as part of the
+ overall process of changing the current playback position.)
<li>
<p>If the time was reached through the usual monotonic increase of the
@@ -20472,27 +20464,28 @@
title="">other ranges</var> that have both their "active" boolean and
their "pause" boolean set to "true", then immediately act as if the
element's <code title=dom-media-pause><a
- href="#pause0">pause()</a></code> method had been invoked. (In the other
- cases, such as explicit seeks, playback is not paused by exiting a cue
- range, even if that cue range has its "pause" boolean set to "true".)
+ href="#pause0">pause()</a></code> method had been invoked.
+ <!-- pause() can in theory call load(), but never
+ can it do so as part of this invokation, since we wouldn't be in
+ this algorithm if the media element was empty. So, no need to couch
+ all this in a task. -->
+ (In the other cases, such as explicit seeks, playback is not paused by
+ exiting a cue range, even if that cue range has its "pause" boolean set
+ to "true".)
<li>
- <p>Invoke all the non-null "exit" callbacks for all of the <a
- href="#cue-ranges0" title="cue range">cue ranges</a> in <var
- title="">other ranges</var> that have their "active" boolean set to
- "true" (active), in list order, passing their identifier as the
- callback's only argument.
- </li>
- <!-- XXX queue -->
+ <p>For each non-null "exit" callback of the <a href="#cue-ranges0"
+ title="cue range">cue ranges</a> in <var title="">other ranges</var>
+ that have their "active" boolean set to "true" (active), in list order,
+ <a href="#queue">queue a task</a> that invokes the callback, passing the
+ cue range's identifier as the callback's only argument.
<li>
- <p>Invoke all the non-null "enter" callbacks for all of the <a
- href="#cue-ranges0" title="cue range">cue ranges</a> in <var
- title="">current ranges</var> that have their "active" boolean set to
- "false" (inactive), in list order, passing their identifier as the
- callback's only argument.
- </li>
- <!-- XXX queue -->
+ <p>For each non-null "enter" callback of the <a href="#cue-ranges0"
+ title="cue range">cue ranges</a> in <var title="">current ranges</var>
+ that have their "active" boolean set to "false" (inactive), in list
+ order, <a href="#queue">queue a task</a> that invokes the callback,
+ passing the cue range's identifier as the callback's only argument.
<li>
<p>Set the "active" boolean of all the <a href="#cue-ranges0" title="cue
@@ -20581,12 +20574,11 @@
<p>Whenever either the <code title=dom-media-muted><a
href="#muted">muted</a></code> or <code title=dom-media-volume><a
- href="#volume">volume</a></code> attributes are changed, after any running
- scripts have finished executing, the user agent must <a
- href="#firing2">fire a simple event</a> called <code
- title=event-volumechange><a href="#volumechange">volumechange</a></code>
- at the <a href="#media7">media element</a>.</p>
- <!-- queue xxx -->
+ href="#volume">volume</a></code> attributes are changed, the user agent
+ must <a href="#queue">queue a task</a> to <a href="#firing2">fire a simple
+ event</a> called <code title=event-volumechange><a
+ href="#volumechange">volumechange</a></code> at the <a
+ href="#media7">media element</a>.
<h5 id=time-ranges><span class=secno>4.7.10.11. </span>Time ranges</h5>
Modified: source
===================================================================
--- source 2008-08-19 06:52:46 UTC (rev 2082)
+++ source 2008-08-19 08:21:09 UTC (rev 2083)
@@ -17639,12 +17639,12 @@
<li><p>The method must then return.</p></li>
<li><p>If the second step above changed the value of <code
- title="dom-media-paused">paused</code>, then, after any running
- scripts have finished executing, the user agent must first
- <span>fire a simple event</span> called <code
- title="event-timeupdate">timeupdate</code> at the element, and then
- <span>fire a simple event</span> called <code
- title="event-pause">pause</code> at the element.</p></li><!-- xxx queue -->
+ title="dom-media-paused">paused</code>, then the user agent must
+ <span>queue a task</span> to <span>fire a simple event</span>
+ called <code title="event-timeupdate">timeupdate</code> at the
+ element, and <span>queue a task</span> to <span>fire a simple
+ event</span> called <code title="event-pause">pause</code> at the
+ element.</p></li>
</ol>
@@ -17737,30 +17737,32 @@
<li><p>The <code title="dom-media-seeking">seeking</code> DOM
attribute must be set to true.</p></li>
- <li><p>If the seek was in response to a DOM method call or setting
- of a DOM attribute, then continue the script. The remainder of
- these steps must be run asynchronously.</p></li>
+ <li id="seekUpdate"><p>The user agent must <span>queue a
+ task</span> to <span>queue a task</span> to <span>fire a simple
+ event</span> called <code
+ title="event-timeupdate">timeupdate</code> at the element.</p></li>
- <li id="seekUpdate"><p>Once any running scripts have finished
- executing, the user agent must <span>fire a simple event</span>
- called <code title="event-timeupdate">timeupdate</code> at the
- element.</p></li><!-- xxx queue -->
-
<li><p>If the <span>media element</span> was <span>actively
playing</span> immediately before it started seeking, but seeking
caused its <code title="dom-media-readyState">readyState</code>
attribute to change to a value lower than <code
title="dom-media-CAN_PLAY">CAN_PLAY</code>, the user agent must
- <span>fire a simple event</span> called <code
- title="event-waiting">waiting</code> at the element.</p></li>
+ <span>queue a task</span> to <span>fire a simple event</span>
+ called <code title="event-waiting">waiting</code> at the
+ element.</p></li>
<li><p>If, when it reaches this step, the user agent has still not
established whether or not the <span>media data</span> for the <var
title="">new playback position</var> is available, and, if it is,
decoded enough data to play back that position, the user agent must
- <span>fire a simple event</span> called <code
- title="event-seeking">seeking</code> at the element.</p></li>
+ <span>queue a task</span> to <span>fire a simple event</span>
+ called <code title="event-seeking">seeking</code> at the
+ element.</p></li>
+ <li><p>If the seek was in response to a DOM method call or setting
+ of a DOM attribute, then continue the script. The remainder of
+ these steps must be run asynchronously.</p></li>
+
<li><p>The user agent must wait until it has established whether or
not the <span>media data</span> for the <var title="">new playback
position</var> is available, and, if it is, until it has decoded
@@ -17769,9 +17771,9 @@
<li><p>The <code title="dom-media-seeking">seeking</code> DOM
attribute must be set to false.</p></li>
- <li><p>Once any running scripts have finished executing, the user
- agent must <span>fire a simple event</span> called <code
- title="event-seeked">seeked</code> at the element.</p></li><!-- xxx queue -->
+ <li><p>The user agent must <span>queue a task</span> to <span>fire
+ a simple event</span> called <code
+ title="event-seeked">seeked</code> at the element.</p></li>
</ol>
@@ -17892,12 +17894,13 @@
steps.</p></li>
<li><p>If the time was reached through the usual monotonic increase
- of the current playback position during normal playback, the
- user agent must then <span>fire a simple event</span> called <code
+ of the current playback position during normal playback, the user
+ agent must then <span>queue a task</span> to <span>fire a simple
+ event</span> called <code
title="event-timeupdate">timeupdate</code> at the element. (In the
other cases, such as explicit seeks, relevant events get fired as
part of the overall process of changing the current playback
- position.)</p></li><!-- xxx queue -->
+ position.)</p></li>
<li><p>If the time was reached through the usual monotonic increase
of the current playback position during normal playback, and there
@@ -17905,21 +17908,26 @@
title="">other ranges</var> that have both their "active" boolean
and their "pause" boolean set to "true", then immediately act as if
the element's <code title="dom-media-pause">pause()</code> method
- had been invoked. (In the other cases, such as explicit seeks,
- playback is not paused by exiting a cue range, even if that cue
- range has its "pause" boolean set to "true".)</p></li>
+ had been invoked. <!-- pause() can in theory call load(), but never
+ can it do so as part of this invokation, since we wouldn't be in
+ this algorithm if the media element was empty. So, no need to couch
+ all this in a task. --> (In the other cases, such as explicit
+ seeks, playback is not paused by exiting a cue range, even if that
+ cue range has its "pause" boolean set to "true".)</p></li>
- <li><p>Invoke all the non-null "exit" callbacks for all of the
- <span title="cue range">cue ranges</span> in <var title="">other
+ <li><p>For each non-null "exit" callback of the <span
+ title="cue range">cue ranges</span> in <var title="">other
ranges</var> that have their "active" boolean set to "true"
- (active), in list order, passing their identifier as the callback's
- only argument.</p></li> <!-- XXX queue -->
+ (active), in list order, <span>queue a task</span> that invokes the
+ callback, passing the cue range's identifier as the callback's only
+ argument.</p></li>
- <li><p>Invoke all the non-null "enter" callbacks for all of the
- <span title="cue range">cue ranges</span> in <var title="">current
- ranges</var> that have their "active" boolean set to "false"
- (inactive), in list order, passing their identifier as the
- callback's only argument.</p></li> <!-- XXX queue -->
+ <li><p>For each non-null "enter" callback of the <span title="cue
+ range">cue ranges</span> in <var title="">current ranges</var> that
+ have their "active" boolean set to "false" (inactive), in list
+ order, <span>queue a task</span> that invokes the callback, passing
+ the cue range's identifier as the callback's only
+ argument.</p></li>
<li><p>Set the "active" boolean of all the <span title="cue
range">cue ranges</span> in the <var title="">current ranges</var>
@@ -18013,10 +18021,10 @@
<p>Whenever either the <code title="dom-media-muted">muted</code> or
<code title="dom-media-volume">volume</code> attributes are changed,
- after any running scripts have finished executing, the user agent
- must <span>fire a simple event</span> called <code
+ the user agent must <span>queue a task</span> to <span>fire a simple
+ event</span> called <code
title="event-volumechange">volumechange</code> at the <span>media
- element</span>.</p><!-- queue xxx -->
+ element</span>.</p>
More information about the Commit-Watchers
mailing list