12017-06-01 Javier Fernandez <jfernandez@igalia.com>
2
3 [css-grid] Margin wrong applied when stretching an orthogonal item in fixed size track
4 https://bugs.webkit.org/show_bug.cgi?id=172590
5
6 Reviewed by NOBODY (OOPS!).
7
8 We need to consider orthogonality when using the item's logical margin to
9 compute the available space for stretching.
10
11 The issue this CL fixes is only reproducible when the grid layout logic
12 is executed several times, since probably the item doesn't need to be
13 laid out again. In such cases, we just get the cached logical margins
14 but we were not taking orthogonality into account.
15
16 Test: fast/css-grid-layout/grid-item-stretching-must-not-depend-on-previous-layouts.html
17
18 * rendering/RenderGrid.cpp:
19 (WebCore::RenderGrid::layoutBlock):
20 (WebCore::RenderGrid::marginLogicalSizeForChild):
21 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
22 * rendering/RenderGrid.h:
23