Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[css-aspect-ratio] The transferred min/max sizes should be constraine…
…d by defined sizes https://bugs.webkit.org/show_bug.cgi?id=243321 Reviewed by Rob Buis. The aspect-ratio transferred min/max values should be capped/floored by the definite preferred or min/max sizes, see [1]. This patch added constrainLogicalMinMaxSizesByAspectRatio to handle this scenario. This function also handles the constraint to the automatic content-based minimum sizes in the ratio-dependent axis which should be capped by the maximum size [2]. [1] https://www.w3.org/TR/css-sizing-4/#aspect-ratio-size-transfers [2] https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum * LayoutTests/TestExpectations: * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::constrainLogicalMinMaxSizesByAspectRatio const): (WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const): (WebCore::RenderBox::constrainLogicalHeightByMinMax const): (WebCore::RenderBox::computeMinMaxLogicalWidthFromAspectRatio const): (WebCore::RenderBox::computeMinMaxLogicalHeightFromAspectRatio const): * Source/WebCore/rendering/RenderBox.h: Canonical link: https://commits.webkit.org/253262@main
- Loading branch information
Showing
3 changed files
with
100 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters