From 0636e1db61bb24bebef333307f1f30787ea0cce5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 13 Jul 2022 23:23:56 +0200 Subject: [PATCH] LibWeb: Update flex line "remaining free space" when finished Since we re-use this value later in the layout algorithm, we have to update it before leaving the "resolve flexible lengths" step. --- Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index fe55632e82d..02f92d94c66 100644 --- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp @@ -963,6 +963,8 @@ void FlexFormattingContext::resolve_flexible_lengths() for (auto& flex_item : flex_line.items) { flex_item->main_size = flex_item->target_main_size; } + + flex_line.remaining_free_space = calculate_free_space(); } }