From f21a0bf4372242937c7944a1775fae77adadd2d9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 21 Feb 2022 20:16:44 +0100 Subject: [PATCH] LibWeb: Don't shift right-floated boxes too much to the left We were subtracting the content width of right-floated boxes from their X position for no reason. Removing this makes floats snuggle up to each other on the right side. :^) --- Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 31a500d5ec..012238efaa 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -612,7 +612,6 @@ void BlockFormattingContext::layout_floating_child(Box const& box, BlockContaine fits_on_line = (wanted_x + box_state.content_width + box_state.padding_right + box_state.border_right + box_state.margin_right) <= containing_block_content_width; } else { auto previous_left_border_edge = previous_box_state.offset.x() - - previous_box_state.content_width - previous_box_state.padding_left - previous_box_state.border_left - margin_collapsed_with_previous;