From 8b4d09932aa0a8476bd29a4da31cca051a1b2948 Mon Sep 17 00:00:00 2001 From: Enver Balalic Date: Wed, 30 Mar 2022 19:50:57 +0200 Subject: LibWeb: Fix sizing of flex child that has flex-basis 0 Before if an element didn't have a main min size we would clamp it to a literal zero. If that element also had a flex-basis 0 it's width would end up being 0. This patch adds a determine_min_main_size_of_child function that will calculate the minimum main size for the box based on the content of the box. We use the result of that function now instead of clamping the element main min size to 0. This also adds one more box to the flex.html test page, which is the same flex: 0 0 0 box but with flex-direction: column. --- Base/res/html/misc/flex.html | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Base/res/html/misc') diff --git a/Base/res/html/misc/flex.html b/Base/res/html/misc/flex.html index a487eb1e16..3a6179215f 100644 --- a/Base/res/html/misc/flex.html +++ b/Base/res/html/misc/flex.html @@ -186,6 +186,12 @@
2
3
+

flex: 0 0 0; flex-direction: column;

+
+
1
+
2
+
3
+

flex: 1 2 0;

1
-- cgit v1.2.3