[css-grid] Percentage columns shouldn't include border and padding
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Sep 2015 11:23:07 +0000 (11:23 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Sep 2015 11:23:07 +0000 (11:23 +0000)
commitf88234699c084f6a44bb17c69381143d78645a06
tree6a819a808b3d88572d05bfb5328a46291f857144
parent6a37585dbd351d0b3eec3662106e5161fc1eea20
[css-grid] Percentage columns shouldn't include border and padding
https://bugs.webkit.org/show_bug.cgi?id=148978

Reviewed by Sergio Villar Senin.

Source/WebCore:

Subtract border and padding when we're calculating the breadth of the
columns in LayoutGrid::computeUsedBreadthOfSpecifiedLength().

Added test to check the behavior for both columns and rows.

Test: fast/css-grid-layout/grid-percent-track-margin-border-padding.html

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

LayoutTests:

* fast/css-grid-layout/grid-percent-track-margin-border-padding-expected.txt: Added.
* fast/css-grid-layout/grid-percent-track-margin-border-padding.html: Added.

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