[css-grid] Always consider baseline shim for the minimum contribution
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 18:26:40 +0000 (18:26 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 18:26:40 +0000 (18:26 +0000)
commit04d41d9db24cab461cf619b7852600e5f2839afd
treecb72046a866d76931080c044de8665b48fbabee0
parentbb82dcf998c5bc966cce851aa29622f9d16bdf09
[css-grid] Always consider baseline shim for the minimum contribution
https://bugs.webkit.org/show_bug.cgi?id=195964

Patch by Oriol Brufau <obrufau@igalia.com> on 2019-03-20
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Import WPT tests.

* web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-expected.txt: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr-expected.txt: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl-expected.txt: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr.html
       imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl.html
       imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html

Before this patch, the shim used for baseline alignment is not taken
into consideration when calculating the minimum contribution of a grid
item if its preferred size is auto, its minimum size is auto, and the
max track sizing function is a fixed small value. In this case, the
auto minimum size can produce a smaller track than if it was 0.

The specification needs to clarify how baseline shims interact with
minimum contributions (https://github.com/w3c/csswg-drafts/issues/3660),
but the above doesn't make sense.

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log
Source/WebCore/ChangeLog
Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp