[CSS Grid Layout] min-content row does not always shrink
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 09:02:50 +0000 (09:02 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 09:02:50 +0000 (09:02 +0000)
commit67584c0d52c197619b7cf0656b66741f6a0c1f68
treed5555282f788f752cddbbb7b90e669526793ee59
parent72abf17aed41c4f9a50fcb9607f086310d929c9b
[CSS Grid Layout] min-content row does not always shrink
https://bugs.webkit.org/show_bug.cgi?id=144581

Reviewed by Zalan Bujtas.

Source/WebCore:

Grid items height must be recomputed whenever the grid tracks
change if the items had been previously stretched. In those
cases we have to clear the override height and layout the item
with the new row size.

Tests: fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html
       fast/css-grid-layout/relayout-indefinite-heights.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalContentHeightForChild):

LayoutTests:

Based on Blink's r191001 by <jfernandez@igalia.com>.

* fast/css-grid-layout/min-content-row-must-shrink-when-column-grows-expected.txt: Added.
* fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html: Added.
* fast/css-grid-layout/relayout-indefinite-heights-expected.txt: Added.
* fast/css-grid-layout/relayout-indefinite-heights.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/min-content-row-must-shrink-when-column-grows-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/relayout-indefinite-heights-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/relayout-indefinite-heights.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp