aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorskrzyp1 <skrzyp2@gmail.com>2020-06-02 19:32:52 +0200
committerskrzyp1 <skrzyp2@gmail.com>2020-06-02 21:23:45 +0200
commitee6906443f9c60c60e38e6f6daaeb585fa886540 (patch)
tree9b6195a7f49f137d1c5bb6c14cb585429f565e26 /components/script/script_thread.rs
parent6a1cb940bf3b21c694b026755e78dbc9d02d7539 (diff)
downloadservo-ee6906443f9c60c60e38e6f6daaeb585fa886540.tar.gz
servo-ee6906443f9c60c60e38e6f6daaeb585fa886540.zip
reading unminified scripts from disk
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index b7c7da8ced1..729fe1595bc 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -649,6 +649,9 @@ pub struct ScriptThread {
/// Unminify Javascript.
unminify_js: bool,
+ /// Directory with stored unminified scripts
+ local_script_source: Option<String>,
+
/// Where to load userscripts from, if any. An empty string will load from
/// the resources/user-agent-js directory, and if the option isn't passed userscripts
/// won't be loaded
@@ -723,6 +726,7 @@ impl ScriptThreadFactory for ScriptThread {
relayout_event: bool,
prepare_for_screenshot: bool,
unminify_js: bool,
+ local_script_source: Option<String>,
userscripts_path: Option<String>,
headless: bool,
replace_surrogates: bool,
@@ -758,6 +762,7 @@ impl ScriptThreadFactory for ScriptThread {
relayout_event,
prepare_for_screenshot,
unminify_js,
+ local_script_source,
userscripts_path,
headless,
replace_surrogates,
@@ -1209,6 +1214,7 @@ impl ScriptThread {
relayout_event: bool,
prepare_for_screenshot: bool,
unminify_js: bool,
+ local_script_source: Option<String>,
userscripts_path: Option<String>,
headless: bool,
replace_surrogates: bool,
@@ -1322,6 +1328,7 @@ impl ScriptThread {
relayout_event,
prepare_for_screenshot,
unminify_js,
+ local_script_source,
userscripts_path,
headless,
@@ -3161,6 +3168,7 @@ impl ScriptThread {
self.relayout_event,
self.prepare_for_screenshot,
self.unminify_js,
+ self.local_script_source.clone(),
self.userscripts_path.clone(),
self.headless,
self.replace_surrogates,