[css-grid] Content Alignment broken with indefinite sized grid container
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Oct 2016 08:11:14 +0000 (08:11 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Oct 2016 08:11:14 +0000 (08:11 +0000)
commitef58bdf314d6beb5aabdedef5fda4d862194fa04
tree20e45266c22b5fefecac26491a3c618fd4eed938
parentf3e598b4818fd88406dbc4a13f78f77483b766e4
[css-grid] Content Alignment broken with indefinite sized grid container
https://bugs.webkit.org/show_bug.cgi?id=163724

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

The Grid Tracks sizing algorithm receives as parameter the
available space to be used as space for tracks. We hold a variable
to store the remaining free space for each dimension.

When the grid container size is indefinite we can't compute the
available free space after computing track sizes until such
indefinite size is resolved.

No new tests, just added some additional test cases.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock): Compute freeSpace for Rows
after doing layout and resolving the indefinite height.

LayoutTests:

Added additional test cases to verify we compute properly the
available free space for content-alignment, handling correctly the
overflow when needed.

* fast/css-grid-layout/grid-content-alignment-overflow.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-content-alignment-overflow-expected.txt
LayoutTests/fast/css-grid-layout/grid-content-alignment-overflow.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp