Use the passed-in reflow root rather than the one stored in the SharedLayoutContext.

This commit is contained in:
Ms2ger 2015-07-09 13:08:56 +02:00 committed by Ms2ger
parent f6e3146de2
commit 9f91984415
4 changed files with 47 additions and 35 deletions

View file

@ -33,9 +33,15 @@ pub fn traverse_dom_preorder(root: LayoutNode,
construct_flows.process(node);
}
let layout_context = LayoutContext::new(shared_layout_context);
let recalc_style = RecalcStyleForNode { layout_context: &layout_context };
let construct_flows = ConstructFlows { layout_context: &layout_context };
let layout_context = LayoutContext::new(shared_layout_context);
let recalc_style = RecalcStyleForNode {
layout_context: &layout_context,
root: root.opaque(),
};
let construct_flows = ConstructFlows {
layout_context: &layout_context,
root: root.opaque(),
};
doit(root, recalc_style, construct_flows);
}