[css-flex] Fix flex base size for some aspect ratio items #25476
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.
Old behavior: Use max content contribution for flex base size, which is
roughly: use computed width if it exists, otherwise use intrinsic size
after applying the aspect ratio and min/main/max height. In either
case, apply min/max width.
New behavior is similar to the 'max-content' size: use the intrinsic
width after applying the aspect ratio and min/main/max height. Ignore
computed min/main/max width.
Also, we weren't returning available size as the max-content size of an
SVG item that only has an aspect ratio and no intrinsic sizes, which is
what Firefox does and what the spec dictates.
Both of these are fixed with a new aspect-ratio sizing method that
currently lives in flex but will be moved to NGReplacedLayoutAlgorithm
when it exists.
Change-Id: I4afb382a7604a4fcd0626f0702edf72f21cd0bcc
Bug: 987000
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399082
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809430}