diff options
Diffstat (limited to 'components/style/selector_matching.rs')
-rw-r--r-- | components/style/selector_matching.rs | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs index 1f3f187027b..27b1bdde118 100644 --- a/components/style/selector_matching.rs +++ b/components/style/selector_matching.rs @@ -5,12 +5,9 @@ // For lazy_static #![allow(unsafe_code)] -use cssparser::{Parser, SourcePosition}; use dom::TElement; -use log; +use error_reporting::{ParseErrorReporter, StdoutErrorReporter}; use media_queries::{Device, MediaType}; -use msg::ParseErrorReporter; -use msg::constellation_msg::PipelineId; use properties::{PropertyDeclaration, PropertyDeclarationBlock}; use restyle_hints::{ElementSnapshot, RestyleHint, DependencySet}; use selectors::Element; @@ -32,25 +29,6 @@ use viewport::{MaybeNew, ViewportRuleCascade}; pub type DeclarationBlock = GenericDeclarationBlock<Vec<PropertyDeclaration>>; -pub struct StdoutErrorReporter; - -impl ParseErrorReporter for StdoutErrorReporter { - fn report_error(&self, input: &mut Parser, position: SourcePosition, message: &str) { - if log_enabled!(log::LogLevel::Info) { - let location = input.source_location(position); - info!("{}:{} {}", location.line, location.column, message) - } - } - - fn clone(&self) -> Box<ParseErrorReporter + Send + Sync> { - box StdoutErrorReporter - } - - fn pipeline(&self) -> PipelineId { - PipelineId::fake_root_pipeline_id() - } -} - lazy_static! { pub static ref USER_OR_USER_AGENT_STYLESHEETS: Vec<Stylesheet> = { let mut stylesheets = vec!(); |