LibWeb: Take full border box into account when vertically placing floats

This commit is contained in:
Andreas Kling 2022-01-23 12:39:48 +01:00
parent 6565ec59fa
commit 6ca90b8d57
Notes: sideshowbarker 2024-07-17 20:21:07 +09:00

View file

@ -660,7 +660,7 @@ void BlockFormattingContext::layout_floating_child(Box& box, BlockContainer cons
x = first_edge(box.box_model().margin_box());
float lowest_border_edge = 0;
for (auto const& box : side_data.boxes)
lowest_border_edge = max(lowest_border_edge, box.height() + box.box_model().border.bottom + box.box_model().margin.bottom);
lowest_border_edge = max(lowest_border_edge, box.border_box_height());
side_data.y_offset += lowest_border_edge;