Skip to content

Commit

Permalink
LibWeb: Don't shift right-floated boxes too much to the left
Browse files Browse the repository at this point in the history
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. :^)
  • Loading branch information
awesomekling committed Feb 21, 2022
1 parent a5ce556 commit f21a0bf
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f21a0bf

Please sign in to comment.