From f7750985fa3c8efebd91574a5fe34859606a2103 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 10 Jul 2022 23:49:02 +0200 Subject: [PATCH] LibWeb: Treat "flex-basis: 0px" like any other definite basis value --- Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index 39f05be68c5..1a3ec1078e1 100644 --- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp @@ -581,10 +581,7 @@ void FlexFormattingContext::determine_flex_base_size_and_hypothetical_main_size( // A. If the item has a definite used flex basis, that’s the flex base size. if (used_flex_basis.is_definite()) { - auto specified_base_size = get_pixel_size(m_state, child_box, used_flex_basis.length_percentage.value()); - if (specified_base_size == 0) - return calculated_main_size(flex_item.box); - return specified_base_size; + return get_pixel_size(m_state, child_box, used_flex_basis.length_percentage.value()); } // B. If the flex item has ...