style: Shadow declarations of no-op animations

Although we don't generate a "computed" keyframe animation, we're required to
shadow others.
This commit is contained in:
Emilio Cobos Álvarez 2016-06-28 15:07:14 +00:00
parent faed3df594
commit 392f243ca7
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -258,6 +258,11 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
debug!("Found valid keyframe animation: {:?}", animation);
self.animations.insert(keyframes_rule.name.clone(),
animation);
} else {
// If there's a valid keyframes rule, even if it doesn't
// produce an animation, should shadow other animations
// with the same name.
self.animations.remove(&keyframes_rule.name);
}
}
// We don't care about any other rule.