From 2f555f1b7d2abce3c90b7ebb3426ff0e51309720 Mon Sep 17 00:00:00 2001 From: michiell1 Date: Tue, 15 Feb 2022 01:03:39 +0100 Subject: [PATCH] LibWeb: Compute some height of BlockFormattingContexts earlier In some cases the height of the parent is needed in computations of the height for the child. This patch attempts to fix these cases. --- Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index b84e1ef4b8..64cf2ddc3e 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -403,6 +403,10 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer& block_c if (is(child_box) || is(child_box)) place_block_level_element_in_normal_flow_vertically(child_box, block_container); + if (child_box.has_definite_height()) { + compute_height(child_box); + } + OwnPtr independent_formatting_context; if (child_box.can_have_children()) { independent_formatting_context = create_independent_formatting_context_if_needed(child_box);