mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
De-indent code in find_block_margin_collapsing_with_parent (#29997)
This commit is contained in:
parent
4bf2bca167
commit
befc0f5a5b
1 changed files with 35 additions and 37 deletions
|
@ -83,8 +83,11 @@ impl BlockLevelBox {
|
||||||
let start_margin = pbm.margin.block_start.auto_is(Length::zero);
|
let start_margin = pbm.margin.block_start.auto_is(Length::zero);
|
||||||
collected_margin.adjoin_assign(&CollapsedMargin::new(start_margin));
|
collected_margin.adjoin_assign(&CollapsedMargin::new(start_margin));
|
||||||
|
|
||||||
let contents = match self {
|
let child_boxes = match self {
|
||||||
BlockLevelBox::SameFormattingContextBlock { ref contents, .. } => contents,
|
BlockLevelBox::SameFormattingContextBlock { ref contents, .. } => match contents {
|
||||||
|
BlockContainer::BlockLevelBoxes(boxes) => boxes,
|
||||||
|
BlockContainer::InlineFormattingContext(_) => return false,
|
||||||
|
},
|
||||||
_ => return false,
|
_ => return false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -92,8 +95,6 @@ impl BlockLevelBox {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
match contents {
|
|
||||||
BlockContainer::BlockLevelBoxes(boxes) => {
|
|
||||||
let min_inline_size = style
|
let min_inline_size = style
|
||||||
.content_min_box_size(containing_block, &pbm)
|
.content_min_box_size(containing_block, &pbm)
|
||||||
.auto_is(Length::zero)
|
.auto_is(Length::zero)
|
||||||
|
@ -122,15 +123,12 @@ impl BlockLevelBox {
|
||||||
};
|
};
|
||||||
|
|
||||||
if !Self::find_block_margin_collapsing_with_parent_from_slice(
|
if !Self::find_block_margin_collapsing_with_parent_from_slice(
|
||||||
&boxes,
|
&child_boxes,
|
||||||
collected_margin,
|
collected_margin,
|
||||||
&containing_block_for_children,
|
&containing_block_for_children,
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
BlockContainer::InlineFormattingContext(_) => return false,
|
|
||||||
}
|
|
||||||
|
|
||||||
let block_size_zero =
|
let block_size_zero =
|
||||||
style.content_block_size().is_definitely_zero() || style.content_block_size().is_auto();
|
style.content_block_size().is_definitely_zero() || style.content_block_size().is_auto();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue