From 0dd8458683764755be5bb99c9dd5750e9676d6b1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 21 Feb 2024 15:27:37 +0100 Subject: [PATCH] LibWeb: Add FIXME about definiteness to UsedValues::set_content_width() Fixing this function will be quite an undertaking since a *lot* of code relies on set_content_width() implicitly flipping the definiteness of the width. It is wrong though, so we do need to fix it eventually. --- Userland/Libraries/LibWeb/Layout/LayoutState.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWeb/Layout/LayoutState.cpp b/Userland/Libraries/LibWeb/Layout/LayoutState.cpp index c37095d976b..0345500d62f 100644 --- a/Userland/Libraries/LibWeb/Layout/LayoutState.cpp +++ b/Userland/Libraries/LibWeb/Layout/LayoutState.cpp @@ -495,6 +495,8 @@ void LayoutState::UsedValues::set_content_width(CSSPixels width) width = 0; } m_content_width = width; + // FIXME: We should not do this! Definiteness of widths should be determined early, + // and not changed later (except for some special cases in flex layout..) m_has_definite_width = true; }