Bug 1070745 part 7 - Add style flush at the beginning of Play(); r=dholbert
commit3b9fd1bf92aaabeffd418f378ea2c8c5add7e772
authorBrian Birtles <birtles@gmail.com>
Mon, 20 Oct 2014 04:55:44 +0000 (20 13:55 +0900)
committerBrian Birtles <birtles@gmail.com>
Mon, 20 Oct 2014 04:55:44 +0000 (20 13:55 +0900)
tree61043137b9f2413414077e38e5f8ee15d13f7acd
parentb4a6bc854ca011e8fd9bc3868c41094dca026e9a
Bug 1070745 part 7 - Add style flush at the beginning of Play(); r=dholbert

For players running CSS animations and CSS transitions we should perform a style
flush before running play() so that we are operating on the most up-to-date
state of animation-play-state.

For transitions, which don't have a play-state property, we will still need to
run this style flush before running play() to get the right finishing behavior
if transition-duration has changed. We haven't implemented finishing yet (that's
bug 1074630) but I've kept the flush for both cases now since I'm afraid we'll
forget it later.

Also, since we don't have a subclass of AnimationPlayer for transitions yet I've
put the style flush in the base class. In future, when we add
CSSTransitionPlayer we can move the flush to only those players that need up to
date style information.
dom/animation/AnimationPlayer.cpp