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

LibWeb: Forbid usage of indefinite width in calculate_min{max}_height

Changing `calculate_min_content_heigh()` and
`calculate_min_content_heigh()` to accept width as `CSSPixels`, instead
of `AvailableSize` that might be indefinite, makes it more explicit
that width is supposed to be known by the time height is measured.

This change has a bit of collateral damage which is rows height
calculation regression in `table/inline-table-width` that worked before
by accident.
This commit is contained in:
Aliaksandr Kalenik 2023-08-12 15:17:17 +02:00 committed by Andreas Kling
parent 9b61339261
commit e25b1f76e1
8 changed files with 52 additions and 80 deletions

View file

@ -59,8 +59,8 @@ public:
CSSPixels calculate_min_content_width(Layout::Box const&) const;
CSSPixels calculate_max_content_width(Layout::Box const&) const;
CSSPixels calculate_min_content_height(Layout::Box const&, AvailableSize const& available_width) const;
CSSPixels calculate_max_content_height(Layout::Box const&, AvailableSize const& available_width) const;
CSSPixels calculate_min_content_height(Layout::Box const&, CSSPixels width) const;
CSSPixels calculate_max_content_height(Layout::Box const&, CSSPixels width) const;
CSSPixels calculate_fit_content_height(Layout::Box const&, AvailableSpace const&) const;
CSSPixels calculate_fit_content_width(Layout::Box const&, AvailableSpace const&) const;