| OLD | NEW | 
|    1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5  |    5  | 
|    6 /** |    6 /** | 
|    7  * @constructor |    7  * @constructor | 
|    8  * @extends {WebInspector.SDKModel} |    8  * @extends {WebInspector.SDKModel} | 
|    9  * @param {!WebInspector.Target} target |    9  * @param {!WebInspector.Target} target | 
|   10  */ |   10  */ | 
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  176 /** |  176 /** | 
|  177  * @constructor |  177  * @constructor | 
|  178  * @extends {WebInspector.SDKObject} |  178  * @extends {WebInspector.SDKObject} | 
|  179  * @param {!WebInspector.Target} target |  179  * @param {!WebInspector.Target} target | 
|  180  * @param {!AnimationAgent.AnimationNode} payload |  180  * @param {!AnimationAgent.AnimationNode} payload | 
|  181  */ |  181  */ | 
|  182 WebInspector.AnimationModel.AnimationNode = function(target, payload) |  182 WebInspector.AnimationModel.AnimationNode = function(target, payload) | 
|  183 { |  183 { | 
|  184     WebInspector.SDKObject.call(this, target); |  184     WebInspector.SDKObject.call(this, target); | 
|  185     this._payload = payload; |  185     this._payload = payload; | 
 |  186     if (payload.keyframesRule) | 
 |  187         this._keyframesRule = new WebInspector.AnimationModel.KeyframesRule(targ
     et, payload.keyframesRule); | 
|  186 } |  188 } | 
|  187  |  189  | 
|  188 WebInspector.AnimationModel.AnimationNode.prototype = { |  190 WebInspector.AnimationModel.AnimationNode.prototype = { | 
|  189     /** |  191     /** | 
|  190      * @return {number} |  192      * @return {number} | 
|  191      */ |  193      */ | 
|  192     startDelay: function() |  194     startDelay: function() | 
|  193     { |  195     { | 
|  194         return this._payload.startDelay; |  196         return this._payload.startDelay; | 
|  195     }, |  197     }, | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  251     }, |  253     }, | 
|  252  |  254  | 
|  253     /** |  255     /** | 
|  254      * @return {string} |  256      * @return {string} | 
|  255      */ |  257      */ | 
|  256     name: function() |  258     name: function() | 
|  257     { |  259     { | 
|  258         return this._payload.name; |  260         return this._payload.name; | 
|  259     }, |  261     }, | 
|  260  |  262  | 
 |  263     /** | 
 |  264      * @return {?WebInspector.AnimationModel.KeyframesRule} | 
 |  265      */ | 
 |  266     keyframesRule: function() | 
 |  267     { | 
 |  268         return this._keyframesRule; | 
 |  269     }, | 
 |  270  | 
 |  271     __proto__: WebInspector.SDKObject.prototype | 
 |  272 } | 
 |  273  | 
 |  274 /** | 
 |  275  * @constructor | 
 |  276  * @extends {WebInspector.SDKObject} | 
 |  277  * @param {!WebInspector.Target} target | 
 |  278  * @param {!AnimationAgent.KeyframesRule} payload | 
 |  279  */ | 
 |  280 WebInspector.AnimationModel.KeyframesRule = function(target, payload) | 
 |  281 { | 
 |  282     WebInspector.SDKObject.call(this, target); | 
 |  283     this._payload = payload; | 
 |  284     this._keyframes = this._payload.keyframes.map(function (keyframeStyle) { | 
 |  285         return new WebInspector.AnimationModel.KeyframeStyle(target, keyframeSty
     le); | 
 |  286     }); | 
 |  287 } | 
 |  288  | 
 |  289 WebInspector.AnimationModel.KeyframesRule.prototype = { | 
 |  290     /** | 
 |  291      * @param {!Array.<!AnimationAgent.KeyframeStyle>} payload | 
 |  292      */ | 
 |  293     _setKeyframesPayload: function(payload) | 
 |  294     { | 
 |  295         this._keyframes = payload.map(function (keyframeStyle) { | 
 |  296             return new WebInspector.AnimationModel.KeyframeStyle(this._target, k
     eyframeStyle); | 
 |  297         }); | 
 |  298     }, | 
 |  299  | 
 |  300     /** | 
 |  301      * @return {string|undefined} | 
 |  302      */ | 
 |  303     name: function() | 
 |  304     { | 
 |  305         return this._payload.name; | 
 |  306     }, | 
 |  307  | 
 |  308     /** | 
 |  309      * @return {!Array.<!WebInspector.AnimationModel.KeyframeStyle>} | 
 |  310      */ | 
 |  311     keyframes: function() | 
 |  312     { | 
 |  313         return this._keyframes; | 
 |  314     }, | 
 |  315  | 
 |  316     __proto__: WebInspector.SDKObject.prototype | 
 |  317 } | 
 |  318  | 
 |  319 /** | 
 |  320  * @constructor | 
 |  321  * @extends {WebInspector.SDKObject} | 
 |  322  * @param {!WebInspector.Target} target | 
 |  323  * @param {!AnimationAgent.KeyframeStyle} payload | 
 |  324  */ | 
 |  325 WebInspector.AnimationModel.KeyframeStyle = function(target, payload) | 
 |  326 { | 
 |  327     WebInspector.SDKObject.call(this, target); | 
 |  328     this._payload = payload; | 
 |  329     this._style = WebInspector.CSSStyleDeclaration.parsePayload(this.target().cs
     sModel, payload.style); | 
 |  330 } | 
 |  331  | 
 |  332 WebInspector.AnimationModel.KeyframeStyle.prototype = { | 
 |  333     /** | 
 |  334      * @return {string} | 
 |  335      */ | 
 |  336     offset: function() | 
 |  337     { | 
 |  338         return this._payload.offset; | 
 |  339     }, | 
 |  340  | 
 |  341     /** | 
 |  342      * @return {!WebInspector.CSSStyleDeclaration} | 
 |  343      */ | 
 |  344     style: function() | 
 |  345     { | 
 |  346         return this._style; | 
 |  347     }, | 
 |  348  | 
|  261     __proto__: WebInspector.SDKObject.prototype |  349     __proto__: WebInspector.SDKObject.prototype | 
|  262 } |  350 } | 
| OLD | NEW |