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

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

Issue 1960373003: DevTools: follow up to r392483, do not run animation groups when paused. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.AnimationTimeline = function() 10 WebInspector.AnimationTimeline = function()
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 this._controlButton.setState(WebInspector.AnimationTimeline._Control State.Pause); 258 this._controlButton.setState(WebInspector.AnimationTimeline._Control State.Pause);
259 this._controlButton.setTitle(WebInspector.UIString("Pause timeline") ); 259 this._controlButton.setTitle(WebInspector.UIString("Pause timeline") );
260 } 260 }
261 }, 261 },
262 262
263 /** 263 /**
264 * @return {number} 264 * @return {number}
265 */ 265 */
266 _effectivePlaybackRate: function() 266 _effectivePlaybackRate: function()
267 { 267 {
268 return this._selectedGroup && this._selectedGroup.paused() ? 0 : this._p laybackRate; 268 return this._selectedGroup && this._selectedGroup.paused() ? 0 : (this._ allPaused ? 0 : this._playbackRate);
samli 2016/05/10 00:55:21 Nit: remove chained ternary (this._selectedGroup
269 }, 269 },
270 270
271 /** 271 /**
272 * @param {boolean} pause 272 * @param {boolean} pause
273 */ 273 */
274 _togglePause: function(pause) 274 _togglePause: function(pause)
275 { 275 {
276 this._selectedGroup.togglePause(pause); 276 this._selectedGroup.togglePause(pause);
277 if (this._scrubberPlayer) 277 if (this._scrubberPlayer)
278 this._scrubberPlayer.playbackRate = this._effectivePlaybackRate(); 278 this._scrubberPlayer.playbackRate = this._effectivePlaybackRate();
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 777
778 /** 778 /**
779 * @override 779 * @override
780 * @return {!WebInspector.ToolbarItem} 780 * @return {!WebInspector.ToolbarItem}
781 */ 781 */
782 item: function() 782 item: function()
783 { 783 {
784 return this._button; 784 return this._button;
785 } 785 }
786 } 786 }
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