content-visibility: Ignore layout shifts if auto lock visibility is toggled. #27205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch ignores layout shifts in the frame where an auto lock switched
from being renderer to unrendered or vice versa. The reasoning for this
is that the content-visibility element is likely to change size due to
size-containment being applied. That size can, and frequenty does, shift
contents in the viewport. We rely on scroll anchoring to ensure nothing
visibly changes.
However, the position of the element does change. We prefer not to
penalize the site for this.
R=sullivan@chromium.org, skobes@chromium.org
Bug: 1164942
Change-Id: I3dc53813147f0ffeec6c6ceb4d6825042fe33a63
Reviewed-on: https://chromium-review.googlesource.com/2633688
WPT-Export-Revision: 386735a9dca6f351543ee1008a3e8a85f5706206