From ce0e4b71a35f11334e5cb6f879f1d970e7dcd204 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 7 Oct 2022 13:07:40 +0200 Subject: [PATCH] LibWeb: Floating boxes with width:auto don't have definite width Since layout is required in order to determine the width of such boxes, they should not be marked as having definite width initially. --- Userland/Libraries/LibWeb/Layout/LayoutState.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibWeb/Layout/LayoutState.cpp b/Userland/Libraries/LibWeb/Layout/LayoutState.cpp index 046d098add..40b699d195 100644 --- a/Userland/Libraries/LibWeb/Layout/LayoutState.cpp +++ b/Userland/Libraries/LibWeb/Layout/LayoutState.cpp @@ -197,6 +197,7 @@ void LayoutState::UsedValues::set_node(NodeWithStyleAndBoxModelMetrics& node, Us if (size.is_auto()) { // NOTE: The width of a non-flex-item block is considered definite if it's auto and the containing block has definite width. if (width + && !node.is_floating() && node.display().is_block_outside() && node.parent() && !node.parent()->is_floating()