mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibWeb: Break lines until we have enough space between floats
Before this change, we'd always insert one line box fragment, even when a float was taking up too much space on the line, and the fragment didn't actually fit. We now perform line breaks until we have enough space between floats. This fixes many page layouts where we'd previously see small fragments of inline content outside the right edge of the containing block.
This commit is contained in:
parent
c9a7853fef
commit
71ca857b67
4 changed files with 30 additions and 10 deletions
|
@ -29,6 +29,7 @@ public:
|
|||
|
||||
float leftmost_x_offset_at(float y) const;
|
||||
float available_space_for_line(float y) const;
|
||||
bool any_floats_intrude_at_y(float y) const;
|
||||
|
||||
float effective_containing_block_width() const { return m_effective_containing_block_width; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue