From 71ec46b8ccf1138f5fd1a978c1f3d84325291ae4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 23 Jul 2022 00:25:05 +0200 Subject: [PATCH] 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. --- Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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();