[CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 17:38:04 +0000 (17:38 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 17:38:04 +0000 (17:38 +0000)
commitf3fc381cb9f149f2d7e3bd41294593244e15cc25
treedf2b727c9cd36ce16092f775a0dd8b4c89f9cc7b
parent178b0a852a355e6707b7c3d601f96deba1a900d6
[CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
https://bugs.webkit.org/show_bug.cgi?id=141748

Reviewed by Sergio Villar Senin.

Source/WebCore:

The first step of grid item placement algorithm has been updated in
order to support both "sparse" and "dense" modes. Current code is always
doing a "dense" packing in this case.

See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo

Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
for each row/column and use it to place items in the right position.

LayoutTests:

New test to check "sparse" and "dense" packing mode behavior in
auto-placed items locked to a given row (or column).

* fast/css-grid-layout/grid-item-auto-placement-definite-span.html:
Extract some common styles to resources/grid.css.
* fast/css-grid-layout/grid-item-auto-placement-fixed-row-column-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html: Added.
* fast/css-grid-layout/resources/grid.css: Modified generic CSS file to
add common styles.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-item-auto-placement-definite-span.html
LayoutTests/fast/css-grid-layout/grid-item-auto-placement-fixed-row-column-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/resources/grid.css
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp