mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Pass a &mut Flow to traverse_flow_tree_preorder.
This commit is contained in:
parent
0efa583df4
commit
fa0e198c8f
3 changed files with 7 additions and 9 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
use context::{LayoutContext, SharedLayoutContext};
|
||||
use flow::{self, Flow, MutableFlowUtils, PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
use flow_ref::{self, FlowRef};
|
||||
use flow_ref::FlowRef;
|
||||
use profile_traits::time::{self, TimerMetadata, profile};
|
||||
use std::mem;
|
||||
use std::sync::atomic::{AtomicIsize, Ordering};
|
||||
|
@ -220,7 +220,7 @@ fn assign_block_sizes_and_store_overflow(
|
|||
}
|
||||
|
||||
pub fn traverse_flow_tree_preorder(
|
||||
root: &mut FlowRef,
|
||||
root: &mut Flow,
|
||||
profiler_metadata: Option<TimerMetadata>,
|
||||
time_profiler_chan: time::ProfilerChan,
|
||||
shared_layout_context: &SharedLayoutContext,
|
||||
|
@ -228,7 +228,7 @@ pub fn traverse_flow_tree_preorder(
|
|||
if opts::get().bubble_inline_sizes_separately {
|
||||
let layout_context = LayoutContext::new(shared_layout_context);
|
||||
let bubble_inline_sizes = BubbleISizes { layout_context: &layout_context };
|
||||
flow_ref::deref_mut(root).traverse_postorder(&bubble_inline_sizes);
|
||||
root.traverse_postorder(&bubble_inline_sizes);
|
||||
}
|
||||
|
||||
run_queue_with_custom_work_data_type(queue, |queue| {
|
||||
|
@ -236,7 +236,7 @@ pub fn traverse_flow_tree_preorder(
|
|||
time_profiler_chan, || {
|
||||
queue.push(WorkUnit {
|
||||
fun: assign_inline_sizes,
|
||||
data: (box vec![mut_owned_flow_to_unsafe_flow(root)], 0),
|
||||
data: (box vec![borrowed_flow_to_unsafe_flow(root)], 0),
|
||||
})
|
||||
});
|
||||
}, shared_layout_context);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue