[FlexNG] Treat specified intrinsic block size as auto for min-size: auto #23886
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.
Previously FlexNG would give the item in this example min-height: 0, not
whatever the min-size: auto algorithm dictated.
<div style="display: flex; flex-direction: column">
<div style="min-height: min-content">
...
There's still a behavior difference from legacy flex containers because
they honor min-height: min-content[1]. NG always treats them as auto[2],
flex-minimum-height-flex-items-023.html demonstrates this. Looks like
this case already differs between Firefox and legacy, so hopefully
compat problems between FlexNG and legacy are few. It's still
unfortunate to introduce a third behavior for this case, even if the new
behavior is spec compliant.
[1] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/layout/layout_box.cc;l=4039;drc=feef24515266f41efe38da79056a216a8ae9d459
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/layout/ng/ng_length_utils.cc;l=74;drc=feef24515266f41efe38da79056a216a8ae9d459
Bug: 1088223
Change-Id: I17f5f5dd55b159da04e9693c0992c9a635862eb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2224599
Commit-Queue: David Grogan <dgrogan@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774967}