diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-07-23 19:30:26 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-07-23 19:30:26 +0200 |
commit | a18dea65787ca158d378a8eb1dc34035b20fa9e6 (patch) | |
tree | 2befbc55e3a1f8c8098bee7815d3197869657056 /components/layout/parallel.rs | |
parent | 17a9f8507e90f560571c13fb33204d1602b86ee4 (diff) | |
download | servo-a18dea65787ca158d378a8eb1dc34035b20fa9e6.tar.gz servo-a18dea65787ca158d378a8eb1dc34035b20fa9e6.zip |
Pass the SharedLayoutContext to FlowTraversalFunctions directly.
Diffstat (limited to 'components/layout/parallel.rs')
-rw-r--r-- | components/layout/parallel.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs index 836f8cff1bf..322bfa07d2e 100644 --- a/components/layout/parallel.rs +++ b/components/layout/parallel.rs @@ -98,8 +98,7 @@ pub type DomTraversalFunction = pub type ChunkedFlowTraversalFunction = extern "Rust" fn(UnsafeFlowList, &mut WorkerProxy<SharedLayoutContext,UnsafeFlowList>); -pub type FlowTraversalFunction = - extern "Rust" fn(UnsafeFlow, &mut WorkerProxy<SharedLayoutContext,UnsafeFlowList>); +pub type FlowTraversalFunction = extern "Rust" fn(UnsafeFlow, &SharedLayoutContext); /// A parallel top-down DOM traversal. pub trait ParallelPreorderDomTraversal : PreorderDomTraversal { @@ -321,7 +320,7 @@ trait ParallelPreorderFlowTraversal : PreorderFlowTraversal { // If there were no more children, start assigning block-sizes. if !had_children { - bottom_up_func(unsafe_flow, proxy) + bottom_up_func(unsafe_flow, proxy.user_data()) } } @@ -412,8 +411,7 @@ fn assign_inline_sizes(unsafe_flows: UnsafeFlowList, fn assign_block_sizes_and_store_overflow( unsafe_flow: UnsafeFlow, - proxy: &mut WorkerProxy<SharedLayoutContext,UnsafeFlowList>) { - let shared_layout_context = proxy.user_data(); + shared_layout_context: &SharedLayoutContext) { let layout_context = LayoutContext::new(shared_layout_context); let assign_block_sizes_traversal = AssignBSizesAndStoreOverflow { layout_context: &layout_context, @@ -433,8 +431,7 @@ fn compute_absolute_positions( } fn build_display_list(unsafe_flow: UnsafeFlow, - proxy: &mut WorkerProxy<SharedLayoutContext, UnsafeFlowList>) { - let shared_layout_context = proxy.user_data(); + shared_layout_context: &SharedLayoutContext) { let layout_context = LayoutContext::new(shared_layout_context); let build_display_list_traversal = BuildDisplayList { |