Description[css-grid] Clearing the override height before layout
The stretching logic sets an override height to the grid item so it's
used instead of the regular one, computed in the LayoutBox class. This
override height is computed using the 'grid area' abstraction as item's
containing block.
It's expectable that a style update where item's Self Alginment CSS
properties change from 'stretch' to any other value implies recomputing
the item's size.
The currently implemented stretching logic clears the override flags
before determining whether to assign an stretched override height. We
expect that the layout performed later will adjust the grid item's
height.
However, if the grid item has been laid out already it doesn't adjust
its height, even though the override has been cleared already. This is
precisely the situation detected in the bug, because the Baseline
Alignment logic performs a layout of the grid item before computing the
baseline offsets. This layout causes that the grid item's size is not
computed again after clearing the override flag.
There may be other cases like the one detected in the bug, so with this
patch we are clearing the override flag at the beginning of the layout.
This is a change we wanted to do ling time ago, since the override flags
should be more consistent and not affecting intermediate operations,
even repeating the layout operation.
BUG=709902
Review-Url: https://codereview.chromium.org/2832783003
Cr-Commit-Position: refs/heads/master@{#468672}
Committed: https://chromium.googlesource.com/chromium/src/+/00833a5660df5bddeb6dabc8a2dfe9fbb94662ff
Patch Set 1 #
Total comments: 3
Patch Set 2 : Added test and some optimizations. #
Total comments: 12
Patch Set 3 : Applied some changes to the test. #Patch Set 4 : Applied suggested changes. #
Total comments: 2
Patch Set 5 : Modified comment, as requested. #Patch Set 6 : Patch rebased. #
Messages
Total messages: 19 (6 generated)
|