mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibWeb: Flex fix minimum main size in min/max violations calculation
While calculating the minimum size for main min/max size violations we were flooring the min size to 0 if the item doesn't have a min main size. Instead of that determine the intrinsic min main size of that element. This fixes the flex: 80% 0 4/1/0 test case in the flex.html test page. This case was missed in a previous commit that added the determine_min_main_size_of_child function
This commit is contained in:
parent
e18aba69b5
commit
7be57c322e
Notes:
sideshowbarker
2024-07-17 16:23:18 +09:00
Author: https://github.com/Enverbalalic Commit: https://github.com/SerenityOS/serenity/commit/7be57c322e Pull-request: https://github.com/SerenityOS/serenity/pull/13382
|
@ -773,7 +773,7 @@ void FlexFormattingContext::resolve_flexible_lengths()
|
|||
for_each_unfrozen_item([&](FlexItem* item) {
|
||||
auto min_main = has_main_min_size(item->box)
|
||||
? specified_main_min_size(item->box)
|
||||
: 0;
|
||||
: determine_min_main_size_of_child(item->box);
|
||||
auto max_main = has_main_max_size(item->box)
|
||||
? specified_main_max_size(item->box)
|
||||
: NumericLimits<float>::max();
|
||||
|
|
Loading…
Reference in a new issue