mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Rename BlockLevelKind
to NonReplacedContents
This commit is contained in:
parent
58b7005a9b
commit
6f3c5ce773
1 changed files with 8 additions and 6 deletions
|
@ -279,7 +279,7 @@ impl BlockLevelBox {
|
||||||
positioning_context,
|
positioning_context,
|
||||||
containing_block,
|
containing_block,
|
||||||
style,
|
style,
|
||||||
BlockLevelKind::SameFormattingContextBlock(contents),
|
NonReplacedContents::SameFormattingContextBlock(contents),
|
||||||
tree_rank,
|
tree_rank,
|
||||||
float_context,
|
float_context,
|
||||||
)
|
)
|
||||||
|
@ -302,7 +302,9 @@ impl BlockLevelBox {
|
||||||
positioning_context,
|
positioning_context,
|
||||||
containing_block,
|
containing_block,
|
||||||
&contents.style,
|
&contents.style,
|
||||||
BlockLevelKind::EstablishesAnIndependentFormattingContext(non_replaced),
|
NonReplacedContents::EstablishesAnIndependentFormattingContext(
|
||||||
|
non_replaced,
|
||||||
|
),
|
||||||
tree_rank,
|
tree_rank,
|
||||||
float_context,
|
float_context,
|
||||||
),
|
),
|
||||||
|
@ -326,7 +328,7 @@ impl BlockLevelBox {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum BlockLevelKind<'a> {
|
enum NonReplacedContents<'a> {
|
||||||
SameFormattingContextBlock(&'a BlockContainer),
|
SameFormattingContextBlock(&'a BlockContainer),
|
||||||
EstablishesAnIndependentFormattingContext(NonReplacedIFC<'a>),
|
EstablishesAnIndependentFormattingContext(NonReplacedIFC<'a>),
|
||||||
}
|
}
|
||||||
|
@ -338,7 +340,7 @@ fn layout_in_flow_non_replaced_block_level<'a>(
|
||||||
positioning_context: &mut PositioningContext<'a>,
|
positioning_context: &mut PositioningContext<'a>,
|
||||||
containing_block: &ContainingBlock,
|
containing_block: &ContainingBlock,
|
||||||
style: &Arc<ComputedValues>,
|
style: &Arc<ComputedValues>,
|
||||||
block_level_kind: BlockLevelKind<'a>,
|
block_level_kind: NonReplacedContents<'a>,
|
||||||
tree_rank: usize,
|
tree_rank: usize,
|
||||||
float_context: Option<&mut FloatContext>,
|
float_context: Option<&mut FloatContext>,
|
||||||
) -> BoxFragment {
|
) -> BoxFragment {
|
||||||
|
@ -418,7 +420,7 @@ fn layout_in_flow_non_replaced_block_level<'a>(
|
||||||
let fragments;
|
let fragments;
|
||||||
let mut content_block_size;
|
let mut content_block_size;
|
||||||
match block_level_kind {
|
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_start_margin_can_collapse_with_children = pb.block_start == Length::zero();
|
||||||
let this_end_margin_can_collapse_with_children = pb.block_end == Length::zero() &&
|
let this_end_margin_can_collapse_with_children = pb.block_end == Length::zero() &&
|
||||||
block_size == LengthOrAuto::Auto &&
|
block_size == LengthOrAuto::Auto &&
|
||||||
|
@ -461,7 +463,7 @@ fn layout_in_flow_non_replaced_block_level<'a>(
|
||||||
this_end_margin_can_collapse_with_children &&
|
this_end_margin_can_collapse_with_children &&
|
||||||
collapsible_margins_in_children.collapsed_through;
|
collapsible_margins_in_children.collapsed_through;
|
||||||
},
|
},
|
||||||
BlockLevelKind::EstablishesAnIndependentFormattingContext(non_replaced) => {
|
NonReplacedContents::EstablishesAnIndependentFormattingContext(non_replaced) => {
|
||||||
let independent_layout = non_replaced.layout(
|
let independent_layout = non_replaced.layout(
|
||||||
layout_context,
|
layout_context,
|
||||||
positioning_context,
|
positioning_context,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue