Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-grid][aspect-ratio] availableLogicalHeightUsing needs to conside…
…r AvailableLogicalHeightType when computing logical height from the aspect ratio https://bugs.webkit.org/show_bug.cgi?id=263310 rdar://117138268 Reviewed by Alan Baradlay. When availableLogicalHeightUsing determines that it needs to use the box's logical width and aspect-ratio to compute the logical height, it simply returns the value given from blockSizeFromAspectRatio. This is not correct because blockSizeFromAspectRatio returns the computed border box size which is not what the caller may want depending on the specified value of heightType. If the caller specifies a heightType of ExcludeMarginBorderPadding, then we should remove the border and padding from the block sides of the box. This is what grid expects when calling availableLogicalHeight(ExcludeMarginBorderPadding)) to compute the definite free space for the rows for the track sizing algorithm. * LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-with-aspect-ratio-uses-content-box-height-for-track-sizing-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-with-aspect-ratio-uses-content-box-height-for-track-sizing.html: Added. * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::availableLogicalHeightUsing const): Canonical link: https://commits.webkit.org/270098@main
- Loading branch information