diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2014-05-13 13:44:09 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2014-05-16 22:33:24 +0200 |
commit | 4310f2943187879b080e715c40b3775fa4e55771 (patch) | |
tree | 636b1e724d3a5e90d57efa45ce40a4ec4252e589 /src/components/main/layout/layout_task.rs | |
parent | e5eac5b538e893b4f93a77ba75c054e92102ea41 (diff) | |
download | servo-4310f2943187879b080e715c40b3775fa4e55771.tar.gz servo-4310f2943187879b080e715c40b3775fa4e55771.zip |
Keep initial values in a lazy static instead of passing a parameter around.
Thanks to @Kimundi for https://gist.github.com/Kimundi/8782487
Diffstat (limited to 'src/components/main/layout/layout_task.rs')
-rw-r--r-- | src/components/main/layout/layout_task.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/components/main/layout/layout_task.rs b/src/components/main/layout/layout_task.rs index e21cd7a52c8..91fab27f1c5 100644 --- a/src/components/main/layout/layout_task.rs +++ b/src/components/main/layout/layout_task.rs @@ -59,8 +59,7 @@ use std::comm::{channel, Sender, Receiver}; use std::mem; use std::ptr; use std::task; -use style::{AuthorOrigin, ComputedValues, Stylesheet, Stylist}; -use style; +use style::{AuthorOrigin, Stylesheet, Stylist}; use sync::{Arc, Mutex}; use url::Url; @@ -98,9 +97,6 @@ pub struct LayoutTask { pub stylist: ~Stylist, - /// The initial set of CSS values. - pub initial_css_values: Arc<ComputedValues>, - /// The workers that we use for parallel operation. pub parallel_traversal: Option<WorkQueue<*mut LayoutContext,PaddedUnsafeFlow>>, @@ -344,7 +340,6 @@ impl LayoutTask { display_list: None, stylist: ~new_stylist(), - initial_css_values: Arc::new(style::initial_values()), parallel_traversal: parallel_traversal, profiler_chan: profiler_chan, opts: opts.clone(), @@ -374,7 +369,6 @@ impl LayoutTask { layout_chan: self.chan.clone(), font_context_info: font_context_info, stylist: &*self.stylist, - initial_css_values: self.initial_css_values.clone(), url: (*url).clone(), reflow_root: OpaqueNodeMethods::from_layout_node(reflow_root), opts: self.opts.clone(), |