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.
This commit is contained in:
Andreas Kling 2022-10-07 13:07:40 +02:00
parent 913d9221aa
commit ce0e4b71a3
Notes: sideshowbarker 2024-07-17 06:11:20 +09:00

View File

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