Wrap most CSS rules in Locked<_> instead of RwLock<_>

This commit is contained in:
Simon Sapin 2017-03-17 16:46:22 +01:00
parent f35b4e27b3
commit adb97d4cbe
17 changed files with 194 additions and 139 deletions

View file

@ -77,7 +77,7 @@ fn test_parse_stylesheet() {
dirty_on_viewport_size_change: AtomicBool::new(false),
disabled: AtomicBool::new(false),
rules: CssRules::new(vec![
CssRule::Namespace(Arc::new(RwLock::new(NamespaceRule {
CssRule::Namespace(Arc::new(stylesheet.shared_lock.wrap(NamespaceRule {
prefix: None,
url: NsAtom::from("http://www.w3.org/1999/xhtml")
}))),
@ -235,7 +235,7 @@ fn test_parse_stylesheet() {
Importance::Normal),
]))),
}))),
CssRule::Keyframes(Arc::new(RwLock::new(KeyframesRule {
CssRule::Keyframes(Arc::new(stylesheet.shared_lock.wrap(KeyframesRule {
name: "foo".into(),
keyframes: vec![
Arc::new(RwLock::new(Keyframe {