aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2015-08-21 14:49:22 -0700
committerPatrick Walton <pcwalton@mimiga.net>2015-08-21 16:08:13 -0700
commit930dfbb7adbd6b3358f6a981d9e0f68ee9f7e5d6 (patch)
tree144119133169c2ef44df44ccfeb755d36ddd9d0a
parent2fa2a3b5a939d5c0773c943161dd9231f745b3e7 (diff)
downloadservo-930dfbb7adbd6b3358f6a981d9e0f68ee9f7e5d6.tar.gz
servo-930dfbb7adbd6b3358f6a981d9e0f68ee9f7e5d6.zip
layout: Fix merge fallout.
-rw-r--r--components/layout/construct.rs4
-rw-r--r--components/layout/display_list_builder.rs6
-rw-r--r--components/layout/flex.rs9
-rw-r--r--components/layout/flow.rs9
-rw-r--r--tests/ref/basic.list4
5 files changed, 18 insertions, 14 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 3e5a7448c1e..797f7cf0703 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -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
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs
index e8d54dd37c4..e49b306169f 100644
--- a/components/layout/display_list_builder.rs
+++ b/components/layout/display_list_builder.rs
@@ -1898,9 +1898,9 @@ 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,
- layout_context,
- BorderPaintingMode::Separate)
+ self.as_mut_block().build_display_list_for_block(display_list,
+ layout_context,
+ BorderPaintingMode::Separate)
}
}
diff --git a/components/layout/flex.rs b/components/layout/flex.rs
index c1a79a02a9f..6861d6a62df 100644
--- a/components/layout/flex.rs
+++ b/components/layout/flex.rs
@@ -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.
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index ea950022ec3..6d319bdd991 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -1215,9 +1215,12 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
},
FlowClass::Flex => {
let fragment =
- Fragment::new_anonymous_from_specific_info(node,
- SpecificFragmentInfo::Generic);
- box BlockFlow::from_fragment(fragment, None) as Box<Flow>
+ Fragment::from_opaque_node_and_style(node.opaque(),
+ PseudoElementType::Normal,
+ style,
+ node.restyle_damage(),
+ SpecificFragmentInfo::Generic);
+ Arc::new(BlockFlow::from_fragment(fragment, None))
},
_ => {
panic!("no need to generate a missing child")
diff --git a/tests/ref/basic.list b/tests/ref/basic.list
index cb06401dabc..40c2e3bd3af 100644
--- a/tests/ref/basic.list
+++ b/tests/ref/basic.list
@@ -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