mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Move Arc<RwLock<_>> out from CssRules tuple
This commit is contained in:
parent
40917e7991
commit
599eb1c9f0
9 changed files with 58 additions and 62 deletions
|
@ -31,7 +31,7 @@ fn test_media_rule<F>(css: &str, callback: F) where F: Fn(&MediaList, &str) {
|
|||
css, url, Origin::Author, Default::default(),
|
||||
Box::new(CSSErrorReporterTest), ParserContextExtraData::default());
|
||||
let mut rule_count = 0;
|
||||
media_queries(&stylesheet.rules.0.read(), &mut |mq| {
|
||||
media_queries(&stylesheet.rules.read().0, &mut |mq| {
|
||||
rule_count += 1;
|
||||
callback(mq, css);
|
||||
});
|
||||
|
|
|
@ -20,7 +20,7 @@ use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, DeclaredV
|
|||
use style::properties::Importance;
|
||||
use style::properties::longhands::animation_play_state;
|
||||
use style::stylesheets::{Origin, Namespaces};
|
||||
use style::stylesheets::{Stylesheet, NamespaceRule, CssRule, StyleRule, KeyframesRule};
|
||||
use style::stylesheets::{Stylesheet, NamespaceRule, CssRule, CssRules, StyleRule, KeyframesRule};
|
||||
use style::values::specified::{LengthOrPercentageOrAuto, Percentage};
|
||||
|
||||
#[test]
|
||||
|
@ -63,7 +63,7 @@ fn test_parse_stylesheet() {
|
|||
base_url: url,
|
||||
dirty_on_viewport_size_change: AtomicBool::new(false),
|
||||
disabled: AtomicBool::new(false),
|
||||
rules: vec![
|
||||
rules: CssRules::new(vec![
|
||||
CssRule::Namespace(Arc::new(RwLock::new(NamespaceRule {
|
||||
prefix: None,
|
||||
url: NsAtom::from("http://www.w3.org/1999/xhtml")
|
||||
|
@ -263,7 +263,7 @@ fn test_parse_stylesheet() {
|
|||
]
|
||||
})))
|
||||
|
||||
].into(),
|
||||
]),
|
||||
};
|
||||
|
||||
assert_eq!(format!("{:#?}", stylesheet), format!("{:#?}", expected));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue