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

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

Issue 682423002: Devtools Animations: Show subtree animations for a given node (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Collapse animation sections if there are a lot Created 6 years, 2 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/sdk/AnimationModel.js
diff --git a/Source/devtools/front_end/sdk/AnimationModel.js b/Source/devtools/front_end/sdk/AnimationModel.js
index 92b1f2fabff54898b7fe68bb03f9e3a655a15af2..9a8ba8fdaa96181a5a49c6b63f22987a7ca3b7ca 100644
--- a/Source/devtools/front_end/sdk/AnimationModel.js
+++ b/Source/devtools/front_end/sdk/AnimationModel.js
@@ -17,9 +17,10 @@ WebInspector.AnimationModel = function(target) {
WebInspector.AnimationModel.prototype = {
/**
* @param {!DOMAgent.NodeId} nodeId
+ * @param {boolean} showSubtreeAnimations
* @param {function(?Array.<!WebInspector.AnimationModel.AnimationPlayer>)} callback
*/
- animationPlayers: function(nodeId, callback)
+ animationPlayers: function(nodeId, showSubtreeAnimations, callback)
{
/**
* @param {?Protocol.Error} error
@@ -37,7 +38,7 @@ WebInspector.AnimationModel.prototype = {
}
var target = this.target();
- this._agent.getAnimationPlayersForNode(nodeId, mycallback);
+ this._agent.getAnimationPlayersForNode(nodeId, showSubtreeAnimations, mycallback);
},
__proto__: WebInspector.SDKModel.prototype
@@ -162,7 +163,6 @@ WebInspector.AnimationModel.AnimationPlayer.prototype = {
function mycallback(error, currentTime, isRunning)
{
if (error) {
- console.error(error);
return;
}
callback(currentTime, isRunning);
@@ -261,6 +261,14 @@ WebInspector.AnimationModel.AnimationNode.prototype = {
},
/**
+ * @return {?WebInspector.DOMNode}
+ */
+ node: function()
+ {
+ return this.target().domModel.nodeForId(this._payload.node);
+ },
+
+ /**
* @return {?WebInspector.AnimationModel.KeyframesRule}
*/
keyframesRule: function()

Powered by Google App Engine
This is Rietveld 408576698