mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibWeb: Make FormattingContext::run() take available space as input
Instead of formatting contexts flailing around to figure out from the "inside" how much space is available on the "outside", we should provide the amount of available space in both axes as an input to run(). This basically means that when something creates a nested formatting context, the parent context is responsible for telling the nested context how much space is available for layout. This information is provided immediately when invoking run(). Note that this commit doesn't pass accurate values in all cases yet. This first step just makes it build, and passes available values in some cases where getting them was trivial.
This commit is contained in:
parent
6b2ce2ccc3
commit
f161e20e57
17 changed files with 163 additions and 41 deletions
|
@ -83,7 +83,7 @@ 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)
|
||||
void InlineFormattingContext::run(Box const&, LayoutMode layout_mode, [[maybe_unused]] AvailableSpace const& available_width, [[maybe_unused]] AvailableSpace const& available_height)
|
||||
{
|
||||
VERIFY(containing_block().children_are_inline());
|
||||
generate_line_boxes(layout_mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue