In latest Safari 15, as well as Safari Technology Preview, combining aspect-ratio and width does not result in the correct element height. An element with width: 352px and an aspect-ratio: 352 / 490 should result in a height of 490px (Latest Chrome and Firefox). In Safari however, it results in ~500.xx px AN older version of Chrome (91.0.4472.164) also resulted in 500, but this has now been fixed by 96.0.4664.93 (not entirely clear which version fixed it. Please see the reproduction attached in the code sandbox below. https://codesandbox.io/s/aspect-ratio-calculation-d866x?file=/src/index.js
<rdar://problem/86328069>
Created attachment 447119 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment on attachment 447119 [details] Patch r=me
Created attachment 447126 [details] Patch
Committed r287023 (245228@main): <https://commits.webkit.org/245228@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447126 [details].
Thanks for the swift progress on this folks! 🙌
This change should be present in STP 139, iOS 15.4 Beta, and macOS 12.3 Beta.