3 [CSS Grid Layout] Refactor the code in preparation of auto placement support
4 https://bugs.webkit.org/show_bug.cgi?id=110244
5
6 Reviewed by NOBODY (OOPS!).
7
8 Test: fast/css-grid-layout/grid-auto-flow-resolution.html
9
10 In order to support auto placement, we need to iterate over the grid items with
11 auto row / column several times. This changes makes us do that in a very simple,
12 not-yet-conformant way. While touching this code, the distinction between grid-auto-flow
13 none and row / column was better drawn (and enforced).
14
15 * rendering/RenderGrid.cpp:
16 (WebCore::RenderGrid::resolveGridPositionFromStyle):
17 Made it illegal to call resolveGridPositionFromStyle if the grid track is auto and
18 grid-auto-flow is not none. This would catch bad use of the function.
19
20 (WebCore::RenderGrid::maximumIndexInDirection):
21 Updated to bail out if the grid track is auto. Also improved the comment.
22
23 (WebCore::RenderGrid::placeItemsOnGrid):
24 Updated the function to do several iterations. Also handled the grid-auto-flow: none
25 case differently as it shouldn't need the extra iteration(s).
26
272013-02-19 Julien Chaffraix <jchaffraix@webkit.org>
28