mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Hoist ParseErrorReporter into style and remove the dependency on msg.
The pipeline id stuff is currently unused. If someone needs it, they can add an additional trait bound on their css error reporter to get the pipeline id.
This commit is contained in:
parent
a03747e12b
commit
384cdfcfff
20 changed files with 39 additions and 79 deletions
|
@ -11,12 +11,12 @@ use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
|||
use dom::element::{Element, StylePriority};
|
||||
use dom::node::{Node, NodeDamage, document_from_node, window_from_node};
|
||||
use dom::window::Window;
|
||||
use msg::ParseErrorReporter;
|
||||
use selectors::parser::PseudoElement;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Ref;
|
||||
use string_cache::Atom;
|
||||
use style::error_reporting::ParseErrorReporter;
|
||||
use style::properties::{PropertyDeclaration, Shorthand};
|
||||
use style::properties::{is_supported_property, parse_one_declaration};
|
||||
use util::str::{DOMString, str_join};
|
||||
|
|
|
@ -65,7 +65,6 @@ use html5ever::serialize::SerializeOpts;
|
|||
use html5ever::serialize::TraversalScope;
|
||||
use html5ever::serialize::TraversalScope::{ChildrenOnly, IncludeNode};
|
||||
use html5ever::tree_builder::{LimitedQuirks, NoQuirks, Quirks};
|
||||
use msg::ParseErrorReporter;
|
||||
use selectors::matching::{DeclarationBlock, matches};
|
||||
use selectors::matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
|
||||
use selectors::parser::{AttrSelector, NamespaceConstraint, parse_author_origin_selector_list_from_str};
|
||||
|
@ -78,6 +77,7 @@ use std::default::Default;
|
|||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
use string_cache::{Atom, Namespace, QualName};
|
||||
use style::error_reporting::ParseErrorReporter;
|
||||
use style::properties::DeclaredValue;
|
||||
use style::properties::longhands::{self, background_image, border_spacing, font_family, font_size};
|
||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, parse_style_attribute};
|
||||
|
|
|
@ -43,7 +43,6 @@ use js::rust::Runtime;
|
|||
use layout_interface::{ContentBoxResponse, ContentBoxesResponse, ResolvedStyleResponse, ScriptReflow};
|
||||
use layout_interface::{LayoutChan, LayoutRPC, Msg, Reflow, ReflowQueryType};
|
||||
use libc;
|
||||
use msg::ParseErrorReporter;
|
||||
use msg::constellation_msg::{ConstellationChan, DocumentState, LoadData};
|
||||
use msg::constellation_msg::{MozBrowserEvent, PipelineId, SubpageId, WindowSizeData};
|
||||
use msg::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
|
||||
|
@ -75,6 +74,7 @@ use std::sync::mpsc::TryRecvError::{Disconnected, Empty};
|
|||
use std::sync::mpsc::{Sender, channel};
|
||||
use string_cache::Atom;
|
||||
use style::context::ReflowGoal;
|
||||
use style::error_reporting::ParseErrorReporter;
|
||||
use time;
|
||||
use timers::{ActiveTimers, IsInterval, ScheduledCallback, TimerCallback, TimerHandle};
|
||||
use url::Url;
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
use cssparser::{Parser, SourcePosition};
|
||||
use log;
|
||||
use msg::ParseErrorReporter;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use style::error_reporting::ParseErrorReporter;
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
pub struct CSSErrorReporter {
|
||||
|
@ -24,7 +24,4 @@ impl ParseErrorReporter for CSSErrorReporter {
|
|||
fn clone(&self) -> Box<ParseErrorReporter + Send + Sync> {
|
||||
box CSSErrorReporter { pipelineid: self.pipelineid, }
|
||||
}
|
||||
fn pipeline(&self) -> PipelineId {
|
||||
self.pipelineid
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue