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

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.
This commit is contained in:
Andreas Kling 2022-02-25 15:48:39 +01:00
parent a5c2ab69ec
commit 7ed6549c8b

View file

@ -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;
}
}