Use selectors::SelectorList

This commit is contained in:
Simon Sapin 2016-11-21 19:48:11 +01:00
parent 81a3de3299
commit f044659b7c
5 changed files with 19 additions and 35 deletions

View file

@ -63,7 +63,7 @@ fn test_parse_stylesheet() {
url: NsAtom::from("http://www.w3.org/1999/xhtml")
}))),
CssRule::Style(Arc::new(RwLock::new(StyleRule {
selectors: vec![
selectors: SelectorList(vec![
Selector {
complex_selector: Arc::new(ComplexSelector {
compound_selector: vec![
@ -89,7 +89,7 @@ fn test_parse_stylesheet() {
pseudo_element: None,
specificity: (0 << 20) + (1 << 10) + (1 << 0),
},
],
]),
block: Arc::new(RwLock::new(PropertyDeclarationBlock {
declarations: vec![
(PropertyDeclaration::Display(DeclaredValue::Value(
@ -102,7 +102,7 @@ fn test_parse_stylesheet() {
})),
}))),
CssRule::Style(Arc::new(RwLock::new(StyleRule {
selectors: vec![
selectors: SelectorList(vec![
Selector {
complex_selector: Arc::new(ComplexSelector {
compound_selector: vec![
@ -137,7 +137,7 @@ fn test_parse_stylesheet() {
pseudo_element: None,
specificity: (0 << 20) + (0 << 10) + (1 << 0),
},
],
]),
block: Arc::new(RwLock::new(PropertyDeclarationBlock {
declarations: vec![
(PropertyDeclaration::Display(DeclaredValue::Value(
@ -148,7 +148,7 @@ fn test_parse_stylesheet() {
})),
}))),
CssRule::Style(Arc::new(RwLock::new(StyleRule {
selectors: vec![
selectors: SelectorList(vec![
Selector {
complex_selector: Arc::new(ComplexSelector {
compound_selector: vec![
@ -172,7 +172,7 @@ fn test_parse_stylesheet() {
pseudo_element: None,
specificity: (1 << 20) + (1 << 10) + (0 << 0),
},
],
]),
block: Arc::new(RwLock::new(PropertyDeclarationBlock {
declarations: vec![
(PropertyDeclaration::BackgroundColor(DeclaredValue::Value(