[FlexNG] Fix min-width: auto for flex item tables #21137
Merged
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.
This patch only modifies the min-width: auto case for tables by skipping
the flex-specific behavior and just using the table's preferred minimum
width as calculated by legacy. We now match legacy when tables are flex
items.
But I think when the spec was updated in
w3c/csswg-drafts@66241e4,
legacy became incorrect in cases where min-width is specified. Compare
css/css-flexbox/table-as-item-fixed-min-width.html with
http://wpt.live/css/css-flexbox/table-as-item-auto-min-width.html . The
only difference is an additional min-width: 5px that should have no
effect but does, see https://i.imgur.com/yMxUdeI.png for how the new
test renders in legacy.
An older patchset (3) does what I think is the newly-correct behavior,
which also says that
http://wpt.live/css/css-flexbox/table-as-item-wide-content.html is
invalid -- the green square should be 500px wide.
Bug: 845235
Change-Id: Ica870fe3aa12fc1fbeb2388c0f2c69263c5e8860
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1995617
Commit-Queue: David Grogan <dgrogan@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731785}