Skip to content

Commit 96b1208

Browse files
committed
Deal with content-visibility during the layout loop.
Partially fixes #11210
1 parent 8f058e4 commit 96b1208

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

source

+6-29
Original file line numberDiff line numberDiff line change
@@ -113768,44 +113768,21 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
113768113768

113769113769
<ol>
113770113770
<li><p>Let <var>resizeObserverDepth</var> be 0.</p></li>
113771+
<li><p>Let <var>isInitialIteration</var> be true.</p></li>
113771113772

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

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

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

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

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

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

0 commit comments

Comments
 (0)