Include aspect-ratio when calculating inline min-content size and add min-content block computation
4205ff2acfadf09d0364ea4de4a706e8b37803e9
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 NOBODY (OOPS!). 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 itself of the element. 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):
There are quite a number of typos to fix (minimuim etc.).
Overall progress looks great. However flex-aspect-ratio-026.html is not completely fixed. I worry a bit that improving/fixing that may need touching this code section again, do you have any idea about that?
I am not sure, but that is a good point! I'll look into that test and see what needs to be done. If the change is related, I'll add it to this patch so we can hold off on it for a bit.
https://github.com/WebKit/WebKit/commit/df79bc1683ee158a68d04911463e5bfd3de9e0ca
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/0ee8d3db5851995aef9ee9939ed0e97cff8d30ac)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/11d40f9748190089599f98b17511ee0e313cd969)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/58d5875ede10abeb764e67c40448b83259ec7468)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/e48f6943e9d874f7bc56433d2ec4aadef94212e4)
| Misc | iOS, tvOS & watchOS | macOS | Linux | Windows |
|---|---|---|---|---|
| โ ๐งช style | โ ๐ ios | โ ๐ mac | โ ๐ wpe | โ ๐ ๐งช win |
| โ ๐งช bindings | โ ๐ ios-sim | โ ๐ mac-debug | โ ~~๐ gtk~~ | โณ ๐ wincairo |
| โ ๐งช webkitperl | โ ~~๐งช ios-wk2~~ | โ ๐ mac-AS-debug | [โ ๐งช gtk-wk2](https://ews-build.webkit.org/#/builders/35/builds/22519 "Unexpected infrastructure issue: The layout-test run with change generated no list of results and exited with error, retrying with the hope it was a random infrastructure error. | |
| Retrying build [retry count is 0 of 3]") | ||||
| โ ๐งช api-ios | โ ~~๐งช api-mac~~ | โ ~~๐งช api-gtk~~ | ||
| โ ๐ tv | โ ~~๐งช mac-wk1~~ | |||
| โ ๐ tv-sim | โ ~~๐งช mac-wk2~~ | |||
| โ ๐ watch | โ ~~๐งช mac-AS-debug-wk2~~ | |||
| โ ๐ watch-sim | โ ๐งช mac-wk2-stress |
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/6b26b2b0f5013af7df6fc22e224cc32529887df5)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/e691ad283d413f800fcd426355b7fc2d827a5419)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/b137d9f9ff04e41b79122bbdebebf01565c7c639)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/0ccd489249f7f98ae0f24fe3788682f0577d7ccc)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/df79bc1683ee158a68d04911463e5bfd3de9e0ca)
https://github.com/WebKit/WebKit/commit/5704bc1b58ccb3970f3c9f0248b032d3f84ca110
https://github.com/WebKit/WebKit/commit/5704bc1b58ccb3970f3c9f0248b032d3f84ca110
https://github.com/WebKit/WebKit/commit/5704bc1b58ccb3970f3c9f0248b032d3f84ca110
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/58d5875ede10abeb764e67c40448b83259ec7468)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/e48f6943e9d874f7bc56433d2ec4aadef94212e4)
| Misc | iOS, tvOS & watchOS | macOS | Linux | Windows |
|---|---|---|---|---|
| โ ๐งช style | โ ๐ ios | โ ๐ mac | โ ๐ wpe | โ ๐ ๐งช win |
| โ ๐งช bindings | โ ๐ ios-sim | โ ๐ mac-debug | โ ~~๐ gtk~~ | โณ ๐ wincairo |
| โ ๐งช webkitperl | โ ~~๐งช ios-wk2~~ | โ ๐ mac-AS-debug | [โ ๐งช gtk-wk2](https://ews-build.webkit.org/#/builders/35/builds/22519 "Unexpected infrastructure issue: The layout-test run with change generated no list of results and exited with error, retrying with the hope it was a random infrastructure error. | |
| Retrying build [retry count is 0 of 3]") | ||||
| โ ๐งช api-ios | โ ~~๐งช api-mac~~ | โ ~~๐งช api-gtk~~ | ||
| โ ๐ tv | โ ~~๐งช mac-wk1~~ | |||
| โ ๐ tv-sim | โ ~~๐งช mac-wk2~~ | |||
| โ ๐ watch | โ ~~๐งช mac-AS-debug-wk2~~ | |||
| โ ๐ watch-sim | โ ๐งช mac-wk2-stress |
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/6b26b2b0f5013af7df6fc22e224cc32529887df5)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/e691ad283d413f800fcd426355b7fc2d827a5419)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/b137d9f9ff04e41b79122bbdebebf01565c7c639)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/0ccd489249f7f98ae0f24fe3788682f0577d7ccc)
https://github.com/WebKit/WebKit/commit/5704bc1b58ccb3970f3c9f0248b032d3f84ca110
Committed 253740@main (588e20666a36): https://commits.webkit.org/253740@main
Reviewed commits have been landed. Closing PR #3025 and removing active labels.
๐งช style