mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
layout: Fix merge fallout.
This commit is contained in:
parent
2fa2a3b5a9
commit
930dfbb7ad
5 changed files with 18 additions and 14 deletions
|
@ -1282,8 +1282,8 @@ impl<'a> FlowConstructor<'a> {
|
|||
fn build_flow_for_flex(&mut self, node: &ThreadSafeLayoutNode, float_kind: Option<FloatKind>)
|
||||
-> ConstructionResult {
|
||||
let fragment = self.build_fragment_for_block(node);
|
||||
let flow = Box::new(FlexFlow::from_fragment(fragment, float_kind));
|
||||
self.build_flow_for_block_like(FlowRef::new(flow), node)
|
||||
let flow = Arc::new(FlexFlow::from_fragment(fragment, float_kind));
|
||||
self.build_flow_for_block_like(flow, node)
|
||||
}
|
||||
|
||||
/// Attempts to perform incremental repair to account for recent changes to this node. This
|
||||
|
|
|
@ -1898,7 +1898,7 @@ impl FlexFlowDisplayListBuilding for FlexFlow {
|
|||
display_list: Box<DisplayList>,
|
||||
layout_context: &LayoutContext) {
|
||||
// Draw the rest of the block.
|
||||
self.as_block().build_display_list_for_block(display_list,
|
||||
self.as_mut_block().build_display_list_for_block(display_list,
|
||||
layout_context,
|
||||
BorderPaintingMode::Separate)
|
||||
}
|
||||
|
|
|
@ -249,7 +249,7 @@ impl FlexFlow {
|
|||
kid.assign_block_size_for_inorder_child_if_necessary(layout_context, thread_id);
|
||||
|
||||
{
|
||||
let child_fragment = &mut kid.as_block().fragment;
|
||||
let child_fragment = &mut kid.as_mut_block().fragment;
|
||||
// TODO: Percentage block-size
|
||||
let child_specified_block_size =
|
||||
MaybeAuto::from_style(child_fragment.style().content_block_size(),
|
||||
|
@ -285,7 +285,7 @@ impl FlexFlow {
|
|||
// Assign the block-size of kid fragments, which is the same value as own block-size.
|
||||
for kid in self.block_flow.base.child_iter() {
|
||||
{
|
||||
let kid_fragment = &mut kid.as_block().fragment;
|
||||
let kid_fragment = &mut kid.as_mut_block().fragment;
|
||||
let mut position = kid_fragment.border_box;
|
||||
position.size.block = block_size;
|
||||
kid_fragment.border_box = position;
|
||||
|
@ -302,12 +302,13 @@ impl Flow for FlexFlow {
|
|||
FlowClass::Flex
|
||||
}
|
||||
|
||||
fn as_block<'a>(&'a mut self) -> &'a mut BlockFlow {
|
||||
fn as_mut_block<'a>(&'a mut self) -> &'a mut BlockFlow {
|
||||
&mut self.block_flow
|
||||
}
|
||||
|
||||
fn bubble_inline_sizes(&mut self) {
|
||||
let _scope = layout_debug_scope!("flex::bubble_inline_sizes {:x}", self.block_flow.base.debug_id());
|
||||
let _scope = layout_debug_scope!("flex::bubble_inline_sizes {:x}",
|
||||
self.block_flow.base.debug_id());
|
||||
|
||||
// Flexbox Section 9.0: Generate anonymous flex items:
|
||||
// This part was handled in the flow constructor.
|
||||
|
|
|
@ -1215,9 +1215,12 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
|
|||
},
|
||||
FlowClass::Flex => {
|
||||
let fragment =
|
||||
Fragment::new_anonymous_from_specific_info(node,
|
||||
Fragment::from_opaque_node_and_style(node.opaque(),
|
||||
PseudoElementType::Normal,
|
||||
style,
|
||||
node.restyle_damage(),
|
||||
SpecificFragmentInfo::Generic);
|
||||
box BlockFlow::from_fragment(fragment, None) as Box<Flow>
|
||||
Arc::new(BlockFlow::from_fragment(fragment, None))
|
||||
},
|
||||
_ => {
|
||||
panic!("no need to generate a missing child")
|
||||
|
|
|
@ -98,8 +98,8 @@ flaky_cpu == append_style_a.html append_style_b.html
|
|||
== first_child_pseudo_a.html first_child_pseudo_b.html
|
||||
== first_of_type_pseudo_a.html first_of_type_pseudo_b.html
|
||||
== fixed_width_overrides_child_intrinsic_width_a.html fixed_width_overrides_child_intrinsic_width_ref.html
|
||||
== flex_column_direction.html flex_column_direction_ref.html
|
||||
== flex_row_direction.html flex_row_direction_ref.html
|
||||
experimental == flex_column_direction.html flex_column_direction_ref.html
|
||||
experimental == flex_row_direction.html flex_row_direction_ref.html
|
||||
== float_clearance_a.html float_clearance_ref.html
|
||||
== float_clearance_intrinsic_width_a.html float_clearance_intrinsic_width_ref.html
|
||||
== float_intrinsic_height.html float_intrinsic_height_ref.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue