mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
parent
ef1b594f48
commit
066775915c
16 changed files with 88 additions and 184 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue