You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CLS] Don't count layout shifts due to content-visibility:auto unskipping
content-visibility:auto elements have different sizing behavior when
near the viewport vs not. This sizing behavior is an intentional part
of the platform, and should not be considered a layout shift for the
the first time the elements' subtrees become unskipped (*).
There are two cases of "first time":
* The very first paint when a content-visiblity:auto element is in the
DOM, and in which the element is found in that frame to be near the
viewport.
* The first paint *after* a content-visiblity:auto element has been
found to be near the viewport, but was was found for at least one
frame previously not to be near it.
These two cases are handled in somewhat different ways in Blink - the
former is a synchronous relayout, whereas the second is async.
In both cases, CLS should not be impacted.
In the future, we could consider in the future whether layout shifts
for subsequent unskips should also not count for CLS.
Bug: 1151526
(*) https://drafts.csswg.org/css-contain-2/#skips-its-contents
Change-Id: I9421452430dd572ed87bb20b0bd20e9a7e3501a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2556211
Commit-Queue: Chris Harrelson <[email protected]>
Reviewed-by: Annie Sullivan <[email protected]>
Reviewed-by: Xianzhu Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#830774}
0 commit comments