Chromium Code Reviews| 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 /** | 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |