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

[css-grid] Apply automatic minimum size clamping to spanning items too #9445

Merged
merged 1 commit into from Feb 9, 2018

Conversation

Projects
None yet
4 participants
@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented Feb 8, 2018

In r783213 we added the conditions from the spec to apply
the automatic minimum size clamping when required
but only to non-spanning items.
See: https://drafts.csswg.org/css-grid/#min-size-auto

This patch moves the code from GridTrackSizingAlgorithm::SizeTrackToFitNonSpanningItem()
to GridTrackSizingAlgorithmStrategy::MinSizeForChild()
that way the clamping is applied for both spanning and non-spanning items.

This somehow reverts r783213, as it was adding some duplicated code.
All the checks to know if we should use that part of the spec
were already present in GridTrackSizingAlgorithmStrategy::MinSizeForChild().

Apart from using the previous code, there's a new loop to verify
that the max track sizing function is fixed for all the tracks of the item.

BUG=809005
TEST=external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html
TEST=external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html

Change-Id: I919a83d152d8263251d3211dd5ebf175f7cf9717
Reviewed-on: https://chromium-review.googlesource.com/910049
Commit-Queue: Manuel Rego Casasnovas rego@igalia.com
Reviewed-by: Javier Fernandez jfernandez@igalia.com
Cr-Commit-Position: refs/heads/master@{#535683}

@wpt-pr-bot
Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Feb 8, 2018

Build PASSED

Started: 2018-02-09 11:12:52
Finished: 2018-02-09 11:17:08

View more information about this build on:

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-910049 branch from 7f0b93c to 12ecca3 Feb 9, 2018

[css-grid] Apply automatic minimum size clamping to spanning items too
In r783213 we added the conditions from the spec to apply
the automatic minimum size clamping when required
but only to non-spanning items.
See: https://drafts.csswg.org/css-grid/#min-size-auto

This patch moves the code from GridTrackSizingAlgorithm::SizeTrackToFitNonSpanningItem()
to GridTrackSizingAlgorithmStrategy::MinSizeForChild()
that way the clamping is applied for both spanning and non-spanning items.

This somehow reverts r783213, as it was adding some duplicated code.
All the checks to know if we should use that part of the spec
were already present in GridTrackSizingAlgorithmStrategy::MinSizeForChild().

Apart from using the previous code, there's a new loop to verify
that the max track sizing function is fixed for all the tracks of the item.

BUG=809005
TEST=external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html
TEST=external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html

Change-Id: I919a83d152d8263251d3211dd5ebf175f7cf9717
Reviewed-on: https://chromium-review.googlesource.com/910049
Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com>
Reviewed-by: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#535683}

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-910049 branch from 12ecca3 to d5f539d Feb 9, 2018

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 3e05847 into master Feb 9, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-910049 branch Feb 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.