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.
This commit is contained in:
Andreas Kling 2025-02-22 14:56:46 +01:00 committed by Andreas Kling
commit 591f06f887
Notes: github-actions[bot] 2025-02-22 19:03:21 +00:00

View file

@ -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 {