Skip to content

Commit

Permalink
[giow] (1) Make it so moving a video around the DOM doesn't pause it.…
Browse files Browse the repository at this point in the history
… Also make innerHTML work for <video> elements.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11068

git-svn-id: http://svn.whatwg.org/webapps@5899 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 17, 2011
1 parent 14a97b7 commit 919b050
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 60 deletions.
57 changes: 37 additions & 20 deletions complete.html
Expand Up @@ -27591,7 +27591,9 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the
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
Expand Down Expand Up @@ -27717,17 +27719,17 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the

<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>

Expand Down Expand Up @@ -27784,19 +27786,34 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the
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 &#8987;.)</li>

<li><p>&#8987; 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>&#8987; 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>&#8987; <a href=#dom-media-pause title=dom-media-pause>Pause the
<span>media element</span>.</a></p>

</ol></div>



Expand Down
57 changes: 37 additions & 20 deletions index
Expand Up @@ -27574,7 +27574,9 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
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
Expand Down Expand Up @@ -27700,17 +27702,17 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

<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>

Expand Down Expand Up @@ -27767,19 +27769,34 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
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 &#8987;.)</li>

<li><p>&#8987; 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>&#8987; 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>&#8987; <a href=#dom-media-pause title=dom-media-pause>Pause the
<span>media element</span>.</a></p>

</ol></div>



Expand Down
61 changes: 41 additions & 20 deletions source
Expand Up @@ -29912,7 +29912,9 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
<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>

Expand Down Expand Up @@ -30071,16 +30073,16 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>

<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>
Expand Down Expand Up @@ -30150,20 +30152,39 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
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>


Expand Down

0 comments on commit 919b050

Please sign in to comment.