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

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. :^)
This commit is contained in:
Andreas Kling 2022-02-21 20:16:44 +01:00
parent a5ce5564a9
commit f21a0bf437

View file

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