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

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

Issue 1218433007: Devtools Animations: Add buffer and effect selection to animation timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test Created 5 years, 3 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
Index: Source/devtools/front_end/animation/AnimationModel.js
diff --git a/Source/devtools/front_end/animation/AnimationModel.js b/Source/devtools/front_end/animation/AnimationModel.js
index 09e30fd25b2c5d91cbdc8010c7291169f674bedb..b692148699caf0b34fa738014f2e3bcd7a7c8669 100644
--- a/Source/devtools/front_end/animation/AnimationModel.js
+++ b/Source/devtools/front_end/animation/AnimationModel.js
@@ -22,7 +22,7 @@ WebInspector.AnimationModel = function(target)
}
WebInspector.AnimationModel.Events = {
- AnimationCreated: "AnimationCreated",
+ AnimationGroupStarted: "AnimationGroupStarted",
AnimationCanceled: "AnimationCanceled"
}
@@ -51,9 +51,7 @@ WebInspector.AnimationModel.prototype = {
while (this._pendingAnimations.length) {
var group = this._createGroupFromPendingAnimations();
this._animationGroups.set(group.id(), group);
- // TODO(samli): Dispatch single group event.
- for (var anim of group.animations())
- this.dispatchEventToListeners(WebInspector.AnimationModel.Events.AnimationCreated, { "player": anim, "resetTimeline": anim.id() === group.id() });
+ this.dispatchEventToListeners(WebInspector.AnimationModel.Events.AnimationGroupStarted, group);
}
},
@@ -519,6 +517,14 @@ WebInspector.AnimationModel.AnimationGroup.prototype = {
return this._animations;
},
+ /**
+ * @return {number}
+ */
+ startTime: function()
+ {
+ return this._animations[0].startTime();
+ },
+
__proto__: WebInspector.SDKObject.prototype
}

Powered by Google App Engine
This is Rietveld 408576698