aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-03-13 16:50:26 -0700
committerGitHub <noreply@github.com>2017-03-13 16:50:26 -0700
commit8c8edb8731dc01d254839d0922590fba72f278c6 (patch)
treec0c0297ced2c9b58828f4f68dadd50055e53ce6d /components/layout_thread/lib.rs
parent35028f8f60d172a6bde8133ebe26e887eb33d9e6 (diff)
parentb4de69e3ebf5b2a6e82b68b66df090e9220b9e61 (diff)
downloadservo-8c8edb8731dc01d254839d0922590fba72f278c6.tar.gz
servo-8c8edb8731dc01d254839d0922590fba72f278c6.zip
Auto merge of #15931 - emilio:die-defaultvalues-die, r=mbrubeck
style: Kill SharedStyleContext::default_computed_values. This is on top of https://github.com/servo/servo/pull/15928. Now that cascade() gets a Device ref, we can use the default computed values from there to avoid propagating that state all over the place. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15931) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r--components/layout_thread/lib.rs15
1 files changed, 4 insertions, 11 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index 529100c06d8..58f81a71a59 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -110,11 +110,10 @@ use style::animation::Animation;
use style::context::{QuirksMode, ReflowGoal, SharedStyleContext, ThreadLocalStyleContextCreationInfo};
use style::data::StoredRestyleHint;
use style::dom::{ShowSubtree, ShowSubtreeDataAndPrimaryValues, TElement, TNode};
-use style::error_reporting::{ParseErrorReporter, StdoutErrorReporter};
+use style::error_reporting::StdoutErrorReporter;
use style::logical_geometry::LogicalPoint;
use style::media_queries::{Device, MediaType};
use style::parser::ParserContextExtraData;
-use style::properties::ComputedValues;
use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, REPOSITION, STORE_OVERFLOW};
use style::stylesheets::{Origin, Stylesheet, UserAgentStylesheets};
use style::stylist::Stylist;
@@ -506,15 +505,10 @@ impl LayoutThread {
stylist: rw_data.stylist.clone(),
running_animations: self.running_animations.clone(),
expired_animations: self.expired_animations.clone(),
- error_reporter: self.error_reporter.clone(),
+ error_reporter: Box::new(self.error_reporter.clone()),
local_context_creation_data: Mutex::new(thread_local_style_context_creation_data),
timer: self.timer.clone(),
quirks_mode: self.quirks_mode.unwrap(),
- // FIXME(bz): This isn't really right, but it's no more wrong
- // than what we used to do. See
- // https://github.com/servo/servo/issues/14773 for fixing it
- // properly.
- default_computed_values: Arc::new(ComputedValues::initial_values().clone()),
},
image_cache_thread: Mutex::new(self.image_cache_thread.clone()),
font_cache_thread: Mutex::new(self.font_cache_thread.clone()),
@@ -1569,7 +1563,7 @@ fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> {
Origin::UserAgent,
Default::default(),
None,
- Box::new(StdoutErrorReporter),
+ &StdoutErrorReporter,
ParserContextExtraData::default()))
}
@@ -1582,8 +1576,7 @@ fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> {
for &(ref contents, ref url) in &opts::get().user_stylesheets {
user_or_user_agent_stylesheets.push(Stylesheet::from_bytes(
&contents, url.clone(), None, None, Origin::User, Default::default(),
- None, Box::new(StdoutErrorReporter),
- ParserContextExtraData::default()));
+ None, &StdoutErrorReporter, ParserContextExtraData::default()));
}
let quirks_mode_stylesheet = try!(parse_ua_stylesheet("quirks-mode.css"));