<html>
<head>
<base href="https://bugs.webkit.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - The sizing of images in flex should take the dimension change caused by definite cross-size and aspect-ratio"
href="https://bugs.webkit.org/show_bug.cgi?id=169974">169974</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>The sizing of images in flex should take the dimension change caused by definite cross-size and aspect-ratio
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Layout and Rendering
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>francois.remy.dev@outlook.com
</td>
</tr>
<tr>
<th>CC</th>
<td>bfulgham@webkit.org, simon.fraser@apple.com, zalan@apple.com
</td>
</tr></table>
<p>
<div>
<pre>Steps to reproduce:
1. Define a width/height on a flex
2. Insert an image in it
3. Observe how its aspect-ratio affects its final size
<a href="https://jsfiddle.net/zcqst2pr/">https://jsfiddle.net/zcqst2pr/</a>
<a href="https://jsfiddle.net/zcqst2pr/1/">https://jsfiddle.net/zcqst2pr/1/</a>
Did this work before? N/A
Does this work in other browsers? Yes
Actual results:
Images do not flex as they do in Edge, which has been deemed per-spec in this case (see below).
Expected results:
Aspect-ratio should be preserved, except if the image is to be sized bigger than its normal size ("grow" test case). If it is, the flexing that takes place as a second step will shrink the image to fit the container.
The reason flexing is different is that flex-shrink is 1 by default and flex-grow is 0 by default. Flexing doesn't have to take the image aspect-ratio into consideration, but should also refuse to shrink further than the image intrinsic size.
Please discuss this issue at <a href="https://github.com/w3c/csswg-drafts/issues/1112">https://github.com/w3c/csswg-drafts/issues/1112</a> if you disagree with the test results</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>