[CSS Grid Layout] Modify grid item height doesn't work
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Oct 2015 13:14:11 +0000 (13:14 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Oct 2015 13:14:11 +0000 (13:14 +0000)
commit48e08820414b952a99719731e164b61a2a9d7769
tree5e6910649407eae1543ab2204e1e7ff85c65d218
parent3aa948b68f51c03a6313c933520ff9b85ae403d1
[CSS Grid Layout] Modify grid item height doesn't work
https://bugs.webkit.org/show_bug.cgi?id=149840

Reviewed by Sergio Villar Senin.

Source/WebCore:

When computing the logical height of content-sized grid tracks we
need to clear grid item's override height if it needs to be laid
out again.

Currently we are doing so only in the case of percentage heights
or when the grid track's width has changed; these situations would
obviously mark grid items as needing layout.

However, there are other situations, like the one defined in this
bug, which would imply a new layout of the grid items; hence we
need to clear its override value if we want the layout logic to be
computed correctly.

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

LayoutTests:

Added new tests cases to verify content-sized grid tracks are resized
appropriately whenever grid item's height is changed.

* fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change-expected.txt: Added new test cases.
* fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html: Added new test cases.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change-expected.txt
LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp