1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:57:44 +00:00

LibWeb: Account for absolutely positioned table wrappers

Table wrappers don't quite behave the same as most elements, in that
their computed height and width are not meant to be used for layout.
Instead, we now calculate suitable widths and heights based on the
contents of the table wrapper when performing absolute layout.

Fixes the layout of
http://wpt.live/css/css-position/position-absolute-center-007.html
This commit is contained in:
implicitfield 2024-03-04 22:11:04 +04:00 committed by Andreas Kling
parent 096ddb0021
commit 0243278587
6 changed files with 333 additions and 188 deletions

View file

@ -50,6 +50,9 @@ public:
static bool creates_block_formatting_context(Box const&);
CSSPixels compute_table_box_width_inside_table_wrapper(Box const&, AvailableSpace const&);
CSSPixels compute_table_box_height_inside_table_wrapper(Box const&, AvailableSpace const&);
CSSPixels compute_width_for_replaced_element(Box const&, AvailableSpace const&) const;
CSSPixels compute_height_for_replaced_element(Box const&, AvailableSpace const&) const;