Skip to content

Commit e43abf1

Browse files
authored
Integrate Resize Observer and expand "update the rendering"
This includes upstreaming the monkeypatch from the Resize Observer specification, which adds more detail to the "update the rendering" steps to include an explicit "Recalculate styles and update layout" step. This enables us to be clear that intersection observer integration and marking paint timing happens after that step. Fixes #8277.
1 parent 1fcb55e commit e43abf1

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

source

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3983,6 +3983,20 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
39833983
</dd>
39843984

39853985

3986+
<dt>Resize Observer</dt>
3987+
3988+
<dd>
3989+
<p>The following terms are defined in <cite>Resize Observer</cite>: <ref spec=RESIZEOBSERVER></p>
3990+
3991+
<ul class="brief">
3992+
<li><dfn data-x-href="https://w3c.github.io/csswg-drafts/resize-observer-1/#gather-active-observations-h">gather active resize observations at depth</dfn></li>
3993+
<li><dfn data-x-href="https://w3c.github.io/csswg-drafts/resize-observer-1/#has-active-observations-h">has active resize observations</dfn></li>
3994+
<li><dfn data-x-href="https://w3c.github.io/csswg-drafts/resize-observer-1/#has-skipped-observations-h">has skipped resize observations</dfn></li>
3995+
<li><dfn data-x-href="https://w3c.github.io/csswg-drafts/resize-observer-1/#broadcast-resize-notifications-h">broadcast active resize observations</dfn></li>
3996+
<li><dfn data-x-href="https://w3c.github.io/csswg-drafts/resize-observer-1/#deliver-resize-error">deliver resize loop error</dfn></li>
3997+
</ul>
3998+
</dd>
3999+
39864000

39874001
<dt>WebGL</dt>
39884002

@@ -95922,12 +95936,45 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
9592295936
the animation frame callbacks</span> for that <code>Document</code>, passing in <var>now</var>
9592395937
as the timestamp.</p></li>
9592495938

95939+
<li>
95940+
<p>For each <span>fully active</span> <code>Document</code> <var>doc</var> in
95941+
<var>docs</var>:</p>
95942+
95943+
<ol>
95944+
<li><p>Recalculate styles and update layout for <var>doc</var>.</p></li>
95945+
95946+
<li><p>Let <var>depth</var> be 0.</p></li>
95947+
95948+
<li><p><span>Gather active resize observations at depth</span> <var>depth</var> for
95949+
<var>doc</var>.</p></li>
95950+
95951+
<li>
95952+
<p>While <var>doc</var> <span>has active resize observations</span>:</p>
95953+
95954+
<ol>
95955+
<li><p>Set <var>depth</var> to the result of
95956+
<span data-x="broadcast active resize observations">broadcasting active resize
95957+
observations</span> given <var>doc</var>.</p></li>
95958+
95959+
<li><p>Recalculate styles and update layout for <var>doc</var>.</p></li>
95960+
95961+
<li><p><span>Gather active resize observations at depth</span> <var>depth</var> for
95962+
<var>doc</var>.</p></li>
95963+
</ol>
95964+
</li>
95965+
95966+
<li><p>If <var>doc</var> <span>has skipped resize observations</span>, then <span>deliver
95967+
resize loop error</span> given <var>doc</var>.</p></li>
95968+
</ol>
95969+
</li>
95970+
9592595971
<li><p>For each <span>fully active</span> <code>Document</code> in <var>docs</var>, <span>run
9592695972
the update intersection observations steps</span> for that <code>Document</code>, passing in
9592795973
<var>now</var> as the timestamp. <ref spec=INTERSECTIONOBSERVER></p></li>
9592895974

9592995975
<li><p>Invoke the <span>mark paint timing</span> algorithm for each <code>Document</code>
9593095976
object in <var>docs</var>.</p></li>
95977+
<!-- TODO: should this only happen for fully active documents? Seems weird otherwise -->
9593195978

9593295979
<li><p>For each <span>fully active</span> <code>Document</code> in <var>docs</var>, update the
9593395980
rendering or user interface of that <code>Document</code> and its <span
@@ -127546,6 +127593,9 @@ INSERT INTERFACES HERE
127546127593
<dt id="refsINTERSECTIONOBSERVER">[INTERSECTIONOBSERVER]</dt>
127547127594
<dd><cite><a href="https://w3c.github.io/IntersectionObserver/">Intersection Observer</a></cite>, S. Zager. W3C.</dd>
127548127595

127596+
<dt id="refsRESIZEOBSERVER">[RESIZEOBSERVER]</dt>
127597+
<dd><cite><a href="http://w3c.github.io/csswg-drafts/resize-observer-1/">Resize Observer</a></cite>, O. Brufau, E. Álvarez. W3C.</dd>
127598+
127549127599
<dt id="refsISO3166">[ISO3166]</dt>
127550127600
<dd><cite><a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166: Codes for the representation of names of countries and their subdivisions</a></cite>. ISO.</dd>
127551127601

0 commit comments

Comments
 (0)