From e8d6691470f1af7e1c580ae092242466508dcac6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 11 Dec 2020 19:51:57 +0100 Subject: [PATCH] LibWeb: Fix inline-block width computation with no specified width Undefined width should be treated the same as width:auto; --- Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 4be1d16ab2..48f64dbc94 100644 --- a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -235,7 +235,7 @@ void BlockFormattingContext::compute_width_for_floating_box(Box& box) if (margin_right.is_auto()) margin_right = zero_value; - auto width = style.width(); + auto width = style.width().resolved_or_auto(box, width_of_containing_block); // If 'width' is computed as 'auto', the used value is the "shrink-to-fit" width. if (width.is_auto()) {