1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +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:
Andreas Kling 2022-09-24 13:39:43 +02:00
parent b52165c5d7
commit 62974160da
14 changed files with 48 additions and 2 deletions

View file

@ -78,6 +78,11 @@ float InlineFormattingContext::available_space_for_line(float y) const
return space.right - space.left;
}
float InlineFormattingContext::automatic_content_height() const
{
return compute_auto_height_for_block_formatting_context_root(m_state, containing_block());
}
void InlineFormattingContext::run(Box const&, LayoutMode layout_mode)
{
VERIFY(containing_block().children_are_inline());