diff --git a/components/layout_2020/flow/inline.rs b/components/layout_2020/flow/inline.rs index 5b3f9a37efe..4a229a32aaf 100644 --- a/components/layout_2020/flow/inline.rs +++ b/components/layout_2020/flow/inline.rs @@ -1475,11 +1475,12 @@ impl FloatBox { let margin_box = fragment.border_rect().inflate(&fragment.margin); let inline_size = margin_box.size.inline.max(Length::zero()); + let inline_position = + ifc.current_line.inline_position - ifc.current_line.trailing_whitespace_advance; let available_inline_size = match ifc.current_line.placement_among_floats.get() { Some(placement_among_floats) => placement_among_floats.size.inline, None => ifc.containing_block.inline_size, - } - (ifc.current_line.inline_position - - ifc.current_line.trailing_whitespace_advance); + } - inline_position; // If this float doesn't fit on the current line or a previous float didn't fit on // the current line, we need to place it starting at the next line BUT still as @@ -1500,7 +1501,7 @@ impl FloatBox { // placement among floats for the current line, which may adjust its inline // start position. let new_placement = ifc.place_line_among_floats(&LogicalVec2 { - inline: ifc.current_line.inline_position, + inline: inline_position, block: ifc.current_line.max_block_size, }); ifc.current_line diff --git a/tests/wpt/meta/css/CSS2/floats-clear/floats-006.xht.ini b/tests/wpt/meta/css/CSS2/floats-clear/floats-006.xht.ini deleted file mode 100644 index 47dc37acc02..00000000000 --- a/tests/wpt/meta/css/CSS2/floats-clear/floats-006.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[floats-006.xht] - expected: FAIL diff --git a/tests/wpt/meta/css/CSS2/floats/remove-block-between-inline-and-float.html.ini b/tests/wpt/meta/css/CSS2/floats/remove-block-between-inline-and-float.html.ini deleted file mode 100644 index 5ef5e72a276..00000000000 --- a/tests/wpt/meta/css/CSS2/floats/remove-block-between-inline-and-float.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[remove-block-between-inline-and-float.html] - expected: FAIL