Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(874)

Unified Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js

Issue 2575413003: DevTools: Animations: Remember the playback rate (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 = [];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698