aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/stylesheets.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-03-17 19:48:37 +0100
committerSimon Sapin <simon.sapin@exyr.org>2017-03-19 22:30:37 +0100
commit57724e5a3755a757e502658094dfda171c78ba78 (patch)
treeafb3e861c6ac5da6e308fa7d9a33056dab33274d /components/style/stylesheets.rs
parentadb97d4cbefde92b3645619d826ce175a787a069 (diff)
downloadservo-57724e5a3755a757e502658094dfda171c78ba78.tar.gz
servo-57724e5a3755a757e502658094dfda171c78ba78.zip
Replace RwLock<Keyframe> with Locked<Keyframe>
Diffstat (limited to 'components/style/stylesheets.rs')
-rw-r--r--components/style/stylesheets.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs
index a0f0baa3840..d132c64bbb9 100644
--- a/components/style/stylesheets.rs
+++ b/components/style/stylesheets.rs
@@ -451,12 +451,12 @@ pub struct KeyframesRule {
/// The name of the current animation.
pub name: Atom,
/// The keyframes specified for this CSS rule.
- pub keyframes: Vec<Arc<RwLock<Keyframe>>>,
+ pub keyframes: Vec<Arc<Locked<Keyframe>>>,
}
impl ToCssWithGuard for KeyframesRule {
// Serialization of KeyframesRule is not specced.
- fn to_css<W>(&self, _guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result
+ fn to_css<W>(&self, guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result
where W: fmt::Write {
try!(dest.write_str("@keyframes "));
try!(dest.write_str(&*self.name.to_string()));
@@ -468,7 +468,7 @@ impl ToCssWithGuard for KeyframesRule {
try!(dest.write_str(" "));
}
first = false;
- let keyframe = lock.read();
+ let keyframe = lock.read_with(&guard);
try!(keyframe.to_css(dest));
}
dest.write_str(" }")
@@ -1009,7 +1009,7 @@ impl<'a, 'b> AtRuleParser for NestedRuleParser<'a, 'b> {
AtRulePrelude::Keyframes(name) => {
Ok(CssRule::Keyframes(Arc::new(self.shared_lock.wrap(KeyframesRule {
name: name,
- keyframes: parse_keyframe_list(&self.context, input),
+ keyframes: parse_keyframe_list(&self.context, input, self.shared_lock),
}))))
}
}