mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
LibWeb: Use preferred flex item sizes as min/max-content contribution
When a flex item has a specific preferred size, that size should be its contribution to the containers intrinsic sizes. This fixes an issue on Patreon where the logo would cover the entire viewport since the SVG had a large intrinsic size but the flex item containing it had a small specified size in CSS.
This commit is contained in:
parent
ea7ce76d20
commit
7809cc6557
3 changed files with 49 additions and 14 deletions
|
@ -30,6 +30,9 @@ public:
|
|||
virtual Gfx::FloatPoint calculate_static_position(Box const&) const override;
|
||||
|
||||
private:
|
||||
[[nodiscard]] bool should_treat_main_size_as_auto(Box const&) const;
|
||||
[[nodiscard]] bool should_treat_cross_size_as_auto(Box const&) const;
|
||||
|
||||
void dump_items() const;
|
||||
|
||||
struct DirectionAgnosticMargins {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue