| 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 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 Animation.AnimationModel = class extends SDK.SDKModel { | 8 Animation.AnimationModel = class extends SDK.SDKModel { |
| 9 /** | 9 /** |
| 10 * @param {!SDK.Target} target | 10 * @param {!SDK.Target} target |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 */ | 341 */ |
| 342 _updateNodeStyle(duration, delay, node) { | 342 _updateNodeStyle(duration, delay, node) { |
| 343 var animationPrefix; | 343 var animationPrefix; |
| 344 if (this.type() === Animation.AnimationModel.Animation.Type.CSSTransition) | 344 if (this.type() === Animation.AnimationModel.Animation.Type.CSSTransition) |
| 345 animationPrefix = 'transition-'; | 345 animationPrefix = 'transition-'; |
| 346 else if (this.type() === Animation.AnimationModel.Animation.Type.CSSAnimatio
n) | 346 else if (this.type() === Animation.AnimationModel.Animation.Type.CSSAnimatio
n) |
| 347 animationPrefix = 'animation-'; | 347 animationPrefix = 'animation-'; |
| 348 else | 348 else |
| 349 return; | 349 return; |
| 350 | 350 |
| 351 var cssModel = node.target().model(SDK.CSSModel); | 351 var cssModel = node.domModel().cssModel(); |
| 352 if (!cssModel) | |
| 353 return; | |
| 354 cssModel.setEffectivePropertyValueForNode(node.id, animationPrefix + 'durati
on', duration + 'ms'); | 352 cssModel.setEffectivePropertyValueForNode(node.id, animationPrefix + 'durati
on', duration + 'ms'); |
| 355 cssModel.setEffectivePropertyValueForNode(node.id, animationPrefix + 'delay'
, delay + 'ms'); | 353 cssModel.setEffectivePropertyValueForNode(node.id, animationPrefix + 'delay'
, delay + 'ms'); |
| 356 } | 354 } |
| 357 | 355 |
| 358 /** | 356 /** |
| 359 * @return {!Promise.<?SDK.RemoteObject>} | 357 * @return {!Promise.<?SDK.RemoteObject>} |
| 360 */ | 358 */ |
| 361 remoteObjectPromise() { | 359 remoteObjectPromise() { |
| 362 /** | 360 /** |
| 363 * @param {?Protocol.Error} error | 361 * @param {?Protocol.Error} error |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 delete this._stopTimer; | 836 delete this._stopTimer; |
| 839 delete this._endTime; | 837 delete this._endTime; |
| 840 this._requests = []; | 838 this._requests = []; |
| 841 this._capturing = false; | 839 this._capturing = false; |
| 842 this._screenCaptureModel.stopScreencast(); | 840 this._screenCaptureModel.stopScreencast(); |
| 843 } | 841 } |
| 844 }; | 842 }; |
| 845 | 843 |
| 846 /** @typedef {{ endTime: number, screenshots: !Array.<string>}} */ | 844 /** @typedef {{ endTime: number, screenshots: !Array.<string>}} */ |
| 847 Animation.AnimationModel.ScreenshotCapture.Request; | 845 Animation.AnimationModel.ScreenshotCapture.Request; |
| OLD | NEW |