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

LibWeb: Treat % max-width as none when containing block size indefinite

This is technically "undefined behavior" per CSS 2.2, but it seems
sensible to mirror the behavior of max-height in the same situation.
It also appears to match how other engines behave.

Fixes #19242
This commit is contained in:
Andreas Kling 2023-06-14 18:35:02 +02:00
parent ff1606ffaf
commit 3a11b55286
7 changed files with 34 additions and 11 deletions

View file

@ -99,6 +99,7 @@ protected:
static bool should_treat_width_as_auto(Box const&, AvailableSpace const&);
static bool should_treat_height_as_auto(Box const&, AvailableSpace const&);
[[nodiscard]] bool should_treat_max_width_as_none(Box const&) const;
[[nodiscard]] bool should_treat_max_height_as_none(Box const&) const;
OwnPtr<FormattingContext> layout_inside(Box const&, LayoutMode, AvailableSpace const&);