RESOLVED FIXED 20892
Transition starts running when it shouldn't
https://bugs.webkit.org/show_bug.cgi?id=20892
Summary Transition starts running when it shouldn't
Chris Marrin
Reported 2008-09-16 16:20:19 PDT
Run the attached test case and notice that it fails. This test has an animation and transition on the same property (-webkit-transform). The transition is never started, it's property is never changed. But when the animation starts, the AnimationController thinks the transition should start, because the animation starts changing the property. The fix is to have the animation remember the style just before it started and use that to test the transition against. Patch is attached.
Attachments
test case showing bug (2.14 KB, text/html)
2008-09-16 16:21 PDT, Chris Marrin
no flags
Patch, including LayoutTest file (13.19 KB, patch)
2008-09-16 16:26 PDT, Chris Marrin
hyatt: review+
Chris Marrin
Comment 1 2008-09-16 16:21:12 PDT
Created attachment 23491 [details] test case showing bug
Chris Marrin
Comment 2 2008-09-16 16:26:30 PDT
Created attachment 23492 [details] Patch, including LayoutTest file
Dave Hyatt
Comment 3 2008-09-19 17:03:29 PDT
Comment on attachment 23492 [details] Patch, including LayoutTest file r=me
Chris Marrin
Comment 4 2008-09-19 17:04:23 PDT
The fix is basically to save the unanimated style when an animation is started, in that animation. Then, when starting a transition, I check to see if there is a current animation on the same prop. If so, I use the unanimated style as the fromStyle rather than the current style.
Dean Jackson
Comment 5 2008-09-19 17:54:08 PDT
Committed r36687 M WebCore/ChangeLog M WebCore/page/animation/ImplicitAnimation.h M WebCore/page/animation/CompositeAnimation.cpp M WebCore/page/animation/KeyframeAnimation.cpp M WebCore/page/animation/CompositeAnimation.h M WebCore/page/animation/KeyframeAnimation.h M WebCore/page/animation/ImplicitAnimation.cpp M LayoutTests/ChangeLog A LayoutTests/animations/transition-and-animation-1-expected.txt A LayoutTests/animations/transition-and-animation-1.html
Note You need to log in before you can comment on or make changes to this bug.