mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
LibWeb: Fix off-by-one when computing available space between floats
Whoops, this explains why things were not lining up correctly. :^)
This commit is contained in:
parent
2e5e4be212
commit
2f38d94c70
3 changed files with 6 additions and 6 deletions
|
@ -113,7 +113,7 @@ void BlockBox::split_into_lines(InlineFormattingContext& context, LayoutMode lay
|
|||
auto& container = context.context_box();
|
||||
auto* line_box = &container.ensure_last_line_box();
|
||||
|
||||
float available_width = context.available_width_at_line(container.line_boxes().size());
|
||||
float available_width = context.available_width_at_line(container.line_boxes().size() - 1);
|
||||
|
||||
if (layout_mode != LayoutMode::OnlyRequiredLineBreaks && line_box->width() > 0 && line_box->width() + width() > available_width) {
|
||||
line_box = &container.add_line_box();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue