From 6f3c5ce773b4170d8c27c958c0bbf3822bfe452f Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 13 Dec 2019 13:59:15 +0100 Subject: [PATCH] Rename `BlockLevelKind` to `NonReplacedContents` --- components/layout_2020/flow/mod.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/layout_2020/flow/mod.rs b/components/layout_2020/flow/mod.rs index 031e7fab787..64f87ea09d0 100644 --- a/components/layout_2020/flow/mod.rs +++ b/components/layout_2020/flow/mod.rs @@ -279,7 +279,7 @@ impl BlockLevelBox { positioning_context, containing_block, style, - BlockLevelKind::SameFormattingContextBlock(contents), + NonReplacedContents::SameFormattingContextBlock(contents), tree_rank, float_context, ) @@ -302,7 +302,9 @@ impl BlockLevelBox { positioning_context, containing_block, &contents.style, - BlockLevelKind::EstablishesAnIndependentFormattingContext(non_replaced), + NonReplacedContents::EstablishesAnIndependentFormattingContext( + non_replaced, + ), tree_rank, float_context, ), @@ -326,7 +328,7 @@ impl BlockLevelBox { } } -enum BlockLevelKind<'a> { +enum NonReplacedContents<'a> { SameFormattingContextBlock(&'a BlockContainer), EstablishesAnIndependentFormattingContext(NonReplacedIFC<'a>), } @@ -338,7 +340,7 @@ fn layout_in_flow_non_replaced_block_level<'a>( positioning_context: &mut PositioningContext<'a>, containing_block: &ContainingBlock, style: &Arc, - block_level_kind: BlockLevelKind<'a>, + block_level_kind: NonReplacedContents<'a>, tree_rank: usize, float_context: Option<&mut FloatContext>, ) -> BoxFragment { @@ -418,7 +420,7 @@ fn layout_in_flow_non_replaced_block_level<'a>( let fragments; let mut content_block_size; match block_level_kind { - BlockLevelKind::SameFormattingContextBlock(contents) => { + NonReplacedContents::SameFormattingContextBlock(contents) => { let this_start_margin_can_collapse_with_children = pb.block_start == Length::zero(); let this_end_margin_can_collapse_with_children = pb.block_end == Length::zero() && block_size == LengthOrAuto::Auto && @@ -461,7 +463,7 @@ fn layout_in_flow_non_replaced_block_level<'a>( this_end_margin_can_collapse_with_children && collapsible_margins_in_children.collapsed_through; }, - BlockLevelKind::EstablishesAnIndependentFormattingContext(non_replaced) => { + NonReplacedContents::EstablishesAnIndependentFormattingContext(non_replaced) => { let independent_layout = non_replaced.layout( layout_context, positioning_context,