summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-07-10 23:49:02 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-11 18:57:45 +0200
commitf7750985fa3c8efebd91574a5fe34859606a2103 (patch)
tree900b7d3843be2071d4db549f5c277e00efd05ba0 /Userland
parent61c27815e4b8e7e17ed9fed9bb703a98d794887c (diff)
downloadserenity-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.cpp5
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 ...