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 17 matching lines...) Expand all Loading... |
28 AnimationGroupStarted: "AnimationGroupStarted", | 28 AnimationGroupStarted: "AnimationGroupStarted", |
29 ModelReset: "ModelReset" | 29 ModelReset: "ModelReset" |
30 } | 30 } |
31 | 31 |
32 WebInspector.AnimationModel.prototype = { | 32 WebInspector.AnimationModel.prototype = { |
33 _reset: function() | 33 _reset: function() |
34 { | 34 { |
35 this._animationsById.clear(); | 35 this._animationsById.clear(); |
36 this._animationGroups.clear(); | 36 this._animationGroups.clear(); |
37 this._pendingAnimations = []; | 37 this._pendingAnimations = []; |
38 if (this._playbackRate !== 1 && this._playbackRate !== 0) | |
39 this.setPlaybackRate(this._playbackRate); | |
40 else | |
41 this._playbackRate = 1; | |
42 this.dispatchEventToListeners(WebInspector.AnimationModel.Events.ModelRe
set); | 38 this.dispatchEventToListeners(WebInspector.AnimationModel.Events.ModelRe
set); |
43 }, | 39 }, |
44 | 40 |
45 /** | 41 /** |
46 * @param {string} id | 42 * @param {string} id |
47 */ | 43 */ |
48 animationCreated: function(id) | 44 animationCreated: function(id) |
49 { | 45 { |
50 this._pendingAnimations.push(id); | 46 this._pendingAnimations.push(id); |
51 }, | 47 }, |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 if (!this._capturing) | 930 if (!this._capturing) |
935 return; | 931 return; |
936 | 932 |
937 delete this._stopTimer; | 933 delete this._stopTimer; |
938 delete this._endTime; | 934 delete this._endTime; |
939 this._requests = []; | 935 this._requests = []; |
940 this._capturing = false; | 936 this._capturing = false; |
941 this._target.pageAgent().stopScreencast(); | 937 this._target.pageAgent().stopScreencast(); |
942 } | 938 } |
943 } | 939 } |
OLD | NEW |