Update selectors to 0.11

This brings :not() with proper list of complex selectors as argument.
This commit is contained in:
Anthony Ramine 2016-08-19 23:11:08 +02:00
parent 609d47b44f
commit 1c4cc6c703
13 changed files with 60 additions and 60 deletions

View file

@ -33,7 +33,7 @@ range = {path = "../range"}
rustc-serialize = "0.3" rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"} script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
selectors = {version = "0.10", features = ["heap_size"]} selectors = {version = "0.11", features = ["heap_size"]}
serde_macros = "0.8" serde_macros = "0.8"
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.23", features = ["heap_size"]} string_cache = {version = "0.2.23", features = ["heap_size"]}

View file

@ -62,7 +62,7 @@ regex = "0.1.43"
rustc-serialize = "0.3" rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"} script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
selectors = {version = "0.10", features = ["heap_size"]} selectors = {version = "0.11", features = ["heap_size"]}
serde = "0.8" serde = "0.8"
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.23", features = ["heap_size", "unstable"]} string_cache = {version = "0.2.23", features = ["heap_size", "unstable"]}

View file

@ -27,7 +27,7 @@ plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
range = {path = "../range"} range = {path = "../range"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
selectors = {version = "0.10", features = ["heap_size"]} selectors = {version = "0.11", features = ["heap_size"]}
string_cache = {version = "0.2.23", features = ["heap_size"]} string_cache = {version = "0.2.23", features = ["heap_size"]}
style = {path = "../style"} style = {path = "../style"}
url = {version = "1.2", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}

View file

@ -1162,7 +1162,7 @@ dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1", "script_layout_interface 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1931,7 +1931,7 @@ dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1", "script_layout_interface 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1967,7 +1967,7 @@ dependencies = [
"profile_traits 0.0.1", "profile_traits 0.0.1",
"range 0.0.1", "range 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2016,7 +2016,7 @@ dependencies = [
[[package]] [[package]]
name = "selectors" name = "selectors"
version = "0.10.1" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2238,7 +2238,7 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2258,7 +2258,7 @@ dependencies = [
"cssparser 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"style_traits 0.0.1", "style_traits 0.0.1",

View file

@ -38,7 +38,7 @@ num-traits = "0.1.32"
ordered-float = "0.2.2" ordered-float = "0.2.2"
rand = "0.3" rand = "0.3"
rustc-serialize = "0.3" rustc-serialize = "0.3"
selectors = "0.10.1" selectors = "0.11"
serde = {version = "0.8", optional = true} serde = {version = "0.8", optional = true}
serde_macros = {version = "0.8", optional = true} serde_macros = {version = "0.8", optional = true}
smallvec = "0.1" smallvec = "0.1"

View file

@ -7,8 +7,8 @@
use element_state::*; use element_state::*;
use selector_impl::{ElementExt, TheSelectorImpl, NonTSPseudoClass, AttrValue}; use selector_impl::{ElementExt, TheSelectorImpl, NonTSPseudoClass, AttrValue};
use selectors::matching::StyleRelations; use selectors::matching::StyleRelations;
use selectors::matching::matches_compound_selector; use selectors::matching::matches_complex_selector;
use selectors::parser::{AttrSelector, Combinator, CompoundSelector, SimpleSelector, SelectorImpl}; use selectors::parser::{AttrSelector, Combinator, ComplexSelector, SimpleSelector, SelectorImpl};
use selectors::{Element, MatchAttr}; use selectors::{Element, MatchAttr};
use std::clone::Clone; use std::clone::Clone;
use std::sync::Arc; use std::sync::Arc;
@ -333,7 +333,7 @@ impl Sensitivities {
#[derive(Debug)] #[derive(Debug)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
struct Dependency { struct Dependency {
selector: Arc<CompoundSelector<TheSelectorImpl>>, selector: Arc<ComplexSelector<TheSelectorImpl>>,
combinator: Option<Combinator>, combinator: Option<Combinator>,
sensitivities: Sensitivities, sensitivities: Sensitivities,
} }
@ -353,12 +353,12 @@ impl DependencySet {
self.deps.len() self.deps.len()
} }
pub fn note_selector(&mut self, selector: &Arc<CompoundSelector<TheSelectorImpl>>) { pub fn note_selector(&mut self, selector: &Arc<ComplexSelector<TheSelectorImpl>>) {
let mut cur = selector; let mut cur = selector;
let mut combinator: Option<Combinator> = None; let mut combinator: Option<Combinator> = None;
loop { loop {
let mut sensitivities = Sensitivities::new(); let mut sensitivities = Sensitivities::new();
for s in &cur.simple_selectors { for s in &cur.compound_selector {
sensitivities.states.insert(selector_to_state(s)); sensitivities.states.insert(selector_to_state(s));
if !sensitivities.attrs { if !sensitivities.attrs {
sensitivities.attrs = is_attr_selector(s); sensitivities.attrs = is_attr_selector(s);
@ -404,9 +404,9 @@ impl DependencySet {
if state_changes.intersects(dep.sensitivities.states) || (attrs_changed && dep.sensitivities.attrs) { if state_changes.intersects(dep.sensitivities.states) || (attrs_changed && dep.sensitivities.attrs) {
let old_el: ElementWrapper<E> = ElementWrapper::new_with_snapshot(el.clone(), snapshot); let old_el: ElementWrapper<E> = ElementWrapper::new_with_snapshot(el.clone(), snapshot);
let matched_then = let matched_then =
matches_compound_selector(&*dep.selector, &old_el, None, &mut StyleRelations::empty()); matches_complex_selector(&*dep.selector, &old_el, None, &mut StyleRelations::empty());
let matches_now = let matches_now =
matches_compound_selector(&*dep.selector, el, None, &mut StyleRelations::empty()); matches_complex_selector(&*dep.selector, el, None, &mut StyleRelations::empty());
if matched_then != matches_now { if matched_then != matches_now {
hint.insert(combinator_to_restyle_hint(dep.combinator)); hint.insert(combinator_to_restyle_hint(dep.combinator));
if hint.is_all() { if hint.is_all() {

View file

@ -175,7 +175,7 @@ impl Stylist {
}; };
map.$priority.insert(Rule { map.$priority.insert(Rule {
selector: selector.compound_selectors.clone(), selector: selector.complex_selector.clone(),
declarations: DeclarationBlock { declarations: DeclarationBlock {
specificity: selector.specificity, specificity: selector.specificity,
declarations: $style_rule.declarations.$priority.clone(), declarations: $style_rule.declarations.$priority.clone(),
@ -195,7 +195,7 @@ impl Stylist {
rules_source_order += 1; rules_source_order += 1;
for selector in &style_rule.selectors { for selector in &style_rule.selectors {
self.state_deps.note_selector(&selector.compound_selectors); self.state_deps.note_selector(&selector.complex_selector);
if selector.affects_siblings() { if selector.affects_siblings() {
self.sibling_affecting_selectors.push(selector.clone()); self.sibling_affecting_selectors.push(selector.clone());
} }
@ -452,20 +452,20 @@ impl Stylist {
where E: ElementExt where E: ElementExt
{ {
use selectors::matching::StyleRelations; use selectors::matching::StyleRelations;
use selectors::matching::matches_compound_selector; use selectors::matching::matches_complex_selector;
// XXX we can probably do better, the candidate should already know what // XXX we can probably do better, the candidate should already know what
// rules it matches. // rules it matches.
// //
// XXX Could the bloom filter help here? Should be available. // XXX Could the bloom filter help here? Should be available.
for ref selector in self.non_common_style_affecting_attributes_selectors.iter() { for ref selector in self.non_common_style_affecting_attributes_selectors.iter() {
let element_matches = matches_compound_selector(&selector.compound_selectors, let element_matches = matches_complex_selector(&selector.complex_selector,
element, element,
None, None,
&mut StyleRelations::empty()); &mut StyleRelations::empty());
let candidate_matches = matches_compound_selector(&selector.compound_selectors, let candidate_matches = matches_complex_selector(&selector.complex_selector,
candidate, candidate,
None, None,
&mut StyleRelations::empty()); &mut StyleRelations::empty());
if element_matches != candidate_matches { if element_matches != candidate_matches {
return false; return false;
@ -481,25 +481,25 @@ impl Stylist {
where E: ElementExt where E: ElementExt
{ {
use selectors::matching::StyleRelations; use selectors::matching::StyleRelations;
use selectors::matching::matches_compound_selector; use selectors::matching::matches_complex_selector;
// XXX we can probably do better, the candidate should already know what // XXX we can probably do better, the candidate should already know what
// rules it matches. // rules it matches.
// //
// XXX The bloom filter would help here, and should be available. // XXX The bloom filter would help here, and should be available.
for ref selector in self.sibling_affecting_selectors.iter() { for ref selector in self.sibling_affecting_selectors.iter() {
let element_matches = matches_compound_selector(&selector.compound_selectors, let element_matches = matches_complex_selector(&selector.complex_selector,
element, element,
None, None,
&mut StyleRelations::empty()); &mut StyleRelations::empty());
let candidate_matches = matches_compound_selector(&selector.compound_selectors, let candidate_matches = matches_complex_selector(&selector.complex_selector,
candidate, candidate,
None, None,
&mut StyleRelations::empty()); &mut StyleRelations::empty());
if element_matches != candidate_matches { if element_matches != candidate_matches {
debug!("match_same_sibling_affecting_rules: Failure due to {:?}", debug!("match_same_sibling_affecting_rules: Failure due to {:?}",
selector.compound_selectors); selector.complex_selector);
return false; return false;
} }
} }

10
ports/cef/Cargo.lock generated
View file

@ -1070,7 +1070,7 @@ dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1", "script_layout_interface 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1783,7 +1783,7 @@ dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1", "script_layout_interface 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1819,7 +1819,7 @@ dependencies = [
"profile_traits 0.0.1", "profile_traits 0.0.1",
"range 0.0.1", "range 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1858,7 +1858,7 @@ dependencies = [
[[package]] [[package]]
name = "selectors" name = "selectors"
version = "0.10.1" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2121,7 +2121,7 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -11,7 +11,7 @@ dependencies = [
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"style_traits 0.0.1", "style_traits 0.0.1",
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -170,7 +170,7 @@ dependencies = [
"gecko_bindings 0.0.1", "gecko_bindings 0.0.1",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -311,7 +311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "selectors" name = "selectors"
version = "0.10.1" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -367,7 +367,7 @@ dependencies = [
"ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -19,7 +19,7 @@ lazy_static = "0.2"
libc = "0.2" libc = "0.2"
log = {version = "0.3.5", features = ["release_max_level_info"]} log = {version = "0.3.5", features = ["release_max_level_info"]}
num_cpus = "0.2.2" num_cpus = "0.2.2"
selectors = "0.10" selectors = "0.11"
style = {path = "../../components/style", features = ["gecko"]} style = {path = "../../components/style", features = ["gecko"]}
style_traits = {path = "../../components/style_traits"} style_traits = {path = "../../components/style_traits"}
url = "1.2" url = "1.2"

View file

@ -14,5 +14,5 @@ cfg-if = "0.1.0"
gecko_bindings = {version = "0.0.1", path = "../gecko_bindings"} gecko_bindings = {version = "0.0.1", path = "../gecko_bindings"}
heapsize = "0.3.5" heapsize = "0.3.5"
libc = "0.2" libc = "0.2"
selectors = "0.10" selectors = "0.11"
serde = "0.8" serde = "0.8"

View file

@ -14,7 +14,7 @@ app_units = "0.3"
cssparser = {version = "0.5.7", features = ["heap_size"]} cssparser = {version = "0.5.7", features = ["heap_size"]}
euclid = "0.9" euclid = "0.9"
rustc-serialize = "0.3" rustc-serialize = "0.3"
selectors = {version = "0.10", features = ["heap_size"]} selectors = {version = "0.11", features = ["heap_size"]}
string_cache = {version = "0.2.23", features = ["heap_size"]} string_cache = {version = "0.2.23", features = ["heap_size"]}
style = {path = "../../../components/style"} style = {path = "../../../components/style"}
style_traits = {path = "../../../components/style_traits"} style_traits = {path = "../../../components/style_traits"}

View file

@ -45,8 +45,8 @@ fn test_parse_stylesheet() {
CSSRule::Style(StyleRule { CSSRule::Style(StyleRule {
selectors: vec![ selectors: vec![
Selector { Selector {
compound_selectors: Arc::new(CompoundSelector { complex_selector: Arc::new(ComplexSelector {
simple_selectors: vec![ compound_selector: vec![
SimpleSelector::Namespace(Namespace { SimpleSelector::Namespace(Namespace {
prefix: None, prefix: None,
url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml")) url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml"))
@ -81,8 +81,8 @@ fn test_parse_stylesheet() {
CSSRule::Style(StyleRule { CSSRule::Style(StyleRule {
selectors: vec![ selectors: vec![
Selector { Selector {
compound_selectors: Arc::new(CompoundSelector { complex_selector: Arc::new(ComplexSelector {
simple_selectors: vec![ compound_selector: vec![
SimpleSelector::Namespace(Namespace { SimpleSelector::Namespace(Namespace {
prefix: None, prefix: None,
url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml")) url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml"))
@ -98,8 +98,8 @@ fn test_parse_stylesheet() {
specificity: (0 << 20) + (0 << 10) + (1 << 0), specificity: (0 << 20) + (0 << 10) + (1 << 0),
}, },
Selector { Selector {
compound_selectors: Arc::new(CompoundSelector { complex_selector: Arc::new(ComplexSelector {
simple_selectors: vec![ compound_selector: vec![
SimpleSelector::Namespace(Namespace { SimpleSelector::Namespace(Namespace {
prefix: None, prefix: None,
url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml")) url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml"))
@ -126,16 +126,16 @@ fn test_parse_stylesheet() {
CSSRule::Style(StyleRule { CSSRule::Style(StyleRule {
selectors: vec![ selectors: vec![
Selector { Selector {
compound_selectors: Arc::new(CompoundSelector { complex_selector: Arc::new(ComplexSelector {
simple_selectors: vec![ compound_selector: vec![
SimpleSelector::Namespace(Namespace { SimpleSelector::Namespace(Namespace {
prefix: None, prefix: None,
url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml")) url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml"))
}), }),
SimpleSelector::Class(Atom::from("ok")), SimpleSelector::Class(Atom::from("ok")),
], ],
next: Some((Arc::new(CompoundSelector { next: Some((Arc::new(ComplexSelector {
simple_selectors: vec![ compound_selector: vec![
SimpleSelector::Namespace(Namespace { SimpleSelector::Namespace(Namespace {
prefix: None, prefix: None,
url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml")) url: NsAtom(Atom::from("http://www.w3.org/1999/xhtml"))