From 7ed6549c8b1dbf2e0ba941578c8bb1e723769c3f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 25 Feb 2022 15:48:39 +0100 Subject: [PATCH] LibWeb: Fix off-by-one in calculation of available space for line boxes The rightmost edge of the available space ends exactly at the leftmost right-side floating box, not one pixel away from it. --- Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp index 52ac009543..80341474a9 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp @@ -61,7 +61,7 @@ InlineFormattingContext::AvailableSpaceForLineInfo InlineFormattingContext::avai auto const& floating_box = bfc.right_side_floats().boxes.at(i); auto rect = margin_box_rect_in_ancestor_coordinate_space(floating_box, parent().root(), m_state); if (rect.contains_vertically(y_in_root)) { - info.right = rect.left() - 1; + info.right = rect.left(); break; } }