mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Support persisting unminified external stylesheets (#33919)
* Support local tweaking of external stylesheets Signed-off-by: Taym <haddadi.taym@gmail.com> * Remove duplicated code between unminify_css and unminify_js Signed-off-by: Taym <haddadi.taym@gmail.com> * Add License Signed-off-by: Taym <haddadi.taym@gmail.com> * Use js-beautify instead of npx Signed-off-by: Taym <haddadi.taym@gmail.com> * Fix clippy warning Signed-off-by: Taym <haddadi.taym@gmail.com> --------- Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
parent
bac1101163
commit
ee68dc2589
8 changed files with 206 additions and 77 deletions
|
@ -707,6 +707,9 @@ pub struct ScriptThread {
|
|||
/// Directory with stored unminified scripts
|
||||
local_script_source: Option<String>,
|
||||
|
||||
/// Unminify Css.
|
||||
unminify_css: bool,
|
||||
|
||||
/// 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
|
||||
|
@ -1343,6 +1346,7 @@ impl ScriptThread {
|
|||
prepare_for_screenshot,
|
||||
unminify_js: opts.unminify_js,
|
||||
local_script_source: opts.local_script_source.clone(),
|
||||
unminify_css: opts.unminify_css,
|
||||
|
||||
userscripts_path: opts.userscripts.clone(),
|
||||
headless: opts.headless,
|
||||
|
@ -3672,6 +3676,7 @@ impl ScriptThread {
|
|||
self.relayout_event,
|
||||
self.prepare_for_screenshot,
|
||||
self.unminify_js,
|
||||
self.unminify_css,
|
||||
self.local_script_source.clone(),
|
||||
self.userscripts_path.clone(),
|
||||
self.headless,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue