[css-grid] Stretch alignment doesn't work for orthogonal flows
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Aug 2016 20:11:16 +0000 (20:11 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Aug 2016 20:11:16 +0000 (20:11 +0000)
commite9ac9f0591fa91a894423f8701b8aca3e1eecbca
tree73df3086e2e4df40c3065ab5a5e415612ba2f896
parentb754e6f4c39af6275c5eebd37c5994277630120e
[css-grid] Stretch alignment doesn't work for orthogonal flows
https://bugs.webkit.org/show_bug.cgi?id=160076

Reviewed by Darin Adler.

Source/WebCore:

After implementing orthogonal flow support for track sizing and basic
alignment logic, we can now implement stretching logic in orthogonal
scenarios, which was not allowed so far.

Thanks to the recent changes which made the grid layout code more
independent to the grid container's and its children's flow, the
implementation of the stretching logic can be done in a clearer way.

This patch implements the missing logic and performs some refactoring
so it became flow direction independent.

Test: fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html

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

LayoutTests:

Additional layout tests to verify the stretching logic works as
expected in orthogonal flow scenarios.

* fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows-expected.txt: Added.
* fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderGrid.h