Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js

Issue 1843603004: Devtools Animations: Correctly sync scrubber when first animation ended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698