summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorTobias Christiansen <tobyase@serenityos.org>2021-09-19 12:51:13 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-19 13:07:53 +0200
commit79c2762a0d03bab731748a35037aa8e86052ed85 (patch)
tree3e96ee36a1b41f2eb38bb5228367ccab61e0abb9 /Userland
parentedbc5489a8895f01e376a1fd2a76c961f72474a8 (diff)
downloadserenity-79c2762a0d03bab731748a35037aa8e86052ed85.zip
LibWeb: Flexbox: Use maximum size of container as available size
This previously wouldn't work well with flex-grow.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
index b4fda3ef5f..f1a0484b68 100644
--- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
@@ -269,6 +269,7 @@ void FlexFormattingContext::run(Box& box, LayoutMode)
} else {
if (has_main_max_size(box)) {
main_max_size = specified_main_max_size(box);
+ main_available_size = main_max_size;
main_is_constrained = true;
}
if (has_main_min_size(box)) {