forked from mirrors/gecko-dev
Automatic update from web-platform-tests [css-flex] Fix flex base size for some aspect ratio items 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} -- wpt-commits: 00d5f2e71560b1eb16eb6f02aea680dbc0948c69 wpt-pr: 25476
13 lines
924 B
HTML
13 lines
924 B
HTML
<!DOCTYPE html>
|
|
<title>SVG img as flex item</title>
|
|
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#algo-main-item" title="Part E">
|
|
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#min-max-widths" title="h > max-height line of the table">
|
|
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
|
<meta name="assert" content="Flex base size of image item with aspect ratio + intrinsic width + no intrinsic height honors transferred max-height." />
|
|
|
|
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
|
|
|
<div style="display: flex;">
|
|
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' width='200'%3E%3Crect width='100%25' height='100%25' fill='green'/%3E%3C/svg%3E" style="max-height: 100px; flex: 0 0 auto; background: red;">
|
|
</div>
|