Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Include aspect-ratio when calculating inline min-content size and add…
… min-content block computation https://bugs.webkit.org/show_bug.cgi?id=243473 Reviewed by Rob Buis. When we compute the content size suggestion of an element with a preferred aspect ratio, we need to make sure that the minimum-content size of the element is computed through the aspect ratio. When the main axis is in the inline direction, we have to consider whether or not an aspect-ratio is specified. If there is an aspect-ratio, we must calculate the minimum-content size using that. Otherwise, we will just compute the main axis extent for the child. However, the definition of of the minimum-content size in the block direction is slightly different. According to the CSS Sizing spec, the min-content block size is: he box's "ideal" size in the block axis. Usually the block size of the content after layout. * LayoutTests/TestExpectations: * Source/WebCore/rendering/RenderBox.cpp: (WebCore::inlineSizeFromAspectRatio): * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeFlexItemMinMaxSizes): (WebCore::RenderFlexibleBox::adjustChildSizeForAspectRatioCrossAxisMinAndMax): Canonical link: https://commits.webkit.org/253740@main
- Loading branch information