From 6ca90b8d57904c0c6c573946b4e69a1138607b6a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 23 Jan 2022 12:39:48 +0100 Subject: [PATCH] LibWeb: Take full border box into account when vertically placing floats --- Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 6903696039..256da30e69 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -660,7 +660,7 @@ void BlockFormattingContext::layout_floating_child(Box& box, BlockContainer cons x = first_edge(box.box_model().margin_box()); float lowest_border_edge = 0; for (auto const& box : side_data.boxes) - lowest_border_edge = max(lowest_border_edge, box.height() + box.box_model().border.bottom + box.box_model().margin.bottom); + lowest_border_edge = max(lowest_border_edge, box.border_box_height()); side_data.y_offset += lowest_border_edge;