1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:47:34 +00:00

LibWeb: Use table_box() to get root box in TFC

Introduce `table_box()` function that returns table formatting
context root box casted to `TableBox` similar to how it's done
in other formatting contexts like `root()` in BFC and
`flex_container` in FFC. And replace `context_box()` calls
in TFC with calls to `table_box()`.
This commit is contained in:
Aliaksandr Kalenik 2023-01-08 01:54:25 +03:00 committed by Andreas Kling
parent f26eed9633
commit 77a2b151ea
2 changed files with 11 additions and 11 deletions

View file

@ -19,6 +19,8 @@ public:
virtual void run(Box const&, LayoutMode, AvailableSpace const&) override;
virtual CSSPixels automatic_content_height() const override;
TableBox const& table_box() const { return static_cast<TableBox const&>(context_box()); }
private:
void calculate_row_column_grid(Box const&);
void compute_table_measures();