From 0084d992d45695f485cb984d77f3b8a7f1ab8797 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 9 Feb 2025 22:39:04 +0100 Subject: [PATCH] LibWeb: Remove unnecessary re-measurement of cross sizes in flex layout This was an old hack from before we understood how and when to resolve percentages in flex layout. Removing it should not change anything, but it does avoid a lot of redundant layout work on many pages. --- Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index 67e31b46a4c..2172ad2475e 100644 --- a/Libraries/LibWeb/Layout/FlexFormattingContext.cpp +++ b/Libraries/LibWeb/Layout/FlexFormattingContext.cpp @@ -150,18 +150,6 @@ void FlexFormattingContext::run(AvailableSpace const& available_space) } } - { - // NOTE: We re-resolve cross sizes here, now that we can resolve percentages. - - // 7. Determine the hypothetical cross size of each item - for (auto& item : m_flex_items) { - determine_hypothetical_cross_size_of_item(item, true); - } - - // 11. Determine the used cross size of each flex item. - determine_used_cross_size_of_each_flex_item(); - } - // 16. Align all flex lines (per align-content) align_all_flex_lines();