Index: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js |
index a68f457f9f60b668effc8a7fa04a69d6766aae51..252ea1fe99dd885921ab1dc9267cb6e870eed5e0 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js |
+++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js |
@@ -23,8 +23,7 @@ WebInspector.AnimationModel = function(target) |
} |
WebInspector.AnimationModel.Events = { |
- AnimationGroupStarted: "AnimationGroupStarted", |
- AnimationCanceled: "AnimationCanceled" |
+ AnimationGroupStarted: "AnimationGroupStarted" |
} |
WebInspector.AnimationModel.prototype = { |
@@ -43,6 +42,12 @@ WebInspector.AnimationModel.prototype = { |
this._pendingAnimations.push(id); |
}, |
+ _animationCanceled: function(id) |
+ { |
+ this._pendingAnimations.remove(id); |
+ this._flushPendingAnimationsIfNeeded(); |
+ }, |
+ |
/** |
* @param {!AnimationAgent.Animation} payload |
*/ |
@@ -54,7 +59,11 @@ WebInspector.AnimationModel.prototype = { |
this._pendingAnimations.remove(animation.id()); |
else |
this._animationsById.set(animation.id(), animation); |
+ this._flushPendingAnimationsIfNeeded(); |
+ }, |
+ _flushPendingAnimationsIfNeeded: function() |
+ { |
for (var id of this._pendingAnimations) { |
if (!this._animationsById.get(id)) |
return; |
@@ -756,6 +765,15 @@ WebInspector.AnimationDispatcher.prototype = { |
/** |
* @override |
+ * @param {string} id |
+ */ |
+ animationCanceled: function(id) |
+ { |
+ this._animationModel._animationCanceled(id); |
+ }, |
+ |
+ /** |
+ * @override |
* @param {!AnimationAgent.Animation} payload |
*/ |
animationStarted: function(payload) |