Changeset 209675 in webkit
- Timestamp:
- Dec 10, 2016 2:29:24 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r209669 r209675 1 2016-12-10 Simon Fraser <simon.fraser@apple.com> 2 3 Animation followed by transition doesn't always fire transitionend event 4 https://bugs.webkit.org/show_bug.cgi?id=165731 5 rdar://problem/28471240 6 7 Reviewed by Zalan Bujtas. 8 9 * animations/animation-followed-by-transition-expected.txt: Added. 10 * animations/animation-followed-by-transition.html: Added. 11 1 12 2016-12-09 Sam Weinig <sam@webkit.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r209674 r209675 1 2016-12-10 Simon Fraser <simon.fraser@apple.com> 2 3 Animation followed by transition doesn't always fire transitionend event 4 https://bugs.webkit.org/show_bug.cgi?id=165731 5 rdar://problem/28471240 6 7 Reviewed by Zalan Bujtas. 8 9 After r200047, a keyframe animation of an accelerated property followed by a 10 transition didn't always fire a transitionend event. 11 12 This happened if CompositeAnimation::timeToNextService() happend to be called 13 when the transitions's timeToNextService() returned a positive value, but the 14 keyframe animation still existed, but its timeToNextService() returned -1. In 15 this case that -1 would clobber the positing minT. 16 17 Fix by just continuing in each loop when the timeToNextService() returns -1. 18 19 This code should probably be rewritten to use std::optional<double> rather than 20 magic values. 21 22 Test: animations/animation-followed-by-transition.html 23 24 * page/animation/CompositeAnimation.cpp: 25 (WebCore::CompositeAnimation::timeToNextService): 26 * platform/graphics/ca/GraphicsLayerCA.cpp: 27 (WebCore::GraphicsLayerCA::addAnimation): 28 (WebCore::GraphicsLayerCA::pauseAnimation): 29 (WebCore::GraphicsLayerCA::removeAnimation): 30 (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted): 31 (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded): 32 1 33 2016-12-10 Sam Weinig <sam@webkit.org> 2 34 -
trunk/Source/WebCore/page/animation/CompositeAnimation.cpp
r208314 r209675 376 376 for (auto& transition : m_transitions.values()) { 377 377 double t = transition->timeToNextService(); 378 if (t == -1) 379 continue; 378 380 if (t < minT || minT == -1) 379 381 minT = t; … … 386 388 for (auto& animation : m_keyframeAnimations.values()) { 387 389 double t = animation->timeToNextService(); 390 if (t == -1) 391 continue; 388 392 if (t < minT || minT == -1) 389 393 minT = t; -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r209292 r209675 937 937 bool GraphicsLayerCA::addAnimation(const KeyframeValueList& valueList, const FloatSize& boxSize, const Animation* anim, const String& animationName, double timeOffset) 938 938 { 939 LOG(Animations, "GraphicsLayerCA %p addAnimation %s (can be accelerated %d)", this, animationName.utf8().data(), animationCanBeAccelerated(valueList, anim)); 940 939 941 ASSERT(!animationName.isEmpty()); 940 942 … … 966 968 void GraphicsLayerCA::pauseAnimation(const String& animationName, double timeOffset) 967 969 { 970 LOG(Animations, "GraphicsLayerCA %p pauseAnimation %s (running %d)", this, animationName.utf8().data(), animationIsRunning(animationName)); 971 968 972 if (!animationIsRunning(animationName)) 969 973 return; … … 983 987 void GraphicsLayerCA::removeAnimation(const String& animationName) 984 988 { 989 LOG(Animations, "GraphicsLayerCA %p removeAnimation %s (running %d)", this, animationName.utf8().data(), animationIsRunning(animationName)); 990 985 991 if (!animationIsRunning(animationName)) 986 992 return; … … 992 998 void GraphicsLayerCA::platformCALayerAnimationStarted(const String& animationKey, CFTimeInterval startTime) 993 999 { 1000 LOG(Animations, "GraphicsLayerCA %p platformCALayerAnimationStarted %s at %f", this, animationKey.utf8().data(), startTime); 994 1001 client().notifyAnimationStarted(this, animationKey, startTime); 995 1002 } … … 997 1004 void GraphicsLayerCA::platformCALayerAnimationEnded(const String& animationKey) 998 1005 { 1006 LOG(Animations, "GraphicsLayerCA %p platformCALayerAnimationEnded %s", this, animationKey.utf8().data()); 999 1007 client().notifyAnimationEnded(this, animationKey); 1000 1008 }
Note: See TracChangeset
for help on using the changeset viewer.