Description[CSS Grid Layout] Fix missing layout in flexible and content sized columns
RenderGrid::logicalContentHeightForChild() is called for some items at
the beginning of RenderGrid::layoutGridItems() from
RenderGrid::computeUsedBreadthOfGridTracks(). This causes that the
comparison inside the for loop in RenderGrid::layoutGridItems() does not
detect width changes, so elements won't be marked as needsLayout.
So the comparison is done in RenderGrid::logicalContentHeightForChild()
and the element is marked to perform a layout if the width has changed.
The issue can be reproduced easily with a simple grid with one flexible
or content sized column, all the available width is not used. On top
of that, when you resize the window the flexible or content sized
columns are not updating their size properly.
Perftest Layout/auto-grid-lots-of-data.html is around 4% worse, which is
expected as we're adding a missing layout.
TEST=fast/css-grid-layout/flex-content-sized-column-use-available-width.html,fast/css-grid-layout/flex-content-sized-columns-resize.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166914
Patch Set 1 #
Total comments: 1
Patch Set 2 : #Patch Set 3 : Move check to RenderGrid::resolveContentBasedTrackSizingFunctions() #
Total comments: 5
Patch Set 4 : New version of the patch fixing layout tests and comming back to original approach #
Messages
Total messages: 10 (0 generated)
|