mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Add FormattingContext::automatic_content_height()
This function should return the automatic height of the formatting context's root box. Until now, we've been relying on some magical handshakes between parent and child context, when negotiating the height of child context root boxes. This is a step towards something more reasonable.
This commit is contained in:
parent
b52165c5d7
commit
62974160da
14 changed files with 48 additions and 2 deletions
|
@ -1002,7 +1002,12 @@ void GridFormattingContext::run(Box const& box, LayoutMode)
|
|||
float total_y = 0;
|
||||
for (auto& grid_row : grid_rows)
|
||||
total_y += grid_row.base_size;
|
||||
box_state.set_content_height(total_y);
|
||||
m_automatic_content_height = total_y;
|
||||
}
|
||||
|
||||
float GridFormattingContext::automatic_content_height() const
|
||||
{
|
||||
return m_automatic_content_height;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue