From 591f06f88771cb4efd327615db355fd1dfa0ef82 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 22 Feb 2025 14:56:46 +0100 Subject: [PATCH] LibWeb: Leave right margin along when BFC solves for width We were incorrectly shrinking the used right margin to make it fit within the available space, even though this was not necessary and the margin is allowed to stretch beyond the containing block. This is not observable yet, but will be once we start exposing used margin values in a subsequent change. --- Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 3baa45c89c3..1aa2a5597c2 100644 --- a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -264,7 +264,6 @@ void BlockFormattingContext::compute_width(Box const& box, AvailableSpace const& width = CSS::Length::make_px(underflow_px); } else { width = zero_value; - margin_right = CSS::Length::make_px(margin_right.to_px(box) + underflow_px); } } } else {