mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibWeb: Use correct box edge when looking for space between floats
This commit is contained in:
parent
0270500383
commit
af73a5d921
4 changed files with 25 additions and 3 deletions
|
@ -52,7 +52,7 @@ BlockFormattingContext const& InlineFormattingContext::parent() const
|
|||
float InlineFormattingContext::leftmost_x_offset_at(float y) const
|
||||
{
|
||||
// NOTE: Floats are relative to the BFC root box, not necessarily the containing block of this IFC.
|
||||
auto box_in_root_rect = border_box_rect_in_ancestor_coordinate_space(containing_block(), parent().root(), m_state);
|
||||
auto box_in_root_rect = content_box_rect_in_ancestor_coordinate_space(containing_block(), parent().root(), m_state);
|
||||
float y_in_root = box_in_root_rect.y() + y;
|
||||
auto space = parent().space_used_by_floats(y_in_root);
|
||||
float containing_block_x = m_containing_block_state.offset.x();
|
||||
|
@ -68,7 +68,7 @@ float InlineFormattingContext::available_space_for_line(float y) const
|
|||
|
||||
// NOTE: Floats are relative to the BFC root box, not necessarily the containing block of this IFC.
|
||||
auto& root_block = parent().root();
|
||||
auto box_in_root_rect = border_box_rect_in_ancestor_coordinate_space(containing_block(), root_block, m_state);
|
||||
auto box_in_root_rect = content_box_rect_in_ancestor_coordinate_space(containing_block(), root_block, m_state);
|
||||
float y_in_root = box_in_root_rect.y() + y;
|
||||
auto space = parent().space_used_by_floats(y_in_root);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue