LibWeb: Use right dimension when positioning flex-items
Previously the cross-size was used to determine the position along the main axis which is obviously wrong.
This commit is contained in:
parent
8cd4a889fe
commit
416559414c
Notes:
sideshowbarker
2024-07-18 04:00:14 +09:00
Author: https://github.com/TobyAsE Commit: https://github.com/SerenityOS/serenity/commit/416559414cd Pull-request: https://github.com/SerenityOS/serenity/pull/10020
1 changed files with 1 additions and 1 deletions
|
@ -615,7 +615,7 @@ void FlexFormattingContext::run(Box& box, LayoutMode)
|
|||
float used_main_space = 0;
|
||||
size_t auto_margins = 0;
|
||||
for (auto& flex_item : flex_line.items) {
|
||||
used_main_space += flex_item->cross_size;
|
||||
used_main_space += flex_item->main_size;
|
||||
if (is_main_axis_margin_first_auto(flex_item->box))
|
||||
++auto_margins;
|
||||
if (is_main_axis_margin_second_auto(flex_item->box))
|
||||
|
|
Loading…
Add table
Reference in a new issue