mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27: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:
parent
b52165c5d7
commit
62974160da
14 changed files with 48 additions and 2 deletions
|
@ -52,6 +52,11 @@ FlexFormattingContext::FlexFormattingContext(LayoutState& state, Box const& flex
|
|||
|
||||
FlexFormattingContext::~FlexFormattingContext() = default;
|
||||
|
||||
float FlexFormattingContext::automatic_content_height() const
|
||||
{
|
||||
return m_state.get(flex_container()).content_height();
|
||||
}
|
||||
|
||||
void FlexFormattingContext::run(Box const& run_box, LayoutMode layout_mode)
|
||||
{
|
||||
VERIFY(&run_box == &flex_container());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue