We apply the https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum rule in RenderBox::constrainLogicalHeightByMinMax and RenderBox::constrainLogicalWidthInFragmentByMinMax, but we don't correctly check first that the element is non-replaced. For RenderBox::constrainLogicalHeightByMinMax, this can have the effect of increasing the computed min-height of a replaced element with an aspect-ratio to intrinsicContentHeight, if the element has a child. (The code that increases the automatic min-height to at least intrinsicContentHeight seems to be part of the unwritten rules about how `min-content: auto` applies to block elements.) Normally, replaced elements don't have children, but the way we check (looking at `firstChild()`) can return true for <video> elements with controls, <img> elements that have text recognition overlays, and possibly other cases where a UA shadow root has been attached.
rdar://85505101
Created attachment 448830 [details] Patch
Created attachment 449009 [details] Patch
Comment on attachment 449009 [details] Patch Hi Cameron, thanks for working on this! The patch looks good to me.
Comment on attachment 449009 [details] Patch rs=me
Committed r288003 (246029@main): <https://commits.webkit.org/246029@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449009 [details].