Bug 1033881 part 1 - Don't generate animations when the animation-name doesn't match...
commitd8a37d7c4dd452b4a9d3bc3fa7e998e34a722ef1
authorBrian Birtles <birtles@gmail.com>
Wed, 9 Jul 2014 00:13:33 +0000 (9 09:13 +0900)
committerBrian Birtles <birtles@gmail.com>
Wed, 9 Jul 2014 00:13:33 +0000 (9 09:13 +0900)
tree8cc0087ac9778ce18e4d0c64195111203fc3d1dc
parentf02eb2e402f3d08c1d4594a7e4c1da53e0450235
Bug 1033881 part 1 - Don't generate animations when the animation-name doesn't match; r=dbaron

When animation-name does not match a keyframes rule, we should not dispatch
animation events as per:

  "Any animation for which both a valid keyframe rule and a non-zero duration
  are defined will run and generate events; this includes animations with empty
  keyframe rules."
  http://dev.w3.org/csswg/css-animations/#events

Since bug 1004377, however, we started dispatching events in this case because
we no longer ignore animations whose set of keyframes is empty.

This patch checks for a matching keyframes rule in BuildAnimations and if one is
not found, no corresponding animation is generated.
layout/style/nsAnimationManager.cpp
layout/style/test/test_animations.html