mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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)
|
||||
}
|
||||
|
||||
fn create_shared_context<'a>(global_style_data: &GlobalStyleData,
|
||||
guard: &'a SharedRwLockReadGuard,
|
||||
per_doc_data: &'a PerDocumentStyleDataImpl,
|
||||
traversal_flags: TraversalFlags,
|
||||
snapshot_map: &'a ServoElementSnapshotTable)
|
||||
-> SharedStyleContext<'a> {
|
||||
fn create_shared_context<'a>(
|
||||
global_style_data: &GlobalStyleData,
|
||||
guard: &'a SharedRwLockReadGuard,
|
||||
per_doc_data: &'a PerDocumentStyleDataImpl,
|
||||
traversal_flags: TraversalFlags,
|
||||
snapshot_map: &'a ServoElementSnapshotTable,
|
||||
) -> SharedStyleContext<'a> {
|
||||
SharedStyleContext {
|
||||
stylist: &per_doc_data.stylist,
|
||||
visited_styles_enabled: per_doc_data.visited_styles_enabled(),
|
||||
options: global_style_data.options.clone(),
|
||||
guards: StylesheetGuards::same(guard),
|
||||
timer: Timer::new(),
|
||||
traversal_flags: traversal_flags,
|
||||
snapshot_map: snapshot_map,
|
||||
traversal_flags,
|
||||
snapshot_map,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue