diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2016-07-19 17:40:14 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2016-07-20 08:42:46 +0200 |
commit | 5c70dfab01ed434c609177d1b3be4a8936f641d6 (patch) | |
tree | b217ed1468ceaf8b61dbc2ea9e58c2beb35289ae /components/style/servo_selector_impl.rs | |
parent | 4b7060554bf1ebc24febfc2c73d06e456d0754f4 (diff) | |
download | servo-5c70dfab01ed434c609177d1b3be4a8936f641d6.tar.gz servo-5c70dfab01ed434c609177d1b3be4a8936f641d6.zip |
Have a concrete SelectorImpl type everywhere in the style crate.
It is conditionally compiled to one implementation or the other
(Gecko or Servo) with `#[cfg(…)]`.
Diffstat (limited to 'components/style/servo_selector_impl.rs')
-rw-r--r-- | components/style/servo_selector_impl.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/style/servo_selector_impl.rs b/components/style/servo_selector_impl.rs index 6c7370e1455..d1fdaf0336c 100644 --- a/components/style/servo_selector_impl.rs +++ b/components/style/servo_selector_impl.rs @@ -5,7 +5,7 @@ use element_state::ElementState; use error_reporting::StdoutErrorReporter; use parser::ParserContextExtraData; -use selector_impl::{SelectorImplExt, ElementExt, PseudoElementCascadeType}; +use selector_impl::{SelectorImplExt, ElementExt, PseudoElementCascadeType, TheSelectorImpl}; use selectors::Element; use selectors::parser::{ParserContext, SelectorImpl}; use std::process; @@ -179,24 +179,24 @@ impl SelectorImplExt for ServoSelectorImpl { } #[inline] - fn get_user_or_user_agent_stylesheets() -> &'static [Stylesheet<Self>] { + fn get_user_or_user_agent_stylesheets() -> &'static [Stylesheet] { &*USER_OR_USER_AGENT_STYLESHEETS } #[inline] - fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet<Self>> { + fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet> { Some(&*QUIRKS_MODE_STYLESHEET) } } -impl<E: Element<Impl=ServoSelectorImpl, AttrString=String>> ElementExt for E { +impl<E: Element<Impl=TheSelectorImpl, AttrString=String>> ElementExt for E { fn is_link(&self) -> bool { self.match_non_ts_pseudo_class(NonTSPseudoClass::AnyLink) } } lazy_static! { - pub static ref USER_OR_USER_AGENT_STYLESHEETS: Vec<Stylesheet<ServoSelectorImpl>> = { + pub static ref USER_OR_USER_AGENT_STYLESHEETS: Vec<Stylesheet> = { let mut stylesheets = vec!(); // FIXME: presentational-hints.css should be at author origin with zero specificity. // (Does it make a difference?) @@ -229,7 +229,7 @@ lazy_static! { } lazy_static! { - pub static ref QUIRKS_MODE_STYLESHEET: Stylesheet<ServoSelectorImpl> = { + pub static ref QUIRKS_MODE_STYLESHEET: Stylesheet = { match read_resource_file("quirks-mode.css") { Ok(res) => { Stylesheet::from_bytes( |