mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 10:25:10 +00:00
LibWeb: Always break around inline-blocks in AllPossibleLineBreaks mode
This commit is contained in:
parent
f35f605a24
commit
f0a4a6bb11
1 changed files with 3 additions and 1 deletions
|
@ -117,7 +117,9 @@ 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() + border_box_width() > available_width) {
|
||||
if (layout_mode == LayoutMode::AllPossibleLineBreaks && line_box->width() > 0) {
|
||||
line_box = &containing_block.add_line_box();
|
||||
} else if (layout_mode == LayoutMode::Default && 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, border_box_width(), height());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue