Skip to content

Commit

Permalink
[e] (0) Simplify the load() algorithm a bunch.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7987

git-svn-id: http://svn.whatwg.org/webapps@4264 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 21, 2009
1 parent a3a8e2e commit 276203b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 54 deletions.
24 changes: 7 additions & 17 deletions complete.html
Expand Up @@ -22541,11 +22541,7 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method itself is
invoked again.</p>

<ol><li><p>If the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method for
this element is already being invoked, then abort these
steps.</li>

<li><p>Abort any already-running instance of the <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
<ol><li><p>Abort any already-running instance of the <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a> for this element.</li>

<li>
Expand All @@ -22561,9 +22557,9 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the

</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>Let <var title="">emptied</var> be false.</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>, <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code> at the <a href=#media-element>media
element</a>.</li>

<li>

Expand All @@ -22589,7 +22585,9 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the

<li>Set the <a href=#current-playback-position>current playback position</a> to 0.</li>

<li>Let <var title="">emptied</var> be true.</li>
<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the <a href=#media-element>media
element</a>.</li>

</ol></li>

Expand All @@ -22600,14 +22598,6 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
<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="">aborted</var> is true, <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code> at the <a href=#media-element>media
element</a>.</li>

<li><p>If <var title="">emptied</var> is true, <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-emptied><a href=#event-media-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>

Expand Down
24 changes: 7 additions & 17 deletions index
Expand Up @@ -22371,11 +22371,7 @@ interface <dfn>CueRangeCallback</dfn> {
the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method itself is
invoked again.</p>

<ol><li><p>If the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method for
this element is already being invoked, then abort these
steps.</li>

<li><p>Abort any already-running instance of the <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
<ol><li><p>Abort any already-running instance of the <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a> for this element.</li>

<li>
Expand All @@ -22391,9 +22387,9 @@ interface <dfn>CueRangeCallback</dfn> {

</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>Let <var title="">emptied</var> be false.</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>, <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code> at the <a href=#media-element>media
element</a>.</li>

<li>

Expand All @@ -22419,7 +22415,9 @@ interface <dfn>CueRangeCallback</dfn> {

<li>Set the <a href=#current-playback-position>current playback position</a> to 0.</li>

<li>Let <var title="">emptied</var> be true.</li>
<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the <a href=#media-element>media
element</a>.</li>

</ol></li>

Expand All @@ -22430,14 +22428,6 @@ interface <dfn>CueRangeCallback</dfn> {
<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="">aborted</var> is true, <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code> at the <a href=#media-element>media
element</a>.</li>

<li><p>If <var title="">emptied</var> is true, <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-emptied><a href=#event-media-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>

Expand Down
28 changes: 8 additions & 20 deletions source
Expand Up @@ -24064,10 +24064,6 @@ interface <dfn>CueRangeCallback</dfn> {

<ol>

<li><p>If the <code title="dom-media-load">load()</code> method for
this element is already being invoked, then abort these
steps.</p></li>

<li><p>Abort any already-running instance of the <span
title="concept-media-load-algorithm">resource selection
algorithm</span> for this element.</p></li>
Expand All @@ -24088,11 +24084,10 @@ interface <dfn>CueRangeCallback</dfn> {
<li><p>If the <span>media element</span>'s <code
title="dom-media-networkState">networkState</code> is set to <code
title="dom-media-NETWORK_LOADING">NETWORK_LOADING</code> or <code
title="dom-media-NETWORK_IDLE">NETWORK_IDLE</code>, let <var
title="">aborted</var> be true; otherwise, let <var
title="">aborted</var> be false.</p></li>

<li><p>Let <var title="">emptied</var> be false.</p></li>
title="dom-media-NETWORK_IDLE">NETWORK_IDLE</code>, <span>queue a
task</span> to <span>fire a simple event</span> named <code
title="event-media-abort">abort</code> at the <span>media
element</span>.</p></li>

<li>

Expand Down Expand Up @@ -24123,7 +24118,10 @@ interface <dfn>CueRangeCallback</dfn> {

<li>Set the <span>current playback position</span> to 0.</li>

<li>Let <var title="">emptied</var> be true.</li>
<li><p><span>Queue a task</span> to <span>fire a simple
event</span> named <code
title="event-media-emptied">emptied</code> at the <span>media
element</span>.</p></li>

</ol>

Expand All @@ -24138,16 +24136,6 @@ interface <dfn>CueRangeCallback</dfn> {
<li><p>Set the <code title="dom-media-error">error</code> attribute
to null and the <span>autoplaying flag</span> to true.</p></li>

<li><p>If <var title="">aborted</var> is true, <span>queue a
task</span> to <span>fire a simple event</span> named <code
title="event-media-abort">abort</code> at the <span>media
element</span>.</p></li>

<li><p>If <var title="">emptied</var> is true, <span>queue a
task</span> to <span>fire a simple event</span> named <code
title="event-media-emptied">emptied</code> at the <span>media
element</span>.</p></li>

<li><p>Invoke the <span>media element</span>'s <span
title="concept-media-load-algorithm">resource selection
algorithm</span>.</li>
Expand Down

0 comments on commit 276203b

Please sign in to comment.