[css-grid] Fix height computation of grid items with borders inside fr tracks
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2015 11:14:49 +0000 (11:14 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2015 11:14:49 +0000 (11:14 +0000)
commitf60833ea4c647a361b2987ac1a8dbd536f8ec9a9
tree08fd490df052d02402affb64b0b1fc5474332bf6
parent7e54a6876f3deeea819b1b3c9f40350b56e3b5c5
[css-grid] Fix height computation of grid items with borders inside fr tracks
https://bugs.webkit.org/show_bug.cgi?id=151798

Reviewed by Zalan Bujtas.

Source/WebCore:

Since r192154 we run a second pass of the track sizing
algorithm whenever the height of the grid is indefinite in
order to properly compute row sizes. The available space
passed to the track sizing algorithm must not contain neither
borders nor paddings, otherwise it will think that it has more
space available than the existing one. We should use the
height of the content box instead.

Test: fast/css-grid-layout/grid-item-with-border-in-fr.html

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

LayoutTests:

* fast/css-grid-layout/grid-item-with-border-in-fr-expected.txt: Added.
* fast/css-grid-layout/grid-item-with-border-in-fr.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-item-with-border-in-fr-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-item-with-border-in-fr.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp