mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: When adding inline-block fragment to line, use border box width
We were only using the content box width for inline-block fragments, which caused them to not to claim the space needed for padding+border.
This commit is contained in:
parent
05e1ecb3d0
commit
56ff2c112b
Notes:
sideshowbarker
2024-07-19 01:00:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/56ff2c112bd
1 changed files with 2 additions and 2 deletions
|
@ -115,10 +115,10 @@ void BlockBox::split_into_lines(InlineFormattingContext& context, LayoutMode lay
|
|||
|
||||
float available_width = context.available_width_at_line(containing_block.line_boxes().size() - 1);
|
||||
|
||||
if (layout_mode != LayoutMode::OnlyRequiredLineBreaks && line_box->width() > 0 && line_box->width() + width() > available_width) {
|
||||
if (layout_mode != LayoutMode::OnlyRequiredLineBreaks && line_box->width() > 0 && line_box->width() + border_box_width() > available_width) {
|
||||
line_box = &containing_block.add_line_box();
|
||||
}
|
||||
line_box->add_fragment(*this, 0, 0, width(), height());
|
||||
line_box->add_fragment(*this, 0, 0, border_box_width(), height());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue