diff options
author | Andreas Kling <kling@serenityos.org> | 2022-07-10 23:49:02 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-11 18:57:45 +0200 |
commit | f7750985fa3c8efebd91574a5fe34859606a2103 (patch) | |
tree | 900b7d3843be2071d4db549f5c277e00efd05ba0 /Userland | |
parent | 61c27815e4b8e7e17ed9fed9bb703a98d794887c (diff) | |
download | serenity-f7750985fa3c8efebd91574a5fe34859606a2103.zip |
LibWeb: Treat "flex-basis: 0px" like any other definite basis value
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index 39f05be68c..1a3ec1078e 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 ... |