[html5] r5899 - [giow] (1) Make it so moving a video around the DOM doesn't pause it. Also make [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Feb 16 16:51:56 PST 2011


Author: ianh
Date: 2011-02-16 16:51:55 -0800 (Wed, 16 Feb 2011)
New Revision: 5899

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Make it so moving a video around the DOM doesn't pause it. Also make innerHTML work for <video> elements.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11068

Modified: complete.html
===================================================================
--- complete.html	2011-02-17 00:06:54 UTC (rev 5898)
+++ complete.html	2011-02-17 00:51:55 UTC (rev 5899)
@@ -27591,7 +27591,9 @@
    flag</a> to false.</li>
 
   </ol><hr><p>When the <dfn id=dom-media-pause title=dom-media-pause><code>pause()</code></dfn>
-  method is invoked, the user agent must run the following steps:</p>
+  method is invoked, and when the user agent is required to pause the
+  <a href=#media-element>media element</a>, the user agent must run the following
+  steps:</p>
 
   <ol><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> attribute has
    the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, invoke the
@@ -27717,17 +27719,17 @@
 
    <li><p>If the time was reached through the usual monotonic increase
    of the current playback position during normal playback, and there
-   are <a href=#text-track-cue title="text track cue">cues</a> in <var title="">other cues</var> that have both their <a href=#text-track-cue-active-flag>text track
-   cue active flag</a> set and their <a href=#text-track-cue-pause-on-exit-flag>text track cue
-   pause-on-exit flag</a> set, then immediately act as if the
-   element's <code title=dom-media-pause><a href=#dom-media-pause>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 going past the end time of a <a href=#text-track-cue title="text track cue">cue</a>, even if that <a href=#text-track-cue title="text
-   track cue">cue</a> has its <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit
-   flag</a> set.)</li>
+   are <a href=#text-track-cue title="text track cue">cues</a> in <var title="">other
+   cues</var> that have both their <a href=#text-track-cue-active-flag>text track cue active
+   flag</a> set and their <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit
+   flag</a> set, then immediately <a href=#dom-media-pause title=dom-media-pause>pause the <span>media
+   element</span>. <!-- "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 going past the end time of a <span title="text track cue">cue</span>, even if that <span title="text
+   track cue">cue</span> has its <span>text track cue pause-on-exit
+   flag</span> set.)</a></li>
 
    <li><p>Let <var title="">affected tracks</var> be a list of <a href=#text-track title="text track">text tracks</a>, initially empty.</li>
 
@@ -27784,22 +27786,37 @@
   track</a>.</p>
 <!--KEEP-START w3c-html--><!--TT-->
 
-  <p>When a <a href=#media-element>media element</a> is <a href=#remove-an-element-from-a-document title="remove an
-  element from a document">removed from a
-  <code>Document</code></a>, if the <a href=#media-element>media element</a>'s
-  <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute
-  has a value other than <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> then the user
-  agent must act as if the <code title=dom-media-pause><a href=#dom-media-pause>pause()</a></code> method had been invoked.</p>
-
   <p class=note>If the <a href=#media-element>media element</a>'s
   <code><a href=#document>Document</a></code> stops being a <a href=#fully-active>fully active</a>
   document, then the playback will <a href=#media-playback>stop</a>
   until the document is active again.</p>
 
-  </div>
+  <p>When a <a href=#media-element>media element</a> is <a href=#remove-an-element-from-a-document title="remove an
+  element from a document">removed from a
+  <code>Document</code></a>, the user agent must run
+  the following steps:</p>
 
+  <ol><li><p>Asynchronously <a href=#await-a-stable-state>await a stable state</a>, allowing
+   the <a href=#concept-task title=concept-task>task</a> that removed the
+   <a href=#media-element>media element</a> from the <code><a href=#document>Document</a></code> to
+   continue. The <a href=#synchronous-section>synchronous section</a> consists of all the
+   remaining steps of this algorithm. (Steps in the <a href=#synchronous-section>synchronous
+   section</a> are marked with ⌛.)</li>
 
+   <li><p>⌛ If the <a href=#media-element>media element</a> is <a href=#in-a-document>in a
+   <code>Document</code></a>, abort these steps.</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> attribute has
+   the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, abort these
+   steps.</li>
+
+   <li><p>⌛ <a href=#dom-media-pause title=dom-media-pause>Pause the
+   <span>media element</span>.</a></p>
+
+  </ol></div>
+
+
+
   <h5 id=seeking><span class=secno>4.8.10.9 </span>Seeking</h5>
 
   <dl class=domintro><dt><var title="">media</var> . <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code></dt>

Modified: index
===================================================================
--- index	2011-02-17 00:06:54 UTC (rev 5898)
+++ index	2011-02-17 00:51:55 UTC (rev 5899)
@@ -27574,7 +27574,9 @@
    flag</a> to false.</li>
 
   </ol><hr><p>When the <dfn id=dom-media-pause title=dom-media-pause><code>pause()</code></dfn>
-  method is invoked, the user agent must run the following steps:</p>
+  method is invoked, and when the user agent is required to pause the
+  <a href=#media-element>media element</a>, the user agent must run the following
+  steps:</p>
 
   <ol><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> attribute has
    the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, invoke the
@@ -27700,17 +27702,17 @@
 
    <li><p>If the time was reached through the usual monotonic increase
    of the current playback position during normal playback, and there
-   are <a href=#text-track-cue title="text track cue">cues</a> in <var title="">other cues</var> that have both their <a href=#text-track-cue-active-flag>text track
-   cue active flag</a> set and their <a href=#text-track-cue-pause-on-exit-flag>text track cue
-   pause-on-exit flag</a> set, then immediately act as if the
-   element's <code title=dom-media-pause><a href=#dom-media-pause>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 going past the end time of a <a href=#text-track-cue title="text track cue">cue</a>, even if that <a href=#text-track-cue title="text
-   track cue">cue</a> has its <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit
-   flag</a> set.)</li>
+   are <a href=#text-track-cue title="text track cue">cues</a> in <var title="">other
+   cues</var> that have both their <a href=#text-track-cue-active-flag>text track cue active
+   flag</a> set and their <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit
+   flag</a> set, then immediately <a href=#dom-media-pause title=dom-media-pause>pause the <span>media
+   element</span>. <!-- "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 going past the end time of a <span title="text track cue">cue</span>, even if that <span title="text
+   track cue">cue</span> has its <span>text track cue pause-on-exit
+   flag</span> set.)</a></li>
 
    <li><p>Let <var title="">affected tracks</var> be a list of <a href=#text-track title="text track">text tracks</a>, initially empty.</li>
 
@@ -27767,22 +27769,37 @@
   track</a>.</p>
 <!--KEEP-START w3c-html--><!--TT-->
 
-  <p>When a <a href=#media-element>media element</a> is <a href=#remove-an-element-from-a-document title="remove an
-  element from a document">removed from a
-  <code>Document</code></a>, if the <a href=#media-element>media element</a>'s
-  <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute
-  has a value other than <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> then the user
-  agent must act as if the <code title=dom-media-pause><a href=#dom-media-pause>pause()</a></code> method had been invoked.</p>
-
   <p class=note>If the <a href=#media-element>media element</a>'s
   <code><a href=#document>Document</a></code> stops being a <a href=#fully-active>fully active</a>
   document, then the playback will <a href=#media-playback>stop</a>
   until the document is active again.</p>
 
-  </div>
+  <p>When a <a href=#media-element>media element</a> is <a href=#remove-an-element-from-a-document title="remove an
+  element from a document">removed from a
+  <code>Document</code></a>, the user agent must run
+  the following steps:</p>
 
+  <ol><li><p>Asynchronously <a href=#await-a-stable-state>await a stable state</a>, allowing
+   the <a href=#concept-task title=concept-task>task</a> that removed the
+   <a href=#media-element>media element</a> from the <code><a href=#document>Document</a></code> to
+   continue. The <a href=#synchronous-section>synchronous section</a> consists of all the
+   remaining steps of this algorithm. (Steps in the <a href=#synchronous-section>synchronous
+   section</a> are marked with ⌛.)</li>
 
+   <li><p>⌛ If the <a href=#media-element>media element</a> is <a href=#in-a-document>in a
+   <code>Document</code></a>, abort these steps.</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> attribute has
+   the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, abort these
+   steps.</li>
+
+   <li><p>⌛ <a href=#dom-media-pause title=dom-media-pause>Pause the
+   <span>media element</span>.</a></p>
+
+  </ol></div>
+
+
+
   <h5 id=seeking><span class=secno>4.8.10.9 </span>Seeking</h5>
 
   <dl class=domintro><dt><var title="">media</var> . <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code></dt>

Modified: source
===================================================================
--- source	2011-02-17 00:06:54 UTC (rev 5898)
+++ source	2011-02-17 00:51:55 UTC (rev 5899)
@@ -29912,7 +29912,9 @@
   <hr>
 
   <p>When the <dfn title="dom-media-pause"><code>pause()</code></dfn>
-  method is invoked, the user agent must run the following steps:</p>
+  method is invoked, and when the user agent is required to pause the
+  <span>media element</span>, the user agent must run the following
+  steps:</p>
 
   <ol>
 
@@ -30071,16 +30073,16 @@
 
    <li><p>If the time was reached through the usual monotonic increase
    of the current playback position during normal playback, and there
-   are <span title="text track cue">cues</span> in <var
-   title="">other cues</var> that have both their <span>text track
-   cue active flag</span> set and their <span>text track cue
-   pause-on-exit flag</span> set, then immediately act as if the
-   element's <code title="dom-media-pause">pause()</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 going past the end time of a <span
+   are <span title="text track cue">cues</span> in <var title="">other
+   cues</var> that have both their <span>text track cue active
+   flag</span> set and their <span>text track cue pause-on-exit
+   flag</span> set, then immediately <span
+   title="dom-media-pause">pause</code> the <span>media
+   element</span>. <!-- "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 going past the end time of a <span
    title="text track cue">cue</span>, even if that <span title="text
    track cue">cue</span> has its <span>text track cue pause-on-exit
    flag</span> set.)</p></li>
@@ -30150,20 +30152,39 @@
   track</span>.</p>
 <!--KEEP-START w3c-html--><!--TT-->
 
-  <p>When a <span>media element</span> is <span title="remove an
-  element from a document">removed from a
-  <code>Document</code></span>, if the <span>media element</span>'s
-  <code title="dom-media-networkState">networkState</code> attribute
-  has a value other than <code
-  title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code> then the user
-  agent must act as if the <code
-  title="dom-media-pause">pause()</code> method had been invoked.</p>
-
   <p class="note">If the <span>media element</span>'s
   <code>Document</code> stops being a <span>fully active</span>
   document, then the playback will <a href="#media-playback">stop</a>
   until the document is active again.</p>
 
+  <p>When a <span>media element</span> is <span title="remove an
+  element from a document">removed from a
+  <code>Document</code></span>, the user agent must run
+  the following steps:</p>
+
+  <ol>
+
+   <li><p>Asynchronously <span>await a stable state</span>, allowing
+   the <span title="concept-task">task</span> that removed the
+   <span>media element</span> from the <code>Document</code> to
+   continue. The <span>synchronous section</span> consists of all the
+   remaining steps of this algorithm. (Steps in the <span>synchronous
+   section</span> are marked with &#x231B;.)</p></li>
+
+   <li><p>&#x231B; If the <span>media element</span> is <span>in a
+   <code>Document</code></span>, abort these steps.</p></li>
+
+   <li><p>&#x231B; If the <span>media element</span>'s <code
+   title="dom-media-networkState">networkState</code> attribute has
+   the value <code
+   title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, abort these
+   steps.</p></li>
+
+   <li><p>&#x231B; <span title="dom-media-pause">Pause</code> the
+   <span>media element</span>.</p>
+
+  </ol>
+
   </div>
 
 




More information about the Commit-Watchers mailing list