| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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.ElementsSidebarPane} | 7 * @extends {WebInspector.ElementsSidebarPane} |
| 8 */ | 8 */ |
| 9 WebInspector.AnimationsSidebarPane = function(stylesPane) | 9 WebInspector.AnimationsSidebarPane = function(stylesPane) |
| 10 { | 10 { |
| 11 WebInspector.ElementsSidebarPane.call(this, WebInspector.UIString("Animation
s")); | 11 WebInspector.ElementsSidebarPane.call(this, WebInspector.UIString("Animation
s")); |
| 12 this._stylesPane = stylesPane; | 12 this._stylesPane = stylesPane; |
| 13 | 13 |
| 14 this.headerElement = createElementWithClass("div", "animationsHeader"); | 14 this.headerElement = createElementWithClass("div", "animationsHeader"); |
| 15 this._showSubtreeSetting = WebInspector.settings.createSetting("showSubtreeA
nimations", true); | 15 this._showSubtreeSetting = WebInspector.settings.createSetting("showSubtreeA
nimations", true); |
| 16 this._showSubtreeSetting.addChangeListener(this._showSubtreeSettingChanged.b
ind(this)); | 16 this._showSubtreeSetting.addChangeListener(this._showSubtreeSettingChanged.b
ind(this)); |
| 17 this._globalControls = new WebInspector.AnimationsSidebarPane.GlobalAnimatio
nControls(this._showSubtreeSetting); | 17 this._globalControls = new WebInspector.AnimationsSidebarPane.GlobalAnimatio
nControls(this._showSubtreeSetting); |
| 18 this.headerElement.appendChild(this._globalControls.element); | 18 this.headerElement.appendChild(this._globalControls.element); |
| 19 | 19 |
| 20 this._emptyElement = createElement("div"); | 20 this._emptyElement = createElement("div"); |
| 21 this._emptyElement.className = "info"; | 21 this._emptyElement.className = "info"; |
| 22 this._emptyElement.textContent = WebInspector.UIString("No Animations"); | 22 this._emptyElement.textContent = WebInspector.UIString("No Animations"); |
| 23 this.animationsElement = createElement("div"); | 23 this.animationsElement = createElement("div"); |
| 24 this.animationsElement.appendChild(this._emptyElement); | 24 this.animationsElement.appendChild(this._emptyElement); |
| 25 | 25 |
| 26 this._animationSections = []; | 26 this._animationSections = []; |
| 27 | 27 |
| 28 this.bodyElement.appendChild(this.headerElement); | 28 this.bodyElement.appendChild(this.headerElement); |
| 29 this._timeline = new WebInspector.AnimationTimeline(); | 29 this._timeline = new WebInspector.AnimationTimeline(this._stylesPane); |
| 30 this._timeline.show(this.bodyElement); | 30 this._timeline.show(this.bodyElement); |
| 31 this.bodyElement.appendChild(this.animationsElement); | 31 this.bodyElement.appendChild(this.animationsElement); |
| 32 } | 32 } |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * @param {!WebInspector.Setting} setting | 35 * @param {!WebInspector.Setting} setting |
| 36 * @return {!Element} | 36 * @return {!Element} |
| 37 */ | 37 */ |
| 38 WebInspector.AnimationsSidebarPane._showSubtreeAnimationsCheckbox = function(set
ting) | 38 WebInspector.AnimationsSidebarPane._showSubtreeAnimationsCheckbox = function(set
ting) |
| 39 { | 39 { |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 this._playbackRate = playbackRate; | 478 this._playbackRate = playbackRate; |
| 479 this._updateControls(); | 479 this._updateControls(); |
| 480 // Only apply to main target. | 480 // Only apply to main target. |
| 481 var target = WebInspector.targetManager.mainTarget(); | 481 var target = WebInspector.targetManager.mainTarget(); |
| 482 if (target) | 482 if (target) |
| 483 target.pageAgent().setAnimationsPlaybackRate(this._paused ? 0 : this
._playbackRate); | 483 target.pageAgent().setAnimationsPlaybackRate(this._paused ? 0 : this
._playbackRate); |
| 484 }, | 484 }, |
| 485 | 485 |
| 486 __proto__: WebInspector.StatusBar.prototype | 486 __proto__: WebInspector.StatusBar.prototype |
| 487 } | 487 } |
| OLD | NEW |