Script: removed a few opts::get()

This commit is contained in:
oneturkmen 2019-06-07 23:38:01 -06:00
parent 57205318c5
commit 42569280e2
17 changed files with 238 additions and 45 deletions

View file

@ -49,6 +49,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
use servo_atoms::Atom;
use servo_url::ImmutableOrigin;
use servo_url::ServoUrl;
use std::borrow::Cow;
use std::collections::HashMap;
use std::fmt;
use std::sync::atomic::AtomicBool;
@ -644,6 +645,15 @@ pub trait ScriptThreadFactory {
fn create(
state: InitialScriptState,
load_data: LoadData,
profile_script_events: bool,
print_pwm: bool,
relayout_event: bool,
prepare_for_screenshot: bool,
unminify_js: bool,
userscripts_path: Option<String>,
headless: bool,
replace_surrogates: bool,
user_agent: Cow<'static, str>,
) -> (Sender<Self::Message>, Receiver<Self::Message>);
}
@ -878,6 +888,10 @@ pub struct WorkerGlobalScopeInit {
pub pipeline_id: PipelineId,
/// The origin
pub origin: ImmutableOrigin,
/// True if headless mode
pub is_headless: bool,
/// An optional string allowing the user agnet to be set for testing.
pub user_agent: Cow<'static, str>,
}
/// Common entities representing a network load origin