Propagate scrollbar-gutter to the viewport #28282
Merged
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 CL implements the propagation of scrollbar-gutter from the
root element to the viewport.
Relevant CSSWG discussion:
w3c/csswg-drafts#6079
LayoutBox will not try to apply scrollbar gutters to the element
which propagated its overflow properties to the viewport
("viewport-defining element") to avoid duplicating the ones
that may be created by the viewport itself.
Note: following the current CSSOM View spec, clientWidth and
clientHeight in the viewport-defining element will return the
corresponding viewport dimension excluding the size of any
rendered scrollbars, but not excluding empty scrollbar gutters:
https://www.w3.org/TR/cssom-view-1/#dom-element-clientwidth
https://www.w3.org/TR/cssom-view-1/#dom-element-clientheight
Bug: 710214
Change-Id: I65dca9791125d91b8be7b7c51779d5821f232cf9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2766822
Commit-Queue: Felipe Erias <felipeerias@igalia.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#871779}