mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +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:
parent
daa88448e1
commit
7fc988b919
5 changed files with 45 additions and 13 deletions
|
@ -70,6 +70,8 @@ protected:
|
|||
void compute_height();
|
||||
void layout_absolutely_positioned_descendants();
|
||||
|
||||
virtual float width_of_logical_containing_block() const;
|
||||
|
||||
private:
|
||||
virtual bool is_block() const override { return true; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue