1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

LibWeb: Start working on supporting fixed table layouts

Sometimes people make tables with a specific width. In those cases,
we can't just use the auto-sizing algorithm, but instead have to
respect whatever width the content specifies.

This is a bit rickety right now, since we don't implement generation
of anonymous table boxes.

The basic mechanism here is that block layout (which table-cell uses)
now has a virtual way of asking for the width of the logical containing
block. This is necessary as table-row does not produce a block-level
element and so was previously unable to provide a containing block
width for table-cell layout.

If the table has a non-auto specified width, we now interpret that as
a request to use fixed table layout. This will evolve over time. :^)
This commit is contained in:
Andreas Kling 2020-06-28 15:11:08 +02:00
parent daa88448e1
commit 7fc988b919
5 changed files with 45 additions and 13 deletions

View file

@ -43,6 +43,7 @@ public:
private:
virtual bool is_table_cell() const override { return true; }
virtual const char* class_name() const override { return "LayoutTableCell"; }
virtual float width_of_logical_containing_block() const override;
};
template<>