[webkit-changes] [WebKit/WebKit] d7c7ac: [Flex] If a flex item's flex basis is definite, th...
Alan Baradlay
noreply at github.com
Tue Jul 9 10:39:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d7c7ac671e9d0c07c350756af08c6a5db7b61a94
https://github.com/WebKit/WebKit/commit/d7c7ac671e9d0c07c350756af08c6a5db7b61a94
Author: Alan Baradlay <zalan at apple.com>
Date: 2024-07-09 (Tue, 09 Jul 2024)
Changed paths:
A LayoutTests/fast/flexbox/percent-child-with-flex-basis-flex-item-expected.html
A LayoutTests/fast/flexbox/percent-child-with-flex-basis-flex-item.html
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[Flex] If a flex item's flex basis is definite, then its post-flexing main size is also definite.
https://bugs.webkit.org/show_bug.cgi?id=276349
Reviewed by Antti Koivisto.
This is in preparation for fixing css/css-flexbox/flex-minimum-height-flex-items-025.html
https://drafts.csswg.org/css-flexbox-1/#definite-sizes
"If a flex item's flex basis is definite, then its post-flexing main size is also definite."
Let's resolve precent child height against the flex-basis, instead of the flex item's height value.
(note that childMainSizeIsDefinite() returns an adjusted flex-basis value turning auto into fixed if logical height is fixed)
* LayoutTests/fast/flexbox/percent-child-with-flex-basis-flex-item-expected.html: Added.
* LayoutTests/fast/flexbox/percent-child-with-flex-basis-flex-item.html: Added.
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::usedChildOverridingMainSizeForPercentageResolution):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
* Source/WebCore/rendering/RenderFlexibleBox.h:
Canonical link: https://commits.webkit.org/280781@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list