scrollbar-gutter: "force" keyword #25490
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.
Implementation of "force" for the scrollbar-gutter CSS property.
This keyword forces a gutter on a non-scrollable element, so
it can be accurately aligned with nearby scrollable areas
(e.g. when implementing a header).
css_properties.json5:
scrollbar-gutter becomes non-inheritable, as otherwise the children
inside a "force" element would also get gutters of their own,
messing up the layout. This matches the current editor's draft:
https://drafts.csswg.org/css-overflow-4/#scrollbar-gutter-property
paint_layer:
Assign a scrollable area to "force" elements, in order to calculate
the size of scrollbar gutters.
layout_box:
Assign a layer to "force" elements.
Take "force" into account when checking for scrollbar gutters.
ScrollWidth and ScrollHeight defer to the scrollable area for
"force" elements.
Updated and expanded the scrollbar-gutter tests.
Bug: 710214
Change-Id: Iea25ded4b7b635edeb513a93e30645326eb051e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404233
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Felipe Erias Morandeira <felipeerias@gmail.com>
Cr-Commit-Position: refs/heads/master@{#806887}