Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=236122 #32629

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

mattwoodrow
Copy link
Contributor

This updates the tests to match the expected behaviour after the clarifications in w3c/csswg-drafts#6905 were made.

Note that I left cases where grid-template-columns: subgrid was specified without any line list, since this is really common, and I don't think it should override an explicit grid-column: span 10 declaration.

…subgrid property if the grid span properties are indefinite
@mattwoodrow mattwoodrow changed the title Fix subgrid line-name tests to use the number of line names from the subgrid property if the grid span properties are indefinite WebKit export of https://bugs.webkit.org/show_bug.cgi?id=236122 Feb 14, 2022
@wpt-pr-bot
Copy link
Collaborator

This patch has been exported from WebKit; it will be approved automatically once the downstream patch is r+.

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the WebKit project.

webkit-commit-queue pushed a commit to WebKit/WebKit that referenced this pull request Feb 17, 2022
…em placement to that explicit grid.

https://bugs.webkit.org/show_bug.cgi?id=236122

Patch by Matt Woodrow <mattwoodrow@apple.com> on 2022-02-16
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Test changes to match latest spec, submitted upstream as web-platform-tests/wpt#32629

* web-platform-tests/css/css-grid/subgrid/line-names-002-expected.html:
* web-platform-tests/css/css-grid/subgrid/line-names-005-expected.html:

Source/WebCore:

Changes GridPositionsResolver::explicitGrid<>Count to return the number of tracks
spanned in the parent grid, for axes that are a subgrid.

Updates adjustGridPositionsForStyle to use the number of lines specified in the
subgrid property, for grid items that are also a subgrid and have an otherwise
indefinite span.

Adds clamping support to Grid so that we can prevent subgrids from ever adding
new implicit tracks.

* rendering/Grid.cpp:
(WebCore::Grid::insert):
(WebCore::Grid::setClampingForSubgrid):
(WebCore::Grid::clampAndTranslateToImplicitGrid):
(WebCore::Grid::setNeedsItemsPlacement):
* rendering/Grid.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
(WebCore::RenderGrid::placeItemsOnGrid const):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator const):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid const):
(WebCore::RenderGrid::isSubgrid const):
(WebCore::RenderGrid::isSubgridRows const):
(WebCore::RenderGrid::isSubgridColumns const):
(WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild):
(WebCore::RenderGrid::numTracks const):
(WebCore::transposedDirection):
(WebCore::RenderGrid::computeGridSpanForOutOfFlowChild const):
(WebCore::RenderGrid::gridSpanForOutOfFlowChild const):
(WebCore::RenderGrid::gridSpanForChild const):
* rendering/RenderGrid.h:
* rendering/style/GridArea.h:
(WebCore::GridSpan::integerSpan const):
(WebCore::GridSpan::translateTo):
(WebCore::GridSpan::clamp):
* rendering/style/GridPositionsResolver.cpp:
(WebCore::isIndefiniteSpan):
(WebCore::adjustGridPositionsFromStyle):
(WebCore::GridPositionsResolver::explicitGridColumnCount):
(WebCore::GridPositionsResolver::explicitGridRowCount):
(WebCore::explicitGridSizeForSide):
(WebCore::resolveNamedGridLinePositionFromStyle):
(WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveGridPositionAgainstOppositePosition):
(WebCore::resolveGridPositionFromStyle):
(WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
* rendering/style/GridPositionsResolver.h:


Canonical link: https://commits.webkit.org/247372@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
annulen pushed a commit to qtwebkit/qtwebkit that referenced this pull request Feb 17, 2022
…em placement to that explicit grid.

https://bugs.webkit.org/show_bug.cgi?id=236122

Patch by Matt Woodrow <mattwoodrow@apple.com> on 2022-02-16
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Test changes to match latest spec, submitted upstream as web-platform-tests/wpt#32629

* web-platform-tests/css/css-grid/subgrid/line-names-002-expected.html:
* web-platform-tests/css/css-grid/subgrid/line-names-005-expected.html:

Source/WebCore:

Changes GridPositionsResolver::explicitGrid<>Count to return the number of tracks
spanned in the parent grid, for axes that are a subgrid.

Updates adjustGridPositionsForStyle to use the number of lines specified in the
subgrid property, for grid items that are also a subgrid and have an otherwise
indefinite span.

Adds clamping support to Grid so that we can prevent subgrids from ever adding
new implicit tracks.

* rendering/Grid.cpp:
(WebCore::Grid::insert):
(WebCore::Grid::setClampingForSubgrid):
(WebCore::Grid::clampAndTranslateToImplicitGrid):
(WebCore::Grid::setNeedsItemsPlacement):
* rendering/Grid.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
(WebCore::RenderGrid::placeItemsOnGrid const):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator const):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid const):
(WebCore::RenderGrid::isSubgrid const):
(WebCore::RenderGrid::isSubgridRows const):
(WebCore::RenderGrid::isSubgridColumns const):
(WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild):
(WebCore::RenderGrid::numTracks const):
(WebCore::transposedDirection):
(WebCore::RenderGrid::computeGridSpanForOutOfFlowChild const):
(WebCore::RenderGrid::gridSpanForOutOfFlowChild const):
(WebCore::RenderGrid::gridSpanForChild const):
* rendering/RenderGrid.h:
* rendering/style/GridArea.h:
(WebCore::GridSpan::integerSpan const):
(WebCore::GridSpan::translateTo):
(WebCore::GridSpan::clamp):
* rendering/style/GridPositionsResolver.cpp:
(WebCore::isIndefiniteSpan):
(WebCore::adjustGridPositionsFromStyle):
(WebCore::GridPositionsResolver::explicitGridColumnCount):
(WebCore::GridPositionsResolver::explicitGridRowCount):
(WebCore::explicitGridSizeForSide):
(WebCore::resolveNamedGridLinePositionFromStyle):
(WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveGridPositionAgainstOppositePosition):
(WebCore::resolveGridPositionFromStyle):
(WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
* rendering/style/GridPositionsResolver.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@289986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@nt1m nt1m merged commit 5b7de24 into web-platform-tests:master Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants