@@ -89211,6 +89211,8 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89211
89211
89212
89212
<li><p><i>Microtasks</i>: <span>Perform a microtask checkpoint</span>.</p></li>
89213
89213
89214
+ <li><p>Let <var>hasARenderingOpportunity</var> be false.</p></li>
89215
+
89214
89216
<li><p>Let <var>now</var> be the <span>current high resolution time</span>. <ref
89215
89217
spec=HRT></p></li>
89216
89218
@@ -89238,9 +89240,9 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89238
89240
89239
89241
<ol>
89240
89242
<li>
89241
- <p>Let <var>docs</var> be the list of <code>Document</code> objects associated with the
89242
- < span>event loop</span> in question , sorted arbitrarily except that the following conditions
89243
- must be met:</p>
89243
+ <p>Let <var>docs</var> be all <code>Document</code> objects whose <span>relevant
89244
+ agent</ span>'s <span> event loop</span> is this event loop , sorted arbitrarily except that the
89245
+ following conditions must be met:</p>
89244
89246
89245
89247
<ul>
89246
89248
<li><p>Any <code>Document</code> <var>B</var> whose <span
@@ -89262,11 +89264,9 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89262
89264
</li>
89263
89265
89264
89266
<li>
89265
- <p><i>Rendering opportunites</i>: If there are <span data-x="browsing context">browsing
89266
- contexts</span> <var>browsingContexts</var> that do not have a <span>rendering
89267
- opportunity</span>, then remove from <var>docs</var> all <code>Document</code> objects whose
89268
- <span data-x="concept-document-bc">browsing context</span> is in
89269
- <var>browsingContexts</var>.</p>
89267
+ <p><i>Rendering opportunities</i>: Remove from <var>docs</var> all <code>Document</code>
89268
+ objects whose <span data-x="concept-document-bc">browsing context</span> do not have a
89269
+ <span>rendering opportunity</span>.</p>
89270
89270
89271
89271
<p>A <span>browsing context</span> has a <dfn>rendering opportunity</dfn> if the user agent is
89272
89272
currently able to present the contents of the <span>browsing context</span> to the user,
@@ -89288,19 +89288,23 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89288
89288
a much slower 4 rendering opportunities per second, or even less.</p>
89289
89289
</li>
89290
89290
89291
- <li><p><i>Unnecessary rendering</i>: If there are <span data-x="browsing context">browsing
89292
- contexts</span> <var>browsingContexts</var> for which the user agent believes updating the
89293
- rendering would have no visible effect and which possess no <code>Document</code> objects with
89294
- a non-empty <span>map of animation frame callbacks</span>, then remove from <var>docs</var>
89295
- all <code>Document</code> objects whose <span data-x="concept-document-bc">browsing
89296
- context</span> is in <var>browsingContexts</var>.</p></li>
89291
+ <li><p>If <var>docs</var> is not empty, then set <var>hasARenderingOpportunity</var> to
89292
+ true.</p></li>
89297
89293
89298
89294
<li>
89299
- <p>If there are <span data-x="browsing context">browsing contexts</span>
89300
- <var>browsingContexts</var> for which the user agent believes it's preferrable to skip
89301
- updating the rendering for other reasons, then remove from <var>docs</var> all
89302
- <code>Document</code> objects whose <span data-x="concept-document-bc">browsing context</span>
89303
- is in <var>browsingContexts</var>.</p>
89295
+ <p><i>Unnecessary rendering</i>: Remove from <var>docs</var> all <code>Document</code> objects
89296
+ which meet both of the following conditions:</p>
89297
+
89298
+ <ul class="brief">
89299
+ <li>The user agent believes that updating the rendering of the <code>Document</code>'s <span
89300
+ data-x="concept-document-bc">browsing context</span> would have no visible effect, and</li>
89301
+ <li>The <code>Document</code>'s <span>map of animation frame callbacks</span> is empty.</li>
89302
+ </ul>
89303
+ </li>
89304
+
89305
+ <li>
89306
+ <p>Remove from <var>docs</var> all <code>Document</code> objects for which the user agent
89307
+ believes that it's preferrable to skip updating the rendering for other reasons.</p>
89304
89308
89305
89309
<div class="note">
89306
89310
<p>The step labeled <i>Rendering opportunities</i> prevents the user agent from updating the
@@ -89359,6 +89363,25 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89359
89363
<li><p>For each <span>fully active</span> <code>Document</code> in <var>docs</var>, update the
89360
89364
rendering or user interface of that <code>Document</code> and its <span
89361
89365
data-x="concept-document-bc">browsing context</span> to reflect the current state.</p></li>
89366
+
89367
+ <li>
89368
+ <p>Report the duration of the <span>update the rendering</span> step by performing the
89369
+ following steps:</p>
89370
+
89371
+ <ol>
89372
+ <li><p>Let <var>rendering end time</var> be the <span>current high resolution
89373
+ time</span>.</p></li>
89374
+
89375
+ <li><p>Let <var>top-level browsing contexts</var> be the set of all <span data-x="top-level
89376
+ browsing context">top-level browsing contexts</span> of the <span
89377
+ data-x="concept-document-bc">browsing contexts</span> of all <span>fully active</span>
89378
+ <code>Document</code>s in <var>docs</var>.</p></li>
89379
+
89380
+ <li><p><span>Report long tasks</span>, passing in <var>now</var> (repurposed as meaning the
89381
+ beginning of the <span>update the rendering</span> step), <var>rendering end time</var>, and
89382
+ <var>top-level browsing contexts</var>.</p></li>
89383
+ </ol>
89384
+ </li>
89362
89385
</ol>
89363
89386
</li>
89364
89387
@@ -89367,36 +89390,17 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89367
89390
89368
89391
<ul class="brief">
89369
89392
<li>this is a <span>window event loop</span></li>
89370
- <li>there is no <span data-x="concept-task">task</span> in the <span>event loop</span>'s
89393
+ <li>there is no <span data-x="concept-task">task</span> in this <span>event loop</span>'s
89371
89394
<span data-x="task queue">task queues</span> whose <span
89372
89395
data-x="concept-task-document">document</span> is <span>fully active</span></li>
89373
- <li>the <span>event loop</span>'s <span>microtask queue</span> is <span data-x="list is
89396
+ <li>this <span>event loop</span>'s <span>microtask queue</span> is <span data-x="list is
89374
89397
empty">empty</span></li>
89375
- <li>none of the <span data-x="browsing context">browsing contexts</span> have a
89376
- <span>rendering opportunity</span></li>
89398
+ <li><var>hasARenderingOpportunity</var> is false</li>
89377
89399
</ul>
89378
89400
89379
- <p>then for each <span>browsing context</span>, run the steps in the <span>start an idle period
89380
- algorithm</span>, passing the <code>Window</code> associated with that <span>browsing
89381
- context</span>. <ref spec="REQUESTIDLECALLBACK"></p>
89382
- </li>
89383
-
89384
- <li>
89385
- <p>Report the duration of the <span>update the rendering</span> step by performing the
89386
- following steps:</p>
89387
-
89388
- <ol>
89389
- <li><p>Let <var>rendering end time</var> be the <span>current high resolution
89390
- time</span>.</p></li>
89391
-
89392
- <li><p>Let <var>top-level browsing contexts</var> be the set of all <span data-x="top-level
89393
- browsing context">top-level browsing contexts</span> of all <span>fully active</span>
89394
- <code>Document</code>s in <var>docs</var>.</p></li>
89395
-
89396
- <li><p><span>Report long tasks</span>, passing in <var>now</var> (repurposed as meaning the
89397
- beginning of the <span>update the rendering</span> step), <var>rendering end time</var>, and
89398
- <var>top-level browsing contexts</var>.</p></li>
89399
- </ol>
89401
+ <p>then for each <code>Window</code> object whose whose <span>relevant agent</span>'s
89402
+ <span>event loop</span> is this event loop, run the <span>start an idle period
89403
+ algorithm</span>, passing the <code>Window</code>. <ref spec="REQUESTIDLECALLBACK"></p>
89400
89404
</li>
89401
89405
89402
89406
<li>
0 commit comments