mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +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
|
@ -25,7 +25,7 @@ float SVGFormattingContext::automatic_content_height() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
void SVGFormattingContext::run(Box const& box, LayoutMode)
|
||||
void SVGFormattingContext::run(Box const& box, LayoutMode, [[maybe_unused]] AvailableSpace const& available_width, [[maybe_unused]] AvailableSpace const& available_height)
|
||||
{
|
||||
auto& svg_svg_element = verify_cast<SVG::SVGSVGElement>(*box.dom_node());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue