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 cbcb11098bc50f696d89b3706eb56d4abf928687..9831cb8873d49b500945a2acfd8f941277918f4c 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js |
+++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js |
@@ -771,7 +771,12 @@ WebInspector.AnimationModel.AnimationGroup.prototype = { |
return !error ? currentTime : 0; |
} |
- return this.target().animationAgent().getCurrentTime(this._animations[0].id(), callback).catchException(0); |
+ var longestAnim = null; |
+ for (var anim of this._animations) { |
+ if (!longestAnim || anim.endTime() > longestAnim.endTime()) |
+ longestAnim = anim; |
+ } |
+ return this.target().animationAgent().getCurrentTime(longestAnim.id(), callback).catchException(0); |
}, |
/** |