mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Stop creating a LayoutContext in build_display_list_for_subtree.
This commit is contained in:
parent
871c207c44
commit
fd68208da6
2 changed files with 4 additions and 5 deletions
|
@ -82,14 +82,13 @@ pub fn build_display_list_for_subtree(root: &mut FlowRef,
|
|||
shared_layout_context: &SharedLayoutContext)
|
||||
-> Vec<DisplayItem> {
|
||||
let flow_root = flow_ref::deref_mut(root);
|
||||
let layout_context = LayoutContext::new(shared_layout_context);
|
||||
flow_root.traverse_preorder(&ComputeAbsolutePositions { layout_context: &layout_context });
|
||||
flow_root.traverse_preorder(&ComputeAbsolutePositions { layout_context: shared_layout_context });
|
||||
let mut children = vec![];
|
||||
flow_root.collect_stacking_contexts(root_stacking_context.id,
|
||||
&mut children);
|
||||
root_stacking_context.add_children(children);
|
||||
let mut build_display_list = BuildDisplayList {
|
||||
state: DisplayListBuildState::new(&layout_context.shared,
|
||||
state: DisplayListBuildState::new(shared_layout_context,
|
||||
flow::base(&*flow_root).stacking_context_id),
|
||||
};
|
||||
build_display_list.traverse(&mut *flow_root);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue