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

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.
This commit is contained in:
michiell1 2022-02-15 01:03:39 +01:00 committed by Andreas Kling
parent 97ce19bc68
commit 2f555f1b7d

View file

@ -403,6 +403,10 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer& block_c
if (is<ReplacedBox>(child_box) || is<BlockContainer>(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<FormattingContext> independent_formatting_context;
if (child_box.can_have_children()) {
independent_formatting_context = create_independent_formatting_context_if_needed(child_box);