diff --git a/components/layout_2020/flow/float.rs b/components/layout_2020/flow/float.rs index 461b8a322ed..f0230f2ac40 100644 --- a/components/layout_2020/flow/float.rs +++ b/components/layout_2020/flow/float.rs @@ -307,7 +307,7 @@ impl FloatContext { pub fn new(max_inline_size: Length) -> Self { let mut bands = FloatBandTree::new(); bands = bands.insert(FloatBand { - top: Length::zero(), + top: Length::new(-f32::INFINITY), left: None, right: None, }); diff --git a/tests/wpt/meta-legacy-layout/css/CSS2/floats/floats-wrap-bfc-with-margin-010.html.ini b/tests/wpt/meta-legacy-layout/css/CSS2/floats/floats-wrap-bfc-with-margin-010.html.ini new file mode 100644 index 00000000000..56def230e36 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/CSS2/floats/floats-wrap-bfc-with-margin-010.html.ini @@ -0,0 +1,2 @@ +[floats-wrap-bfc-with-margin-010.html] + expected: FAIL diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index 7e09fdfeb08..ef8e5f6c76c 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -61965,6 +61965,19 @@ {} ] ], + "floats-wrap-bfc-with-margin-010.html": [ + "1cc9690602fd6b6beb383aef8a80e7ee8be926e3", + [ + null, + [ + [ + "/css/CSS2/floats/floats-wrap-bfc-with-margin-010-ref.html", + "==" + ] + ], + {} + ] + ], "floats-wrap-top-below-bfc-001l.xht": [ "17bec33eb143ce14f13c439e83f433c3fef74fdd", [ @@ -365676,6 +365689,10 @@ "ac45eb30bf43748284a1c7a19061f8df56fa5dca", [] ], + "floats-wrap-bfc-with-margin-010-ref.html": [ + "b29df933ebae5558f63d799907cbef138910dfd5", + [] + ], "floats-wrap-top-below-001l-notref.xht": [ "0953df73d203c1bb3e8d1dba0a3b7a2cde465e18", [] diff --git a/tests/wpt/tests/css/CSS2/floats/floats-wrap-bfc-with-margin-010-ref.html b/tests/wpt/tests/css/CSS2/floats/floats-wrap-bfc-with-margin-010-ref.html new file mode 100644 index 00000000000..b29df933eba --- /dev/null +++ b/tests/wpt/tests/css/CSS2/floats/floats-wrap-bfc-with-margin-010-ref.html @@ -0,0 +1,43 @@ + +