| 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 /** | 399 /** |
| 400 * @constructor | 400 * @constructor |
| 401 * @extends {WebInspector.SDKObject} | 401 * @extends {WebInspector.SDKObject} |
| 402 * @param {!WebInspector.Target} target | 402 * @param {!WebInspector.Target} target |
| 403 * @param {!AnimationAgent.KeyframeStyle} payload | 403 * @param {!AnimationAgent.KeyframeStyle} payload |
| 404 */ | 404 */ |
| 405 WebInspector.AnimationModel.KeyframeStyle = function(target, payload) | 405 WebInspector.AnimationModel.KeyframeStyle = function(target, payload) |
| 406 { | 406 { |
| 407 WebInspector.SDKObject.call(this, target); | 407 WebInspector.SDKObject.call(this, target); |
| 408 this._payload = payload; | 408 this._payload = payload; |
| 409 this._style = WebInspector.CSSStyleDeclaration.parsePayload(this.target().cs
sModel, payload.style); | |
| 410 this._offset = this._payload.offset; | 409 this._offset = this._payload.offset; |
| 411 } | 410 } |
| 412 | 411 |
| 413 WebInspector.AnimationModel.KeyframeStyle.prototype = { | 412 WebInspector.AnimationModel.KeyframeStyle.prototype = { |
| 414 /** | 413 /** |
| 415 * @return {string} | 414 * @return {string} |
| 416 */ | 415 */ |
| 417 offset: function() | 416 offset: function() |
| 418 { | 417 { |
| 419 return this._offset; | 418 return this._offset; |
| 420 }, | 419 }, |
| 421 | 420 |
| 422 /** | 421 /** |
| 423 * @param {number} offset | 422 * @param {number} offset |
| 424 */ | 423 */ |
| 425 setOffset: function(offset) | 424 setOffset: function(offset) |
| 426 { | 425 { |
| 427 this._offset = offset * 100 + "%"; | 426 this._offset = offset * 100 + "%"; |
| 428 }, | 427 }, |
| 429 | 428 |
| 430 /** | 429 /** |
| 431 * @return {number} | 430 * @return {number} |
| 432 */ | 431 */ |
| 433 offsetAsNumber: function() | 432 offsetAsNumber: function() |
| 434 { | 433 { |
| 435 return parseFloat(this._offset) / 100; | 434 return parseFloat(this._offset) / 100; |
| 436 }, | 435 }, |
| 437 | 436 |
| 438 /** | 437 /** |
| 439 * @return {!WebInspector.CSSStyleDeclaration} | |
| 440 */ | |
| 441 style: function() | |
| 442 { | |
| 443 return this._style; | |
| 444 }, | |
| 445 | |
| 446 /** | |
| 447 * @return {string} | 438 * @return {string} |
| 448 */ | 439 */ |
| 449 easing: function() | 440 easing: function() |
| 450 { | 441 { |
| 451 return this._payload.easing; | 442 return this._payload.easing; |
| 452 }, | 443 }, |
| 453 | 444 |
| 454 __proto__: WebInspector.SDKObject.prototype | 445 __proto__: WebInspector.SDKObject.prototype |
| 455 } | 446 } |
| 456 | 447 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 476 | 467 |
| 477 /** | 468 /** |
| 478 * @override | 469 * @override |
| 479 * @param {string} playerId | 470 * @param {string} playerId |
| 480 */ | 471 */ |
| 481 animationPlayerCanceled: function(playerId) | 472 animationPlayerCanceled: function(playerId) |
| 482 { | 473 { |
| 483 this._animationModel.animationPlayerCanceled(playerId); | 474 this._animationModel.animationPlayerCanceled(playerId); |
| 484 } | 475 } |
| 485 } | 476 } |
| OLD | NEW |