Skip to content

Commit

Permalink
[e] (0) Fix the wording of these algorithms to make sense.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8633

git-svn-id: http://svn.whatwg.org/webapps@4654 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 5, 2010
1 parent 042409b commit 986f389
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 93 deletions.
63 changes: 34 additions & 29 deletions complete.html
Expand Up @@ -52811,9 +52811,10 @@ <h3 id=timers><span class=secno>6.6 </span>Timers</h3>

<li><p><a href=#get-the-timeout>Get the timeout</a>, and let <var title="">timeout</var> be the result.</li>

<li><p>If the currently running <a href=#concept-task title=concept-task>task</a> is a task that was created by
either the <code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code> method, and
<var title="">timeout</var> is less than 4, then increase <var title="">timeout</var> to 4.</li>
<li><p>If the currently running <a href=#concept-task title=concept-task>task</a> is a task that was created by the
<code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code>
method, and <var title="">timeout</var> is less than 4, then
increase <var title="">timeout</var> to 4.</li>

<li><p>Add an entry to the <a href=#list-of-active-timeouts>list of active timeouts</a>,
identified by a user-agent-defined integer that is greater than
Expand All @@ -52825,12 +52826,13 @@ <h3 id=timers><span class=secno>6.6 </span>Timers</h3>

<li>

<p>If <var title="">context</var> is a <code><a href=#window>Window</a></code> object,
wait until the <code>Document</code> associated with <var title="">context</var> has been <a href=#fully-active>fully active</a> for a
further <var title="">timeout</var> milliseconds (not necessarily
consecutively).</p>
<p>If the <a href=#method-context>method context</a> is a <code><a href=#window>Window</a></code>
object, wait until the <code>Document</code> associated with the
<a href=#method-context>method context</a> has been <a href=#fully-active>fully active</a> for
a further <var title="">timeout</var> milliseconds (not
necessarily consecutively).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>Otherwise, if the <a href=#method-context>method context</a> is a
<code><a href=#workerutils>WorkerUtils</a></code> object, wait until <var title="">timeout</var> milliseconds have passed with the worker
not suspended (not necessarily consecutively).</p>

Expand Down Expand Up @@ -52881,13 +52883,13 @@ <h3 id=timers><span class=secno>6.6 </span>Timers</h3>

<li>

<p><i>Wait</i>: If <var title="">context</var> is a
<p><i>Wait</i>: If the <a href=#method-context>method context</a> is a
<code><a href=#window>Window</a></code> object, wait until the <code>Document</code>
associated with <var title="">context</var> has been <a href=#fully-active>fully
associated with the <a href=#method-context>method context</a> has been <a href=#fully-active>fully
active</a> for a further <var title="">interval</var>
milliseconds (not necessarily consecutively).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>Otherwise, if the <a href=#method-context>method context</a> is a
<code><a href=#workerutils>WorkerUtils</a></code> object, wait until <var title="">interval</var> milliseconds have passed with the worker
not suspended (not necessarily consecutively).</p>

Expand All @@ -52912,7 +52914,12 @@ <h3 id=timers><span class=secno>6.6 </span>Timers</h3>
where <var title="">handle</var> is the argument passed to the
method.</p>

<hr><p>When the above methods are to <dfn id=get-the-timed-task>get the timed task</dfn>, they
<hr><p>The <dfn id=method-context>method context</dfn>, when referenced by the algorithms
in this section, is the object on which the method for which the
algorithm is running is implemented (a <code><a href=#window>Window</a></code> or
<code><a href=#workerutils>WorkerUtils</a></code> object).</p>

<p>When the above methods are to <dfn id=get-the-timed-task>get the timed task</dfn>, they
must run the following steps:</p>

<ol><li>
Expand All @@ -52933,32 +52940,30 @@ <h3 id=timers><span class=secno>6.6 </span>Timers</h3>
<li><p>Let <var title="">script language</var> be
JavaScript.</li>

<li><p>Let <var title="">context</var> be the object on which the
method is implemented (a <code><a href=#window>Window</a></code> or
<code><a href=#workerutils>WorkerUtils</a></code> object).</li>

<li>

<p>If <var title="">context</var> is a <code><a href=#window>Window</a></code> object,
let <var title="">global object</var> be <var title="">context</var>, let <var title="">browsing context</var>
be the <a href=#browsing-context>browsing context</a> with which <var title="">global object</var> is associated, let <var title="">character encoding</var> be the <a href="#document's-character-encoding" title="document's
character encoding">character encoding</a> of the
<code>Document</code> associated with <var title="">global
object</var> (<a href=#sce-not-copy>this is a reference, not a
copy</a>), and let <var title="">base URL</var> be the <a href=#document-base-url title="document base URL">base URL</a> of the
<code>Document</code> associated with <var title="">global
object</var> (<a href=#sbu-not-copy>this is a reference, not a
copy</a>).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>If the <a href=#method-context>method context</a> is a <code><a href=#window>Window</a></code>
object, let <var title="">global object</var> be the <a href=#method-context>method
context</a>, let <var title="">browsing context</var> be the
<a href=#browsing-context>browsing context</a> with which <var title="">global
object</var> is associated, let <var title="">character
encoding</var> be the <a href="#document's-character-encoding" title="document's character
encoding">character encoding</a> of the <code>Document</code>
associated with <var title="">global object</var> (<a href=#sce-not-copy>this is a reference, not a copy</a>), and let
<var title="">base URL</var> be the <a href=#document-base-url title="document base
URL">base URL</a> of the <code>Document</code> associated with
<var title="">global object</var> (<a href=#sbu-not-copy>this is
a reference, not a copy</a>).</p>

<p>Otherwise, if the <a href=#method-context>method context</a> is a
<code><a href=#workerutils>WorkerUtils</a></code> object, let <var title="">global
object</var>, <var title="">browsing context</var>, <var title="">character encoding</var>, and <var title="">base
URL</var> be the <a href="#script's-global-object">script's global object</a>,
<a href="#script's-browsing-context">script's browsing context</a>, <a href="#script's-url-character-encoding">script's URL
character encoding</a>, and <a href="#script's-base-url">script's base URL</a>
(respectively) of the <a href=#concept-script title=concept-script>script</a>
that the <a href=#run-a-worker>run a worker</a> algorithm created when it
created <var title="">context</var>.</p>
created the <a href=#method-context>method context</a>.</p>

<p>Otherwise, act as described in the specification that defines
that the <code><a href=#windowtimers>WindowTimers</a></code> interface is implemented by
Expand Down
63 changes: 34 additions & 29 deletions index
Expand Up @@ -52715,9 +52715,10 @@ interface <dfn id=windowtimers>WindowTimers</dfn> {

<li><p><a href=#get-the-timeout>Get the timeout</a>, and let <var title="">timeout</var> be the result.</li>

<li><p>If the currently running <a href=#concept-task title=concept-task>task</a> is a task that was created by
either the <code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code> method, and
<var title="">timeout</var> is less than 4, then increase <var title="">timeout</var> to 4.</li>
<li><p>If the currently running <a href=#concept-task title=concept-task>task</a> is a task that was created by the
<code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code>
method, and <var title="">timeout</var> is less than 4, then
increase <var title="">timeout</var> to 4.</li>

<li><p>Add an entry to the <a href=#list-of-active-timeouts>list of active timeouts</a>,
identified by a user-agent-defined integer that is greater than
Expand All @@ -52729,12 +52730,13 @@ interface <dfn id=windowtimers>WindowTimers</dfn> {

<li>

<p>If <var title="">context</var> is a <code><a href=#window>Window</a></code> object,
wait until the <code>Document</code> associated with <var title="">context</var> has been <a href=#fully-active>fully active</a> for a
further <var title="">timeout</var> milliseconds (not necessarily
consecutively).</p>
<p>If the <a href=#method-context>method context</a> is a <code><a href=#window>Window</a></code>
object, wait until the <code>Document</code> associated with the
<a href=#method-context>method context</a> has been <a href=#fully-active>fully active</a> for
a further <var title="">timeout</var> milliseconds (not
necessarily consecutively).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>Otherwise, if the <a href=#method-context>method context</a> is a
<code>WorkerUtils</code> object, wait until <var title="">timeout</var> milliseconds have passed with the worker
not suspended (not necessarily consecutively).</p>

Expand Down Expand Up @@ -52785,13 +52787,13 @@ interface <dfn id=windowtimers>WindowTimers</dfn> {

<li>

<p><i>Wait</i>: If <var title="">context</var> is a
<p><i>Wait</i>: If the <a href=#method-context>method context</a> is a
<code><a href=#window>Window</a></code> object, wait until the <code>Document</code>
associated with <var title="">context</var> has been <a href=#fully-active>fully
associated with the <a href=#method-context>method context</a> has been <a href=#fully-active>fully
active</a> for a further <var title="">interval</var>
milliseconds (not necessarily consecutively).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>Otherwise, if the <a href=#method-context>method context</a> is a
<code>WorkerUtils</code> object, wait until <var title="">interval</var> milliseconds have passed with the worker
not suspended (not necessarily consecutively).</p>

Expand All @@ -52816,7 +52818,12 @@ interface <dfn id=windowtimers>WindowTimers</dfn> {
where <var title="">handle</var> is the argument passed to the
method.</p>

<hr><p>When the above methods are to <dfn id=get-the-timed-task>get the timed task</dfn>, they
<hr><p>The <dfn id=method-context>method context</dfn>, when referenced by the algorithms
in this section, is the object on which the method for which the
algorithm is running is implemented (a <code><a href=#window>Window</a></code> or
<code>WorkerUtils</code> object).</p>

<p>When the above methods are to <dfn id=get-the-timed-task>get the timed task</dfn>, they
must run the following steps:</p>

<ol><li>
Expand All @@ -52837,32 +52844,30 @@ interface <dfn id=windowtimers>WindowTimers</dfn> {
<li><p>Let <var title="">script language</var> be
JavaScript.</li>

<li><p>Let <var title="">context</var> be the object on which the
method is implemented (a <code><a href=#window>Window</a></code> or
<code>WorkerUtils</code> object).</li>

<li>

<p>If <var title="">context</var> is a <code><a href=#window>Window</a></code> object,
let <var title="">global object</var> be <var title="">context</var>, let <var title="">browsing context</var>
be the <a href=#browsing-context>browsing context</a> with which <var title="">global object</var> is associated, let <var title="">character encoding</var> be the <a href="#document's-character-encoding" title="document's
character encoding">character encoding</a> of the
<code>Document</code> associated with <var title="">global
object</var> (<a href=#sce-not-copy>this is a reference, not a
copy</a>), and let <var title="">base URL</var> be the <a href=#document-base-url title="document base URL">base URL</a> of the
<code>Document</code> associated with <var title="">global
object</var> (<a href=#sbu-not-copy>this is a reference, not a
copy</a>).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>If the <a href=#method-context>method context</a> is a <code><a href=#window>Window</a></code>
object, let <var title="">global object</var> be the <a href=#method-context>method
context</a>, let <var title="">browsing context</var> be the
<a href=#browsing-context>browsing context</a> with which <var title="">global
object</var> is associated, let <var title="">character
encoding</var> be the <a href="#document's-character-encoding" title="document's character
encoding">character encoding</a> of the <code>Document</code>
associated with <var title="">global object</var> (<a href=#sce-not-copy>this is a reference, not a copy</a>), and let
<var title="">base URL</var> be the <a href=#document-base-url title="document base
URL">base URL</a> of the <code>Document</code> associated with
<var title="">global object</var> (<a href=#sbu-not-copy>this is
a reference, not a copy</a>).</p>

<p>Otherwise, if the <a href=#method-context>method context</a> is a
<code>WorkerUtils</code> object, let <var title="">global
object</var>, <var title="">browsing context</var>, <var title="">character encoding</var>, and <var title="">base
URL</var> be the <a href="#script's-global-object">script's global object</a>,
<a href="#script's-browsing-context">script's browsing context</a>, <a href="#script's-url-character-encoding">script's URL
character encoding</a>, and <a href="#script's-base-url">script's base URL</a>
(respectively) of the <a href=#concept-script title=concept-script>script</a>
that the <span>run a worker</span> algorithm created when it
created <var title="">context</var>.</p>
created the <a href=#method-context>method context</a>.</p>

<p>Otherwise, act as described in the specification that defines
that the <code><a href=#windowtimers>WindowTimers</a></code> interface is implemented by
Expand Down
69 changes: 34 additions & 35 deletions source
Expand Up @@ -59595,11 +59595,10 @@ interface <dfn>WindowTimers</dfn> {
title="">timeout</var> be the result.</p></li>

<li><p>If the currently running <span
title="concept-task">task</span> is a task that was created by
either the <code
title="dom-windowtimers-setTimeout">setTimeout()</code> method, and
<var title="">timeout</var> is less than 4, then increase <var
title="">timeout</var> to 4.</p></li>
title="concept-task">task</span> is a task that was created by the
<code title="dom-windowtimers-setTimeout">setTimeout()</code>
method, and <var title="">timeout</var> is less than 4, then
increase <var title="">timeout</var> to 4.</p></li>

<li><p>Add an entry to the <span>list of active timeouts</span>,
identified by a user-agent-defined integer that is greater than
Expand All @@ -59611,13 +59610,13 @@ interface <dfn>WindowTimers</dfn> {

<li>

<p>If <var title="">context</var> is a <code>Window</code> object,
wait until the <code>Document</code> associated with <var
title="">context</var> has been <span>fully active</span> for a
further <var title="">timeout</var> milliseconds (not necessarily
consecutively).</p>
<p>If the <span>method context</span> is a <code>Window</code>
object, wait until the <code>Document</code> associated with the
<span>method context</span> has been <span>fully active</span> for
a further <var title="">timeout</var> milliseconds (not
necessarily consecutively).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>Otherwise, if the <span>method context</span> is a
<code>WorkerUtils</code> object, wait until <var
title="">timeout</var> milliseconds have passed with the worker
not suspended (not necessarily consecutively).</p>
Expand Down Expand Up @@ -59681,13 +59680,13 @@ interface <dfn>WindowTimers</dfn> {

<li>

<p><i>Wait</i>: If <var title="">context</var> is a
<p><i>Wait</i>: If the <span>method context</span> is a
<code>Window</code> object, wait until the <code>Document</code>
associated with <var title="">context</var> has been <span>fully
associated with the <span>method context</span> has been <span>fully
active</span> for a further <var title="">interval</var>
milliseconds (not necessarily consecutively).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>Otherwise, if the <span>method context</span> is a
<code>WorkerUtils</code> object, wait until <var
title="">interval</var> milliseconds have passed with the worker
not suspended (not necessarily consecutively).</p>
Expand Down Expand Up @@ -59720,6 +59719,11 @@ interface <dfn>WindowTimers</dfn> {

<hr>

<p>The <dfn>method context</dfn>, when referenced by the algorithms
in this section, is the object on which the method for which the
algorithm is running is implemented (a <code>Window</code> or
<code>WorkerUtils</code> object).</p>

<p>When the above methods are to <dfn>get the timed task</dfn>, they
must run the following steps:</p>

Expand All @@ -59744,28 +59748,23 @@ interface <dfn>WindowTimers</dfn> {
<li><p>Let <var title="">script language</var> be
JavaScript.</p></li>

<li><p>Let <var title="">context</var> be the object on which the
method is implemented (a <code>Window</code> or
<code>WorkerUtils</code> object).</p></li>

<li>

<p>If <var title="">context</var> is a <code>Window</code> object,
let <var title="">global object</var> be <var
title="">context</var>, let <var title="">browsing context</var>
be the <span>browsing context</span> with which <var
title="">global object</var> is associated, let <var
title="">character encoding</var> be the <span title="document's
character encoding">character encoding</span> of the
<code>Document</code> associated with <var title="">global
object</var> (<a href="#sce-not-copy">this is a reference, not a
copy</a>), and let <var title="">base URL</var> be the <span
title="document base URL">base URL</span> of the
<code>Document</code> associated with <var title="">global
object</var> (<a href="#sbu-not-copy">this is a reference, not a
copy</a>).</p>

<p>Otherwise, if <var title="">context</var> is a
<p>If the <span>method context</span> is a <code>Window</code>
object, let <var title="">global object</var> be the <span>method
context</span>, let <var title="">browsing context</var> be the
<span>browsing context</span> with which <var title="">global
object</var> is associated, let <var title="">character
encoding</var> be the <span title="document's character
encoding">character encoding</span> of the <code>Document</code>
associated with <var title="">global object</var> (<a
href="#sce-not-copy">this is a reference, not a copy</a>), and let
<var title="">base URL</var> be the <span title="document base
URL">base URL</span> of the <code>Document</code> associated with
<var title="">global object</var> (<a href="#sbu-not-copy">this is
a reference, not a copy</a>).</p>

<p>Otherwise, if the <span>method context</span> is a
<code>WorkerUtils</code> object, let <var title="">global
object</var>, <var title="">browsing context</var>, <var
title="">character encoding</var>, and <var title="">base
Expand All @@ -59774,7 +59773,7 @@ interface <dfn>WindowTimers</dfn> {
character encoding</span>, and <span>script's base URL</span>
(respectively) of the <span title="concept-script">script</span>
that the <span>run a worker</span> algorithm created when it
created <var title="">context</var>.</p>
created the <span>method context</span>.</p>

<p>Otherwise, act as described in the specification that defines
that the <code>WindowTimers</code> interface is implemented by
Expand Down

0 comments on commit 986f389

Please sign in to comment.