diff --git a/css-contain-2/Overview.bs b/css-contain-2/Overview.bs index 614339e5a8a..6d134c124f4 100644 --- a/css-contain-2/Overview.bs +++ b/css-contain-2/Overview.bs @@ -1994,6 +1994,45 @@ Suppressing An Element's Contents Entirely: the 'content-visibility' property {# When the element becomes disconnected, the element's [=proximity to the viewport=] becomes [=not determined=]. +
+ All elements have a currently relevant to the user flag, initially false. +
+ +
+ To update currently relevant to the user given an element element: + + 1. Let currentlyRelevant be true if element is [=relevant to the user=], otherwise false. + 1. If element's [=currently relevant to the user=] flag is equal to currentlyRelevant, then return false. + 1. Set element's [=currently relevant to the user=] flag to currentlyRelevant. + 1. return true. +
+ +
+ To update content relevancy for a document given a document doc, and a boolean updateNonInitial: + + 1. Let changed be false. + 1. For each element [=connected=] to doc with ''auto'' used value of ''content-visibility'': + 1. If updateNonInitial is true: + 1. If [=update currently relevant to the user=] for element returns true. + 1. Set changed to true. + 1. Let isInitialDetermination be true if element's [=proximity to the viewport=] is [=not determined=], otherwise false. + 1. Determine [=proximity to the viewport=] for element. + 1. If isInitialDetermination is false, then [=continue=]. + 1. If [=update currently relevant to the user=] for element returns true. + 1. Set changed to true. + 1. return changed. + +
+ The intent of the changed and updateNonInitial + variables is for the initial viewport proximity determination, which takes + effect immediately, to be reflected in the style and layout calculation + this frame. + + Proximity determinations other than the initial one take effect + at the next rendering opportunity. +
+
+
An element is relevant to the user if any of the following conditions are true: @@ -2308,14 +2347,7 @@ Restrictions and Clarifications {#cv-notes} 3. If an element starts or stops [=skipped contents|skipping its contents=], - this change happens - after the requestAnimationFrame callbacks - of the frame that renders the effects of the change - have run. - Specifically, such changes will take effect between steps 13 and 14 - of [=update the rendering=] step of the Processing Model - (between “run the animation frame callbacks” - and “run the update intersection observations steps”). + this change happens when [=update content relevancy for a document=] runs.
Determining the viewport intersection of the element