Skip to content

Commit

Permalink
More PR nits
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr committed Nov 2, 2021
1 parent aeeacc4 commit ea2a8da
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<dfn data-x="map set" data-x-href="https://infra.spec.whatwg.org/#map-set">setting the value of an entry</dfn>,
<dfn data-x="map remove" data-x-href="https://infra.spec.whatwg.org/#map-remove">removing an entry</dfn>,
<dfn data-x="map clear" data-x-href="https://infra.spec.whatwg.org/#map-clear">clear</dfn>,
<dfn data-x="map empty" data-x-href="https://infra.spec.whatwg.org/#map-is-empty">empty</dfn>,
<dfn data-x="map get the keys" data-x-href="https://infra.spec.whatwg.org/#map-getting-the-keys">getting the keys</dfn>,
<dfn data-x="map get the values" data-x-href="https://infra.spec.whatwg.org/#map-getting-the-values">getting the values</dfn>,
<dfn data-x="map size" data-x-href="https://infra.spec.whatwg.org/#map-size">size</dfn>, and
Expand Down Expand Up @@ -88521,13 +88520,24 @@ new PaymentRequest(&hellip;); // Allowed to use
then:</p>

<ol>
<li><p>Set <var>suspendDuration</var> to the <span>current high resolution time</span> minus
<var>newDocument</var>'s <span>suspension time</span>.</p></li>
<li>
<p>If <var>newDocument</var>'s <span>suspended timer handles</span> is not
<span data-x="list empty">empty</span>:</p>

<ol>
<li><p>Assert: <var>newDocument</var>'s <span>suspension time</span> is not zero.</p><li>

<li><p>Let <var>activeTimers</var> be <var>newDocument</var>'s
<span>relevant global object</span>'s <span>map of active timers</span>.</p></li>

<li><p>For each <var>handle</var> in <var>newDocument</var>'s
<span>suspended timer handles</span>, if the <span>map of active timers</span> contains
<var>handle</var>, increase <span>map of active timers</span>[handle] by
<var>suspendDuration</var>.
<li><p>Set <var>suspendDuration</var> to the <span>current high resolution time</span> minus
<var>newDocument</var>'s <span>suspension time</span>.</p></li>

<li><p>For each <var>handle</var> in <span>suspended timer handles</span>, if
<var>activeTimers</var>[<var>handle</var>] <span data-x="map exists">exists</span>, then
increase <var>activeTimers</var>[<var>handle</var>] by <var>suspendDuration</var>.</p></li>
</ol>
</li>

<li><p>Remove any <span data-x="concept-task">tasks</span> queued by the <span>history traversal
task source</span> that are associated with any <code>Document</code> objects in the
Expand Down Expand Up @@ -93812,8 +93822,15 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
<p>If <var>hasPendingRenders</var> is true, then:</p>

<ol>
<li><p>Let <var>nextRenderDeadline</var> be this <span>event loop</span>'s
<span>last render opportunity time</span> plus 1000 / 60.</p></li>
<li>
<p>Let <var>nextRenderDeadline</var> be this <span>event loop</span>'s
<span>last render opportunity time</span> plus 1000 divided by the current refersh
rate.</p>

<p>The rerfresh rate can be hardware or implementation specific. For a refresh rate of
60Hz, the <var>nextRenderDeadline</var> would be about 16.67ms after the
<span>last render opportunity time</span>.</p>
</li>

<li><p>If <var>nextRenderDeadline</var> is less than
<var>deadline</var>, then return <var>nextRenderDeadline</var>.</p></li>
Expand All @@ -93825,8 +93842,8 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
</li>

<li><p>For each <var>win</var> of the <span>same-loop windows</span> for
this <span>event loop</span>, <span>start an idle period algorithm</span> for <var>win</var> with
<var>computeDeadline</var>. <ref spec=REQUESTIDLECALLBACK></p></li>
this <span>event loop</span>, perform the <span>start an idle period algorithm</span> for
<var>win</var> with <var>computeDeadline</var>. <ref spec=REQUESTIDLECALLBACK></p></li>
</ol>
</li>

Expand Down Expand Up @@ -96278,7 +96295,7 @@ enum <dfn enum>DOMParserSupportedType</dfn> {
id="dom-windowtimers-clearInterval">clearInterval(<var>handle</var>)</code></dfn> methods must
<span data-x="map remove">remove</span> <span>map of active timers</span>[<var>handle</var>] of
the <code>WindowOrWorkerGlobalScope</code> object on which the method was invoked, if any, where
<var>handle</var> is the argument passed to the method.
<var>handle</var> is the argument passed to the method.</p>

<p class="note">Because <code data-x="dom-clearTimeout">clearTimeout()</code> and <code
data-x="dom-clearInterval">clearInterval()</code> clear entries from the same map, either method
Expand Down Expand Up @@ -96318,8 +96335,8 @@ enum <dfn enum>DOMParserSupportedType</dfn> {
following substeps:</p>

<ol>
<li><p>If <var>handle</var> does not <span data-x="map exists">exist</span> in the
<span>map of active timers</span>, then abort these steps.</p></li>
<li><p>If <var>handle</var> does not <span data-x="map exists">exist</span> in
<var>method context</var>'s <span>map of active timers</span>, then abort these steps.</p></li>

<li>
<p>Run the appropriate set of steps from the following list:</p>
Expand Down

0 comments on commit ea2a8da

Please sign in to comment.