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-flex] Fix flex base size for some aspect ratio items #25476

Merged
merged 1 commit into from Sep 22, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 10, 2020

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}

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.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title [css-flex] Fix flex basis for some aspect ratio items [css-flex] Fix flex base size for some aspect ratio items Sep 21, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2399082 branch 4 times, most recently from a340af4 to a0bbf1c Compare September 22, 2020 00:07
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}
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