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

LibWeb: Respect inline-axis margins between line box fragments :^)

This makes the buckets on ACID3 space out nicely.
This commit is contained in:
Andreas Kling 2022-03-09 18:46:07 +01:00
parent bfedec6a98
commit 45f717cfad
5 changed files with 15 additions and 11 deletions

View file

@ -190,7 +190,7 @@ void InlineFormattingContext::generate_line_boxes(LayoutMode layout_mode)
case InlineLevelIterator::Item::Type::Element: {
auto& box = verify_cast<Layout::Box>(*item.node);
line_builder.break_if_needed(layout_mode, item.border_box_width(), item.should_force_break);
line_builder.append_box(box, item.border_start + item.padding_start, item.padding_end + item.border_end);
line_builder.append_box(box, item.border_start + item.padding_start, item.padding_end + item.border_end, item.margin_start, item.margin_end);
break;
}
case InlineLevelIterator::Item::Type::AbsolutelyPositionedElement:
@ -207,6 +207,8 @@ void InlineFormattingContext::generate_line_boxes(LayoutMode layout_mode)
item.length_in_node,
item.border_start + item.padding_start,
item.padding_end + item.border_end,
item.margin_start,
item.margin_end,
item.width,
text_node.computed_values().font_size());
break;