| 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 548f35c6aaffefd9773ed60c70f584dd916786cf..882e2b1ab73c5186d121b2fa85f1412429942803 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
|
| @@ -602,6 +602,7 @@ WebInspector.AnimationModel.AnimationGroup = function(target, id, animations)
|
| WebInspector.SDKObject.call(this, target);
|
| this._id = id;
|
| this._animations = animations;
|
| + this._paused = false;
|
| }
|
|
|
| WebInspector.AnimationModel.AnimationGroup.prototype = {
|
| @@ -622,6 +623,23 @@ WebInspector.AnimationModel.AnimationGroup.prototype = {
|
| },
|
|
|
| /**
|
| + * @return {!Array.<string>}
|
| + */
|
| + _animationIds: function()
|
| + {
|
| + /**
|
| + * @param {!WebInspector.AnimationModel.Animation} animation
|
| + * @return {string}
|
| + */
|
| + function extractId(animation)
|
| + {
|
| + return animation.id();
|
| + }
|
| +
|
| + return this._animations.map(extractId);
|
| + },
|
| +
|
| + /**
|
| * @return {number}
|
| */
|
| startTime: function()
|
| @@ -634,16 +652,24 @@ WebInspector.AnimationModel.AnimationGroup.prototype = {
|
| */
|
| seekTo: function(currentTime)
|
| {
|
| - /**
|
| - * @param {!WebInspector.AnimationModel.Animation} animation
|
| - * @return {string}
|
| - */
|
| - function extractId(animation)
|
| - {
|
| - return animation.id();
|
| - }
|
| + this.target().animationAgent().seekAnimations(this._animationIds(), currentTime);
|
| + },
|
| +
|
| + /**
|
| + * @return {boolean}
|
| + */
|
| + paused: function()
|
| + {
|
| + return this._paused;
|
| + },
|
|
|
| - this.target().animationAgent().seekAnimations(this._animations.map(extractId), currentTime);
|
| + /**
|
| + * @param {boolean} paused
|
| + */
|
| + togglePause: function(paused)
|
| + {
|
| + this._paused = paused;
|
| + this.target().animationAgent().setPaused(this._animationIds(), paused);
|
| },
|
|
|
| /**
|
|
|