diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-03-13 16:50:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 16:50:26 -0700 |
commit | 8c8edb8731dc01d254839d0922590fba72f278c6 (patch) | |
tree | c0c0297ced2c9b58828f4f68dadd50055e53ce6d /components/script_layout_interface/reporter.rs | |
parent | 35028f8f60d172a6bde8133ebe26e887eb33d9e6 (diff) | |
parent | b4de69e3ebf5b2a6e82b68b66df090e9220b9e61 (diff) | |
download | servo-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/script_layout_interface/reporter.rs')
-rw-r--r-- | components/script_layout_interface/reporter.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/components/script_layout_interface/reporter.rs b/components/script_layout_interface/reporter.rs index 171f96d9d06..1c84bd31fc5 100644 --- a/components/script_layout_interface/reporter.rs +++ b/components/script_layout_interface/reporter.rs @@ -11,7 +11,7 @@ use servo_url::ServoUrl; use std::sync::{Mutex, Arc}; use style::error_reporting::ParseErrorReporter; -#[derive(HeapSizeOf)] +#[derive(HeapSizeOf, Clone)] pub struct CSSErrorReporter { pub pipelineid: PipelineId, // Arc+Mutex combo is necessary to make this struct Sync, @@ -22,11 +22,18 @@ pub struct CSSErrorReporter { } impl ParseErrorReporter for CSSErrorReporter { - fn report_error(&self, input: &mut Parser, position: SourcePosition, message: &str, - url: &ServoUrl) { + fn report_error(&self, + input: &mut Parser, + position: SourcePosition, + message: &str, + url: &ServoUrl) { let location = input.source_location(position); if log_enabled!(log::LogLevel::Info) { - info!("Url:\t{}\n{}:{} {}", url.as_str(), location.line, location.column, message) + info!("Url:\t{}\n{}:{} {}", + url.as_str(), + location.line, + location.column, + message) } //TODO: report a real filename @@ -37,11 +44,4 @@ impl ParseErrorReporter for CSSErrorReporter { location.column, message.to_owned())); } - - fn clone(&self) -> Box<ParseErrorReporter + Send + Sync> { - box CSSErrorReporter { - pipelineid: self.pipelineid, - script_chan: self.script_chan.clone(), - } - } } |