Skip to content

Commit ead19e7

Browse files
committed
Deal with content-visibility during the layout loop.
Partially fixes #11210
1 parent dfdafb4 commit ead19e7

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

source

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -113769,44 +113769,21 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
113769113769

113770113770
<ol>
113771113771
<li><p>Let <var>resizeObserverDepth</var> be 0.</p></li>
113772+
<li><p>Let <var>updateNonInitialContentVisibilityAutoRelevancy</var> be true.</p></li>
113772113773

113773113774
<li>
113774113775
<p>While true:</p>
113775113776

113776113777
<ol>
113777113778
<li><p>Recalculate styles and update layout for <var>doc</var>.</p></li>
113778113779

113779-
<li><p>Let <var>hadInitialVisibleContentVisibilityDetermination</var> be false.</p></li>
113780+
<li><p>Let <var>contentVisibilityChanged</var> be the result of calling <span>update
113781+
content relevancy for a document</span> with <var>doc</var> and
113782+
<var>updateNonInitialContentVisibilityAutoRelevancy</var>.</p></li>
113780113783

113781-
<li>
113782-
<p>For each element <var>element</var> with <span
113783-
data-x="content-visibility-auto">'auto'</span> used value of
113784-
<span>'content-visibility'</span>:</p>
113785-
113786-
<ol>
113787-
<li><p>Let <var>checkForInitialDetermination</var> be true if <var>element</var>'s
113788-
<span>proximity to the viewport</span> is not determined and it is not <span>relevant to
113789-
the user</span>. Otherwise, let <var>checkForInitialDetermination</var> be
113790-
false.</p></li>
113791-
113792-
<li><p>Determine <span>proximity to the viewport</span> for <var>element</var>.</p></li>
113784+
<li><p>Set <var>updateNonInitialContentVisibilityAutoRelevancy</var> to false.</p></li>
113793113785

113794-
<li><p>If <var>checkForInitialDetermination</var> is true and <var>element</var> is now
113795-
<span>relevant to the user</span>, then set
113796-
<var>hadInitialVisibleContentVisibilityDetermination</var> to true.</p></li>
113797-
</ol>
113798-
</li>
113799-
113800-
<li>
113801-
<p>If <var>hadInitialVisibleContentVisibilityDetermination</var> is true, then
113802-
<span>continue</span>.</p>
113803-
113804-
<p class="note">The intent of this step is for the initial viewport proximity
113805-
determination, which takes effect immediately, to be reflected in the style and layout
113806-
calculation which is carried out in a previous step of this loop. Proximity
113807-
determinations other than the initial one take effect at the next <span>rendering
113808-
opportunity</span>. <ref>CSSCONTAIN</ref></p>
113809-
</li>
113786+
<li><p>If <var>contentVisibilityChanged</var> is true, then <span>continue</span>.</p></li>
113810113787

113811113788
<li><p><span>Gather active resize observations at depth</span>
113812113789
<var>resizeObserverDepth</var> for <var>doc</var>.</p></li>

0 commit comments

Comments
 (0)