LibWeb: Fix inline-block width computation with no specified width

Undefined width should be treated the same as width:auto;
This commit is contained in:
Andreas Kling 2020-12-11 19:51:57 +01:00
parent aec54af04f
commit e8d6691470
Notes: sideshowbarker 2024-07-19 00:55:17 +09:00

View file

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