1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07:46 +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

@ -26,6 +26,9 @@ public:
virtual void run(Box const&, LayoutMode) = 0;
// This function returns the automatic content height of the context's root box.
virtual float automatic_content_height() const = 0;
Box const& context_box() const { return m_context_box; }
FormattingContext* parent() { return m_parent; }