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] Fix grid container sizing under min-content height #14100

Merged
merged 1 commit into from Nov 21, 2018

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Nov 16, 2018

The spec is quite clear
(https://drafts.csswg.org/css-sizing/#valdef-width-min-content):
"min-content
If specified for the inline axis, use the min-content inline size;
otherwise behaves as the property’s initial value."

So if a grid container has "height: min-content" it should behave
the same than with "height: auto".

The patch removes ComputeIntrinsicLogicalContentHeightUsing() in
LayoutGrid as we don't need a custom one anymore.
We can also get rid of min_content_height_ and max_content_height_
attributes that were only used for this logic.

BUG=906039
TEST=fast/css-grid-layout/grid-track-sizing-with-orthogonal-flows.html
TEST=fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html

Change-Id: Ia67d1dac16fbb04e3225115c3f34c67975dc6f94
Reviewed-on: https://chromium-review.googlesource.com/c/1340311
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#610059}

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.

Already reviewed downstream.

The spec is quite clear
(https://drafts.csswg.org/css-sizing/#valdef-width-min-content):
  "min-content
     If specified for the inline axis, use the min-content inline size;
     otherwise behaves as the property’s initial value."

So if a grid container has "height: min-content" it should behave
the same than with "height: auto".

The patch removes ComputeIntrinsicLogicalContentHeightUsing() in
LayoutGrid as we don't need a custom one anymore.
We can also get rid of min_content_height_ and max_content_height_
attributes that were only used for this logic.

BUG=906039
TEST=fast/css-grid-layout/grid-track-sizing-with-orthogonal-flows.html
TEST=fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html

Change-Id: Ia67d1dac16fbb04e3225115c3f34c67975dc6f94
Reviewed-on: https://chromium-review.googlesource.com/c/1340311
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#610059}
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

3 participants