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 { |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 updatePauseButton.call(this, true); | 170 updatePauseButton.call(this, true); |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 /** | 174 /** |
175 * @param {boolean} paused | 175 * @param {boolean} paused |
176 * @this {WebInspector.AnimationSection} | 176 * @this {WebInspector.AnimationSection} |
177 */ | 177 */ |
178 function updatePauseButton(paused) | 178 function updatePauseButton(paused) |
179 { | 179 { |
180 this._pauseButton.state = paused; | 180 this._pauseButton.setToggled(paused); |
181 this._pauseButton.title = paused ? WebInspector.UIString("Play anima
tion") : WebInspector.UIString("Pause animation"); | 181 this._pauseButton.setTitle(paused ? WebInspector.UIString("Play anim
ation") : WebInspector.UIString("Pause animation")); |
182 } | 182 } |
183 | 183 |
184 this._pauseButton = new WebInspector.StatusBarButton("", "animation-paus
e"); | 184 this._pauseButton = new WebInspector.StatusBarButton("", "animation-paus
e"); |
185 updatePauseButton.call(this, this.player.paused()); | 185 updatePauseButton.call(this, this.player.paused()); |
186 this._pauseButton.addEventListener("click", pauseButtonHandler, this); | 186 this._pauseButton.addEventListener("click", pauseButtonHandler, this); |
187 | 187 |
188 this.currentTimeSlider = this._createCurrentTimeSlider(); | 188 this.currentTimeSlider = this._createCurrentTimeSlider(); |
189 | 189 |
190 var controls = createElement("div"); | 190 var controls = createElement("div"); |
191 controls.appendChild(this._pauseButton.element); | 191 controls.appendChild(this._pauseButton.element); |
(...skipping 23 matching lines...) Expand all Loading... |
215 "duration": p.source().duration(), | 215 "duration": p.source().duration(), |
216 "direction": p.source().direction(), | 216 "direction": p.source().direction(), |
217 "fill-mode": p.source().fillMode(), | 217 "fill-mode": p.source().fillMode(), |
218 "time-fraction": p.source().timeFraction() | 218 "time-fraction": p.source().timeFraction() |
219 }; | 219 }; |
220 var obj = WebInspector.RemoteObject.fromLocalObject(animationObject); | 220 var obj = WebInspector.RemoteObject.fromLocalObject(animationObject); |
221 var section = new WebInspector.ObjectPropertiesSection(obj, WebInspector
.UIString("Animation Properties")); | 221 var section = new WebInspector.ObjectPropertiesSection(obj, WebInspector
.UIString("Animation Properties")); |
222 this.propertiesSection.appendChild(section.element); | 222 this.propertiesSection.appendChild(section.element); |
223 } | 223 } |
224 } | 224 } |
OLD | NEW |