mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Pass the SharedLayoutContext to FlowTraversalFunctions directly.
This commit is contained in:
parent
17a9f8507e
commit
a18dea6578
1 changed files with 4 additions and 7 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue