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

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

Issue 2575413003: DevTools: Animations: Remember the playback rate (Closed)
Patch Set: Don't use setting 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« 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