| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 * @implements {SDK.TargetManager.Observer} | 5 * @implements {SDK.TargetManager.Observer} |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 Animation.AnimationTimeline = class extends UI.VBox { | 8 Animation.AnimationTimeline = class extends UI.VBox { |
| 9 constructor() { | 9 constructor() { |
| 10 super(true); | 10 super(true); |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 delete this._selectedGroup; | 315 delete this._selectedGroup; |
| 316 if (this._scrubberPlayer) | 316 if (this._scrubberPlayer) |
| 317 this._scrubberPlayer.cancel(); | 317 this._scrubberPlayer.cancel(); |
| 318 delete this._scrubberPlayer; | 318 delete this._scrubberPlayer; |
| 319 this._currentTime.textContent = ''; | 319 this._currentTime.textContent = ''; |
| 320 this._updateControlButton(); | 320 this._updateControlButton(); |
| 321 } | 321 } |
| 322 | 322 |
| 323 _reset() { | 323 _reset() { |
| 324 this._clearTimeline(); | 324 this._clearTimeline(); |
| 325 if (this._allPaused) { | 325 if (this._allPaused) |
| 326 this._playbackRate = 1; | |
| 327 this._togglePauseAll(); | 326 this._togglePauseAll(); |
| 328 } else { | 327 else |
| 329 this._setPlaybackRate(1); | 328 this._setPlaybackRate(this._playbackRate); |
| 330 } | 329 |
| 331 for (var group of this._groupBuffer) | 330 for (var group of this._groupBuffer) |
| 332 group.release(); | 331 group.release(); |
| 333 this._groupBuffer = []; | 332 this._groupBuffer = []; |
| 334 this._previewMap.clear(); | 333 this._previewMap.clear(); |
| 335 this._previewContainer.removeChildren(); | 334 this._previewContainer.removeChildren(); |
| 336 this._popoverHelper.hidePopover(); | 335 this._popoverHelper.hidePopover(); |
| 337 this._renderGrid(); | 336 this._renderGrid(); |
| 338 } | 337 } |
| 339 | 338 |
| 340 /** | 339 /** |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 static parse(text) { | 733 static parse(text) { |
| 735 var match = text.match(/^steps\((\d+), (start|middle)\)$/); | 734 var match = text.match(/^steps\((\d+), (start|middle)\)$/); |
| 736 if (match) | 735 if (match) |
| 737 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1
], 10), match[2]); | 736 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1
], 10), match[2]); |
| 738 match = text.match(/^steps\((\d+)\)$/); | 737 match = text.match(/^steps\((\d+)\)$/); |
| 739 if (match) | 738 if (match) |
| 740 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1
], 10), 'end'); | 739 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1
], 10), 'end'); |
| 741 return null; | 740 return null; |
| 742 } | 741 } |
| 743 }; | 742 }; |
| OLD | NEW |