[css-grid] Let abspos items reference implicit grid lines
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2019 17:32:24 +0000 (17:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2019 17:32:24 +0000 (17:32 +0000)
commit2de7a99f30d0b5e83551e9bc7dc033ec55472c00
tree8919d42b83f71947fed62ca55a785ae180a819da
parent82a5207950fed66f8b0974ce3ed0e1a4abc25d18
[css-grid] Let abspos items reference implicit grid lines
https://bugs.webkit.org/show_bug.cgi?id=193313

Patch by Oriol Brufau <obrufau@igalia.com> on 2019-01-10
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import test changes from WPT.

* web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html:
* web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html:

Source/WebCore:

While they can't create new implicit grid lines, abspos items
can reference existing ones as clarified in
https://github.com/w3c/csswg-drafts/commit/511bb63

This patch makes WebKit match Blink, Firefox and Edge.

Tests: web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html
       web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator const):
Remove argument from spanSizeForAutoPlacedItem call.
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const):
Remove argument from spanSizeForAutoPlacedItem call.
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid const):
Remove argument from spanSizeForAutoPlacedItem call.
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid const):
Remove argument from spanSizeForAutoPlacedItem call.
(WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild):
Don't treat implicit grid lines as 'auto'.
* rendering/RenderGrid.h:
Remove unused gridPositionIsAutoForOutOfFlow.
* rendering/style/GridPositionsResolver.cpp:
(WebCore::adjustGridPositionsFromStyle):
Don't treat implicit grid lines as 'auto'.
Remove unused gridContainerStyle parameter.
(WebCore::GridPositionsResolver::spanSizeForAutoPlacedItem):
Remove argument from adjustGridPositionsFromStyle call.
Remove unused gridContainerStyle parameter.
(WebCore::resolveGridPositionFromStyle):
Remove unnecessary assert that uses isValidNamedLineOrArea.
(WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
Remove argument from adjustGridPositionsFromStyle call.
* rendering/style/GridPositionsResolver.h:
Remove unused isValidNamedLineOrArea.
Remove unused parameter from spanSizeForAutoPlacedItem.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderGrid.h
Source/WebCore/rendering/style/GridPositionsResolver.cpp
Source/WebCore/rendering/style/GridPositionsResolver.h