1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibWeb: Don't override main size during flex item cross sizing

There's no need to override the sizes before calculating the cross size.

Besides, by the time we're calculating the hypothetical cross size of
flex items, we may already have established a definite main size anyway,
so overriding it would be wrong.
This commit is contained in:
Andreas Kling 2022-07-18 20:09:31 +02:00
parent 69243947d5
commit 8bdc6f5390

View file

@ -1021,11 +1021,6 @@ void FlexFormattingContext::determine_hypothetical_cross_size_of_item(FlexItem&
// NOTE: Flex items should always create an independent formatting context!
VERIFY(independent_formatting_context);
if (is_row_layout()) {
box_state.set_content_width(resolved_definite_main_size(item.box));
} else {
box_state.set_content_height(resolved_definite_main_size(item.box));
}
independent_formatting_context->run(item.box, LayoutMode::Normal);
if (is_row_layout())