layout_2020: Allow end margin to collapse with children if height is

set to zero

Previously, end margin was allowed to collapse only when block size is
not set.
This commit is contained in:
Pu Xingyu 2023-06-04 20:31:54 +08:00
parent 9950c28ee2
commit a103d85405

View file

@ -482,7 +482,7 @@ fn layout_in_flow_non_replaced_block_level(
let end_margin_can_collapse_with_children = block_is_same_formatting_context &&
pbm.padding.block_end == Length::zero() &&
pbm.border.block_end == Length::zero() &&
block_size == LengthOrAuto::Auto &&
block_size.auto_is(|| Length::zero()) == Length::zero() &&
min_box_size.block == Length::zero();
let mut clearance = Length::zero();