-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…subgrid property if the grid span properties are indefinite
7c2df75
to
9a7054b
Compare
This patch has been exported from WebKit; it will be approved automatically once the downstream patch is r+. |
wpt-pr-bot
approved these changes
Feb 16, 2022
There was a problem hiding this 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 explicitgrid-column: span 10
declaration.