[css-grid] Percentage columns should remove scrollbar's width
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Sep 2015 09:46:37 +0000 (09:46 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Sep 2015 09:46:37 +0000 (09:46 +0000)
commit8c0f6c6978bde9baac7613410c47abb0e709e188
tree67f1589d37a5baf33cfd24e5827be15c62cc16fc
parenta09a384dc70938c119351ed54b6029a2fc6645ea
[css-grid] Percentage columns should remove scrollbar's width
https://bugs.webkit.org/show_bug.cgi?id=149116

Reviewed by Sergio Villar Senin.

Source/WebCore:

Currently the calculation of percentage columns was not subtracting the
scrollbar's size.
Fixed RenderGrid::computeUsedBreadthOfSpecifiedLength()
to avoid this problem.

Test: fast/css-grid-layout/grid-percent-track-scrollbar.html

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

LayoutTests:

Added test to check the behavior for both columns and rows.
Note that rows (height) were already working fine.

* fast/css-grid-layout/grid-percent-track-scrollbar-expected.txt: Added.
* fast/css-grid-layout/grid-percent-track-scrollbar.html: Added.

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