Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js b/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js |
| index fc102c39548cbd63cd49d1d1af568e8639e24930..eea6c2cdf39e9f38e46721d26ff457fca3900f28 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js |
| @@ -13,7 +13,8 @@ Animation.AnimationTimeline = class extends UI.VBox { |
| this._grid = this.contentElement.createSVGChild('svg', 'animation-timeline-grid'); |
| - this._playbackRate = 1; |
| + this._playbackRateSetting = Common.settings.createSetting('animationPlaybackRate', 1); |
| + this._playbackRate = this._playbackRateSetting.get(); |
| this._allPaused = false; |
| this._createHeader(); |
| this._animationsContainer = this.contentElement.createChild('div', 'animation-timeline-rows'); |
| @@ -217,6 +218,7 @@ Animation.AnimationTimeline = class extends UI.VBox { |
| * @param {number} playbackRate |
| */ |
| _setPlaybackRate(playbackRate) { |
| + this._playbackRateSetting.set(playbackRate); |
| this._playbackRate = playbackRate; |
| var target = SDK.targetManager.mainTarget(); |
| if (target) |
| @@ -322,12 +324,11 @@ Animation.AnimationTimeline = class extends UI.VBox { |
| _reset() { |
| this._clearTimeline(); |
| - if (this._allPaused) { |
| - this._playbackRate = 1; |
| + if (this._allPaused) |
| this._togglePauseAll(); |
| - } else { |
| - this._setPlaybackRate(1); |
| - } |
| + else |
| + this._setPlaybackRate(this._playbackRateSetting.get()); |
|
dgozman
2016/12/16 05:44:31
Setting is used to persist between DevTools reopen
einbinder
2016/12/16 22:37:05
I thought we wanted it to persist between devtools
|
| + |
| for (var group of this._groupBuffer) |
| group.release(); |
| this._groupBuffer = []; |