diff --git a/components/layout/block.rs b/components/layout/block.rs index a3611bd639a..864622f7f17 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -1094,7 +1094,9 @@ impl BlockFlow { self.fragment.border_box.start.b = self.fragment.margin.block_start; // Calculate content block-size, taking `min-block-size` and `max-block-size` into account. - let mut candidate_block_size_iterator = CandidateBSizeIterator::new(self.fragment.style(), None); + let mut candidate_block_size_iterator = + CandidateBSizeIterator::new(self.fragment.style(), + self.base.block_container_explicit_block_size); for candidate_block_size in candidate_block_size_iterator { candidate_block_size_iterator.candidate_value = match candidate_block_size { Auto => content_block_size, diff --git a/tests/ref/basic.list b/tests/ref/basic.list index a758798823a..e87ade79ea6 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -135,3 +135,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.html == img_block_display_a.html img_block_display_ref.html == after_block_iteration.html after_block_iteration_ref.html == inline_block_percentage_height_a.html inline_block_percentage_height_ref.html +== percentage_height_float_a.html percentage_height_float_ref.html diff --git a/tests/ref/percentage_height_float_a.html b/tests/ref/percentage_height_float_a.html new file mode 100644 index 00000000000..3214c10eed5 --- /dev/null +++ b/tests/ref/percentage_height_float_a.html @@ -0,0 +1,12 @@ + + + +Goodbye + + +
+
x
+
+ + + diff --git a/tests/ref/percentage_height_float_ref.html b/tests/ref/percentage_height_float_ref.html new file mode 100644 index 00000000000..f66cec4cfb7 --- /dev/null +++ b/tests/ref/percentage_height_float_ref.html @@ -0,0 +1,13 @@ + + + +Goodbye + + +
+
x
+
+ + + +