Skip to content

Commit 837af8b

Browse files
committed
Add a note about first-time content-visibility: auto
1 parent 7318f96 commit 837af8b

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

css-contain-2/Overview.bs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,20 @@ Restrictions and Clarifications {#cv-notes}
12921292
and not cause any forced layouts.
12931293
</div>
12941294

1295-
4. For the purposes of scrolling operations,
1295+
4. The initial determination of visibility for ''content-visibility: auto'' must
1296+
happen in the same frame that determined an existence of a new
1297+
''content-visibility: auto'' element.
1298+
1299+
<div class=note>
1300+
When an element first gains ''content-visibility: auto'', it may or may not
1301+
be positioned on screen. The determination of this state and thus
1302+
determination of whether this element is [=skipped=] must happen in the
1303+
same frame. If it does not, then there is a possibility of producing blank
1304+
content in the element's place since visibility check and [=skipped=] state
1305+
update would be deferred to the next frame.
1306+
</div>
1307+
1308+
5. For the purposes of scrolling operations,
12961309
such as {{Element/scrollIntoView()}},
12971310
an element with ''content-visibility: auto''
12981311
that is [=skipping its contents=]
@@ -1305,7 +1318,7 @@ Restrictions and Clarifications {#cv-notes}
13051318
if this changes the element's size,
13061319
it might not align in the viewport exactly as requested.
13071320

1308-
5. If an element with ''content-visibility: auto''
1321+
6. If an element with ''content-visibility: auto''
13091322
that is [=skipping its contents=]
13101323
is focused
13111324
(or its contents are),
@@ -1317,7 +1330,7 @@ Restrictions and Clarifications {#cv-notes}
13171330
the element <em>will</em> be correctly sized and aligned in the viewport.
13181331
This is consistent with the order of the steps for the {{HTMLOrSVGElement/focus()}} method.
13191332

1320-
6. If an <{iframe}> [=skips its contents=]
1333+
7. If an <{iframe}> [=skips its contents=]
13211334
or is part of an element's [=skipped contents=],
13221335
the user agent should entirely skip the [=Update The Rendering=]
13231336
step in the iframe's event loop,
@@ -1327,7 +1340,7 @@ Restrictions and Clarifications {#cv-notes}
13271340
it needs to run that step at least once
13281341
to remove the painted output.
13291342

1330-
7. [=Skipped contents=] do not contribute to the result of {{HTMLElement/innerText}}.
1343+
8. [=Skipped contents=] do not contribute to the result of {{HTMLElement/innerText}}.
13311344

13321345
Accessibility Implications {#cv-a11y}
13331346
-------------------------------------

0 commit comments

Comments
 (0)