summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-07-23 00:25:05 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-26 01:53:41 +0200
commit71ec46b8ccf1138f5fd1a978c1f3d84325291ae4 (patch)
treed3d40834bcafe3f60e4fe43fce3b5a117bc3399c
parent7200b3a16c55221eda5da5997a747b4e5536fa6f (diff)
downloadserenity-71ec46b8ccf1138f5fd1a978c1f3d84325291ae4.zip
LibWeb: Don't treat calc() in used flex basis as definite for now
We'll eventually need some way to determine if a calc() value results in a definite size.
-rw-r--r--Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
index 6ca5136e34..2488e033f0 100644
--- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
@@ -665,6 +665,10 @@ void FlexFormattingContext::determine_flex_base_size_and_hypothetical_main_size(
return false;
if (flex_basis.length_percentage->is_length())
return true;
+ if (flex_basis.length_percentage->is_calculated()) {
+ // FIXME: Handle calc() in used flex basis.
+ return false;
+ }
if (is_row_layout())
return m_flex_container_state.has_definite_width();
return m_flex_container_state.has_definite_height();