瀏覽代碼

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.
Andreas Kling 3 年之前
父節點
當前提交
71ec46b8cc
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp

+ 4 - 0
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();