Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Redefine img.complete in terms of tasks; Make it clearer why …
…'timeupdate' is fired when seeking; add more XXX notes for queue-related fixes that are coming soon.

git-svn-id: http://svn.whatwg.org/webapps@2075 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 16, 2008
1 parent 8975126 commit 3652763
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 61 deletions.
87 changes: 57 additions & 30 deletions index
Expand Up @@ -16218,10 +16218,14 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href="#htmlelemen
title=dom-img-complete><code>complete</code></dfn> must return true if the
user agent has fetched the image specified in the <code
title=attr-img-src><a href="#src">src</a></code> attribute, and it is a
valid image, and false otherwise.
valid image, even if the final <a href="#tasks"
title=concept-task>task</a> queued by the <a href="#networking">networking
task source</a> for the <a href="#fetch" title=fetch>fetching</a> of the
image resource has not yet been processed. Otherwise, the attribute must
return false.

<p class=note>The value of <code title=dom-img-complete><a
href="#complete">complete</a></code> can change while a script is
href="#complete">complete</a></code> can thus change while a script is
executing.

<p>Three constructors are provided for creating <code><a
Expand Down Expand Up @@ -18650,7 +18654,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
agent must implicitly invoke the <code title=dom-media-load><a
href="#load">load()</a></code> method on the <a href="#media7">media
element</a> as soon as all other scripts have finished executing. Any
exceptions raised must be ignored.
exceptions raised must be ignored.</p>
<!-- XXX queue -->

<p>The DOM attributes <dfn id=src6
title=dom-source-src><code>src</code></dfn>, <dfn id=type9
Expand Down Expand Up @@ -18841,7 +18846,9 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
changed, or removed, the user agent must implicitly invoke the <code
title=dom-media-load><a href="#load">load()</a></code> method on the <a
href="#media7">media element</a> as soon as all other scripts have
finished executing. Any exceptions raised must be ignored.
finished executing. Any exceptions raised must be ignored.</p>
<!-- XXX queue
-->

<p class=note>If a <code title=attr-media-src><a
href="#src7">src</a></code> attribute is specified, the resource it
Expand Down Expand Up @@ -19407,8 +19414,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
document, user agents must implicitly invoke the <code
title=dom-media-load><a href="#load">load()</a></code> method on the <a
href="#media7">media element</a> as soon as all other scripts have
finished executing<!-- XXX phrase that better? -->. Any exceptions raised
must be ignored.
finished executing<!-- XXX queue; phrase that better? -->. Any exceptions
raised must be ignored.

<p>The <dfn id=bufferingrate
title=dom-media-bufferingRate><code>bufferingRate</code></dfn> attribute
Expand Down Expand Up @@ -19476,7 +19483,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
any running scripts have finished, <a href="#firing2">fire a simple
event</a> called <code title=event-durationchange><a
href="#durationchange">durationchange</a></code> at the <a
href="#media7">media element</a>.
href="#media7">media element</a>.</p>
<!-- xxx queue -->

<p><a href="#media7" title="media element">Media elements</a> have a <dfn
id=current0>current playback position</dfn>, which must initially be zero.
Expand Down Expand Up @@ -19919,14 +19927,16 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at the
element, and then must <a href="#firing2">fire a simple event</a> called
<code title=event-waiting><a href="#waiting">waiting</a></code> at the
element.
element.</p>
<!-- xxx queue -->

<p>When a <a href="#media7">media element</a> that is <a
href="#actively">actively playing</a> stops playing because it has <a
href="#paused0">paused for user interaction</a>, 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.
element.</p>
<!-- xxx queue -->

<p>When <code title=dom-media-currentLoop><a
href="#currentloop">currentLoop</a></code> is less than <span><code
Expand All @@ -19938,7 +19948,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
href="#effective0">effective loop start</a></var>, increase <code
title=dom-media-currentLoop><a href="#currentloop">currentLoop</a></code>
by 1, and <a href="#firing2">fire a simple event</a> called <code
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code>.
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code>.</p>
<!-- xxx queue -->

<p>When <code title=dom-media-currentLoop><a
href="#currentloop">currentLoop</a></code> is equal to the <span><code
Expand All @@ -19960,6 +19971,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
<p>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 -->

<li>
<p>The user agent must <a href="#firing2">fire a simple event</a> called
Expand Down Expand Up @@ -19997,7 +20010,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
running scripts have finished, <a href="#firing2">fire a simple event</a>
called <code title=event-ratechange><a
href="#ratechange">ratechange</a></code> at the <a href="#media7">media
element</a>.
element</a>.</p>
<!-- xxx queue -->

<p>When the <dfn id=play title=dom-media-play><code>play()</code></dfn>
method on a <a href="#media7">media element</a> is invoked, the user agent
Expand All @@ -20021,11 +20035,11 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
title=dom-media-seek>seek</a> to the <var><a href="#effective">effective
start</a></var>.</p>

<p class=note>If this involved a seek, the user agent will<!--
XXX queued-->
<a href="#firing2">fire a simple event</a> called <code
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at
the <a href="#media7">media element</a>.</p>
<p class=note>If this involved a seek, the user agent <a
href="#seekUpdate">will later</a> <a href="#firing2">fire a simple
event</a> called <code title=event-timeupdate><a
href="#timeupdate">timeupdate</a></code> at the <a href="#media7">media
element</a>.</p>

<li>
<p>The <code title=dom-media-playbackRate><a
Expand Down Expand Up @@ -20062,6 +20076,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
href="#ratechange">ratechange</a></code>) have fired, <a
href="#firing2">fire a simple event</a> called <code
title=event-pause><a href="#pause1">play</a></code> at the element.
</li>
<!-- xxx queue -->
</ol>

<p>When the <dfn id=pause0 title=dom-media-pause><code>pause()</code></dfn>
Expand Down Expand Up @@ -20099,6 +20115,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
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 -->
</ol>

<p>When a <a href="#media7">media element</a> is <span>removed from a
Expand Down Expand Up @@ -20200,11 +20218,13 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
attribute, then continue the script. The remainder of these steps must
be run asynchronously.

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

<li>
<p>If the <a href="#media7">media element</a> was <a
Expand Down Expand Up @@ -20240,6 +20260,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
<p>Once any running scripts have finished executing, the user agent must
<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
Expand Down Expand Up @@ -20374,6 +20396,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
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 -->

<li>
<p>If the time was reached through the usual monotonic increase of the
Expand Down Expand Up @@ -20495,7 +20519,8 @@ interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {
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>.
at the <a href="#media7">media element</a>.</p>
<!-- queue xxx -->

<h5 id=time-ranges><span class=secno>4.7.10.11. </span>Time ranges</h5>

Expand Down Expand Up @@ -30814,8 +30839,8 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
<p>Once the DOM in question has been parsed, assuming that it indeed can be
parsed and does so successfully, the user agent must wait for no scripts
to be executing, and as soon as that opportunity
arises<!-- XXX xref to a strict definition of this -->, run the following
algorithm:
arises<!-- XXX queue; xref to a strict definition of this -->, run the
following algorithm:

<ol><!-- precondition: the originalContent is null and the element
contains its original content. -->
Expand Down Expand Up @@ -30940,8 +30965,8 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
<p>Once the DOM in question has been parsed, assuming that it indeed can be
parsed and does so successfully, the user agent must wait for no scripts
to be executing, and as soon as that opportunity
arises<!-- XXX xref to a strict definition of this -->, run the following
algorithm:
arises<!-- XXX; queue xref to a strict definition of this -->, run the
following algorithm:

<ol>
<li>
Expand Down Expand Up @@ -32721,7 +32746,8 @@ never reset. This is nice and consistent.)

<p>An <a href="#event3">event loop</a> has one or more <dfn id=task-queues
title="task queue">task queues</dfn>. A <a href="#task-queues">task
queue</a> is an ordered list of:
queue</a> is an ordered list of <dfn id=tasks
title=concept-task>tasks</dfn>, which can be:

<dl>
<dt>Events
Expand Down Expand Up @@ -37546,13 +37572,14 @@ user reload must be equivalent to .reload()
a script running in one browsing context accesses a local storage area,
the UA blocks scripts in other browsing contexts when they try to access
the local storage area for the <a href="#same-origin">same origin</a>
until the first script has executed to completion. (Similarly, when a
script in one browsing context accesses its session storage area, any
scripts that have the same top level browsing context and the <a
href="#same-origin">same origin</a> would block when accessing their
session storage area until the first script has executed to completion.)
Another (potentially more efficient but probably more complex)
implementation strategy is to use optimistic transactional script
until the first script has executed to completion <!--
xxx queue -->.
(Similarly, when a script in one browsing context accesses its session
storage area, any scripts that have the same top level browsing context
and the <a href="#same-origin">same origin</a> would block when accessing
their session storage area until the first script has executed to
completion.) Another (potentially more efficient but probably more
complex) implementation strategy is to use optimistic transactional script
execution. This specification does not require any particular
implementation strategy, so long as the requirement above is met.

Expand Down

0 comments on commit 3652763

Please sign in to comment.