mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
stylo: Tidy up create_shared_context.
This commit is contained in:
parent
b13f62714a
commit
663794fe2d
1 changed files with 9 additions and 8 deletions
|
@ -211,20 +211,21 @@ unsafe fn dummy_url_data() -> &'static RefPtr<URLExtraData> {
|
||||||
RefPtr::from_ptr_ref(&DUMMY_URL_DATA)
|
RefPtr::from_ptr_ref(&DUMMY_URL_DATA)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_shared_context<'a>(global_style_data: &GlobalStyleData,
|
fn create_shared_context<'a>(
|
||||||
guard: &'a SharedRwLockReadGuard,
|
global_style_data: &GlobalStyleData,
|
||||||
per_doc_data: &'a PerDocumentStyleDataImpl,
|
guard: &'a SharedRwLockReadGuard,
|
||||||
traversal_flags: TraversalFlags,
|
per_doc_data: &'a PerDocumentStyleDataImpl,
|
||||||
snapshot_map: &'a ServoElementSnapshotTable)
|
traversal_flags: TraversalFlags,
|
||||||
-> SharedStyleContext<'a> {
|
snapshot_map: &'a ServoElementSnapshotTable,
|
||||||
|
) -> SharedStyleContext<'a> {
|
||||||
SharedStyleContext {
|
SharedStyleContext {
|
||||||
stylist: &per_doc_data.stylist,
|
stylist: &per_doc_data.stylist,
|
||||||
visited_styles_enabled: per_doc_data.visited_styles_enabled(),
|
visited_styles_enabled: per_doc_data.visited_styles_enabled(),
|
||||||
options: global_style_data.options.clone(),
|
options: global_style_data.options.clone(),
|
||||||
guards: StylesheetGuards::same(guard),
|
guards: StylesheetGuards::same(guard),
|
||||||
timer: Timer::new(),
|
timer: Timer::new(),
|
||||||
traversal_flags: traversal_flags,
|
traversal_flags,
|
||||||
snapshot_map: snapshot_map,
|
snapshot_map,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue