diff options
author | Emilio Cobos Álvarez <me@emiliocobos.me> | 2016-06-28 15:07:14 +0000 |
---|---|---|
committer | Emilio Cobos Álvarez <me@emiliocobos.me> | 2016-06-28 15:28:01 +0000 |
commit | 392f243ca7dd08a34da4ca15dfc5596f69adf4d8 (patch) | |
tree | fbefd4e32ec3adff49b2ffec316f8efff6c647d4 | |
parent | faed3df59404711fb7273fc3547f5f3ace5f96c4 (diff) | |
download | servo-392f243ca7dd08a34da4ca15dfc5596f69adf4d8.tar.gz servo-392f243ca7dd08a34da4ca15dfc5596f69adf4d8.zip |
style: Shadow declarations of no-op animations
Although we don't generate a "computed" keyframe animation, we're required to
shadow others.
-rw-r--r-- | components/style/selector_matching.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs index fc9c2eb6600..35a38d5ed14 100644 --- a/components/style/selector_matching.rs +++ b/components/style/selector_matching.rs @@ -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. |