[css-grid] Fix percentage tracks' size computation in grids with gutters
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Mar 2016 10:42:33 +0000 (10:42 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Mar 2016 10:42:33 +0000 (10:42 +0000)
commit20b4ba3e0116894c24d91b0b659b69a348079d01
tree62fa53d99a66e843dab354c0987823d47164d4d4
parent2d93e0c3ddc4c16cd7f2229b7ad90a5c18c505bf
[css-grid] Fix percentage tracks' size computation in grids with gutters
https://bugs.webkit.org/show_bug.cgi?id=153825

Reviewed by Darin Adler.

Source/WebCore:

The track sizing algorithm is passed an available size
(freeSpace in the code) where to size the tracks. The total size of the grid
gutters was pre-removed from that available size because we cannot use it to size
the tracks. However that available size is also used to compute the size of
percentage tracks. As we're removing the size of the gutters, the base size for
percentage computations is smaller than it should be.

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

LayoutTests:

* fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt:
* fast/css-grid-layout/grid-gutters-and-flex-content.html:
* fast/css-grid-layout/grid-gutters-and-tracks-expected.txt:
* fast/css-grid-layout/grid-gutters-and-tracks.html:

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