aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/flow.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2015-11-20 09:51:05 -0800
committerBobby Holley <bobbyholley@gmail.com>2015-11-28 18:01:02 -0800
commitcf33f00018c7dc44a09086d6bb68b253153635ae (patch)
treeefa655a0967756601963042f0b321e18ed37ed02 /components/layout/flow.rs
parent77a80919967446639141321ba83b3b0b6d1d1665 (diff)
downloadservo-cf33f00018c7dc44a09086d6bb68b253153635ae.tar.gz
servo-cf33f00018c7dc44a09086d6bb68b253153635ae.zip
Generalize the rest of layout to operate on generic Layout*.
There wasn't a good way to split this up, unfortunately. With this change, the only remaining usage of the Servo-specific structures is in layout_task, where the root node is received from the script task. \o/
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r--components/layout/flow.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index 80487b7cbb8..3af799fc82e 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -59,7 +59,7 @@ use table_wrapper::TableWrapperFlow;
use util::geometry::ZERO_RECT;
use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
use util::print_tree::PrintTree;
-use wrapper::{PseudoElementType, ServoThreadSafeLayoutNode, ThreadSafeLayoutNode};
+use wrapper::{PseudoElementType, ThreadSafeLayoutNode};
/// Virtual methods that make up a float context.
///
@@ -435,7 +435,7 @@ pub trait ImmutableFlowUtils {
fn need_anonymous_flow(self, child: &Flow) -> bool;
/// Generates missing child flow of this flow.
- fn generate_missing_child_flow(self, node: &ServoThreadSafeLayoutNode) -> FlowRef;
+ fn generate_missing_child_flow<'ln, N: ThreadSafeLayoutNode<'ln>>(self, node: &N) -> FlowRef;
/// Returns true if this flow contains fragments that are roots of an absolute flow tree.
fn contains_roots_of_absolute_flow_tree(&self) -> bool;
@@ -1212,7 +1212,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
/// FIXME(pcwalton): This duplicates some logic in
/// `generate_anonymous_table_flows_if_necessary()`. We should remove this function eventually,
/// as it's harder to understand.
- fn generate_missing_child_flow(self, node: &ServoThreadSafeLayoutNode) -> FlowRef {
+ fn generate_missing_child_flow<'ln, N: ThreadSafeLayoutNode<'ln>>(self, node: &N) -> FlowRef {
let mut style = node.style().clone();
match self.class() {
FlowClass::Table | FlowClass::TableRowGroup => {