Simplify stacking context collection

Simplify the way that stacking contexts are collected. Instead of
passing the StackingContextId down the tree, pass the parent
StackingContext itself. This will allow future patches to get more
information about the parent stacking context (such as location).

Also remove the return value of collect_stacking_contexts, which was
unused.
This commit is contained in:
Martin Robinson 2016-09-25 18:58:56 +02:00
parent ef1b594f48
commit 066775915c
16 changed files with 88 additions and 184 deletions

View file

@ -78,10 +78,7 @@ pub fn build_display_list_for_subtree(flow_root: &mut Flow,
root_stacking_context: &mut StackingContext,
shared_layout_context: &SharedLayoutContext)
-> Vec<DisplayItem> {
let mut children = vec![];
flow_root.collect_stacking_contexts(root_stacking_context.id,
&mut children);
root_stacking_context.add_children(children);
flow_root.collect_stacking_contexts(root_stacking_context);
let mut build_display_list = BuildDisplayList {
state: DisplayListBuildState::new(shared_layout_context,
flow::base(flow_root).stacking_context_id),