| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 var button = playbackRateControl.createChild("div", "animation-playb
ack-rate-button"); | 138 var button = playbackRateControl.createChild("div", "animation-playb
ack-rate-button"); |
| 139 button.textContent = playbackRate ? WebInspector.UIString(playbackRa
te * 100 + "%") : WebInspector.UIString("Pause"); | 139 button.textContent = playbackRate ? WebInspector.UIString(playbackRa
te * 100 + "%") : WebInspector.UIString("Pause"); |
| 140 button.playbackRate = playbackRate; | 140 button.playbackRate = playbackRate; |
| 141 button.addEventListener("click", this._setPlaybackRate.bind(this, pl
aybackRate)); | 141 button.addEventListener("click", this._setPlaybackRate.bind(this, pl
aybackRate)); |
| 142 button.title = WebInspector.UIString("Set speed to ") + button.textC
ontent; | 142 button.title = WebInspector.UIString("Set speed to ") + button.textC
ontent; |
| 143 this._playbackRateButtons.push(button); | 143 this._playbackRateButtons.push(button); |
| 144 } | 144 } |
| 145 this._updatePlaybackControls(); | 145 this._updatePlaybackControls(); |
| 146 | 146 |
| 147 this._previewContainer = this.contentElement.createChild("div", "animati
on-timeline-buffer"); | 147 this._previewContainer = this.contentElement.createChild("div", "animati
on-timeline-buffer"); |
| 148 this._popoverHelper = new WebInspector.PopoverHelper(this._previewContai
ner, this._getPopoverAnchor.bind(this), this._showPopover.bind(this), this._onHi
dePopover.bind(this), true); | 148 this._popoverHelper = new WebInspector.PopoverHelper(this._previewContai
ner, true); |
| 149 this._popoverHelper.initializeCallbacks(this._getPopoverAnchor.bind(this
), this._showPopover.bind(this), this._onHidePopover.bind(this)); |
| 149 this._popoverHelper.setTimeout(0); | 150 this._popoverHelper.setTimeout(0); |
| 150 var emptyBufferHint = this.contentElement.createChild("div", "animation-
timeline-buffer-hint"); | 151 var emptyBufferHint = this.contentElement.createChild("div", "animation-
timeline-buffer-hint"); |
| 151 emptyBufferHint.textContent = WebInspector.UIString("Listening for anima
tions..."); | 152 emptyBufferHint.textContent = WebInspector.UIString("Listening for anima
tions..."); |
| 152 var container = this.contentElement.createChild("div", "animation-timeli
ne-header"); | 153 var container = this.contentElement.createChild("div", "animation-timeli
ne-header"); |
| 153 var controls = container.createChild("div", "animation-controls"); | 154 var controls = container.createChild("div", "animation-controls"); |
| 154 this._currentTime = controls.createChild("div", "animation-timeline-curr
ent-time monospace"); | 155 this._currentTime = controls.createChild("div", "animation-timeline-curr
ent-time monospace"); |
| 155 | 156 |
| 156 var toolbar = new WebInspector.Toolbar("animation-controls-toolbar", con
trols); | 157 var toolbar = new WebInspector.Toolbar("animation-controls-toolbar", con
trols); |
| 157 this._controlButton = new WebInspector.ToolbarButton(WebInspector.UIStri
ng("Replay timeline"), "animation-control-toolbar-item"); | 158 this._controlButton = new WebInspector.ToolbarButton(WebInspector.UIStri
ng("Replay timeline"), "animation-control-toolbar-item"); |
| 158 this._controlButton.setState(WebInspector.AnimationTimeline._ControlStat
e.Replay); | 159 this._controlButton.setState(WebInspector.AnimationTimeline._ControlStat
e.Replay); |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 */ | 764 */ |
| 764 WebInspector.AnimationTimeline.StepTimingFunction.parse = function(text) { | 765 WebInspector.AnimationTimeline.StepTimingFunction.parse = function(text) { |
| 765 var match = text.match(/^steps\((\d+), (start|middle)\)$/); | 766 var match = text.match(/^steps\((\d+), (start|middle)\)$/); |
| 766 if (match) | 767 if (match) |
| 767 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma
tch[1], 10), match[2]); | 768 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma
tch[1], 10), match[2]); |
| 768 match = text.match(/^steps\((\d+)\)$/); | 769 match = text.match(/^steps\((\d+)\)$/); |
| 769 if (match) | 770 if (match) |
| 770 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma
tch[1], 10), "end"); | 771 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma
tch[1], 10), "end"); |
| 771 return null; | 772 return null; |
| 772 }; | 773 }; |
| OLD | NEW |