mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:18:12 +00:00
LibWeb: Make text justification work between floats
While inline content between floating elements was broken correctly, text justification was still using the original amount of available space (without accounting for floats) when justifying fragments.
This commit is contained in:
parent
bab6796099
commit
e938860126
5 changed files with 237 additions and 1 deletions
|
@ -193,7 +193,7 @@ void InlineFormattingContext::apply_justification_to_fragments(CSS::TextJustify
|
|||
break;
|
||||
}
|
||||
|
||||
CSSPixels excess_horizontal_space = m_available_space->width.to_px() - line_box.width();
|
||||
CSSPixels excess_horizontal_space = line_box.original_available_width() - line_box.width();
|
||||
|
||||
// Only justify the text if the excess horizontal space is less than or
|
||||
// equal to 10%, or if we are not looking at the last line box.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue