diff options
author | Andreas Kling <kling@serenityos.org> | 2022-07-18 20:09:31 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-26 01:53:41 +0200 |
commit | 8bdc6f5390d48c834d3a831e17b456d097b71e31 (patch) | |
tree | ce9166bbd41b6744f59882264cb205b8231f7c3f /Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp | |
parent | 69243947d592ec6c60024e4517b0928bf300becc (diff) | |
download | serenity-8bdc6f5390d48c834d3a831e17b456d097b71e31.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index e7e0a9d0bc..a089dad292 100644 --- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp @@ -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()) |