Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Use intrinsic ratio of replaced elements when computing flex sizes
https://bugs.webkit.org/show_bug.cgi?id=247447 rdar://101922427 Reviewed by Alan Baradlay. When computing sizes for replaced element flex items, we should check to see if there is an intrinsic ratio and not rely on the intrinsic sizes directly. This is because there are scenarios where an element can only have an intrinsic size in only one dimension but still have an aspect ratio. For example, a SVG could have an intrinsic width and an intrinsic ratio. Since we could not compute the aspect ratio from the intrinsic sizes, we must use the specified intrinsic ratio. * LayoutTests/TestExpectations: * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing const): (WebCore::RenderFlexibleBox::computeFlexItemMinMaxSizes): Here the call to childHasComputableAspectRatio was too strong. In cases like the example above, the item would still have an aspect ratio but this call would still return false. Canonical link: https://commits.webkit.org/257474@main
- Loading branch information