aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/sequential.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/sequential.rs')
-rw-r--r--components/layout/sequential.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs
index 36f754a2cf5..275f4ed0429 100644
--- a/components/layout/sequential.rs
+++ b/components/layout/sequential.rs
@@ -19,11 +19,15 @@ use traversal::{BuildDisplayList, ComputeAbsolutePositions};
use traversal::{PostorderDomTraversal, PreorderDomTraversal};
use util::geometry::ZERO_POINT;
use util::opts;
-use wrapper::{LayoutNode, ServoLayoutNode};
-
-pub fn traverse_dom_preorder(root: ServoLayoutNode,
- shared_layout_context: &SharedLayoutContext) {
- fn doit(node: ServoLayoutNode, recalc_style: RecalcStyleForNode, construct_flows: ConstructFlows) {
+use wrapper::LayoutNode;
+
+pub fn traverse_dom_preorder<'le, N>(root: N,
+ shared_layout_context: &SharedLayoutContext)
+ where N: LayoutNode<'le> {
+ fn doit<'le, N>(node: N,
+ recalc_style: RecalcStyleForNode,
+ construct_flows: ConstructFlows)
+ where N: LayoutNode<'le> {
recalc_style.process(node);
for kid in node.children() {
@@ -43,7 +47,7 @@ pub fn traverse_dom_preorder(root: ServoLayoutNode,
root: root.opaque(),
};
- doit(root, recalc_style, construct_flows);
+ doit::<'le, N>(root, recalc_style, construct_flows);
}
pub fn resolve_generated_content(root: &mut FlowRef, shared_layout_context: &SharedLayoutContext) {