| 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 WebInspector.AnimationScreenshotPopover = class extends WebInspector.VBox { | 7 Animation.AnimationScreenshotPopover = class extends UI.VBox { |
| 8 /** | 8 /** |
| 9 * @param {!Array.<!Image>} images | 9 * @param {!Array.<!Image>} images |
| 10 */ | 10 */ |
| 11 constructor(images) { | 11 constructor(images) { |
| 12 super(true); | 12 super(true); |
| 13 console.assert(images.length); | 13 console.assert(images.length); |
| 14 this.registerRequiredCSS('animation/animationScreenshotPopover.css'); | 14 this.registerRequiredCSS('animation/animationScreenshotPopover.css'); |
| 15 this.contentElement.classList.add('animation-screenshot-popover'); | 15 this.contentElement.classList.add('animation-screenshot-popover'); |
| 16 this._frames = images; | 16 this._frames = images; |
| 17 for (var image of images) { | 17 for (var image of images) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 var numFrames = this._frames.length; | 52 var numFrames = this._frames.length; |
| 53 this._frames[this._currentFrame % numFrames].style.display = 'none'; | 53 this._frames[this._currentFrame % numFrames].style.display = 'none'; |
| 54 this._currentFrame++; | 54 this._currentFrame++; |
| 55 this._frames[(this._currentFrame) % numFrames].style.display = 'block'; | 55 this._frames[(this._currentFrame) % numFrames].style.display = 'block'; |
| 56 if (this._currentFrame % numFrames === numFrames - 1) | 56 if (this._currentFrame % numFrames === numFrames - 1) |
| 57 this._endDelay = 50; | 57 this._endDelay = 50; |
| 58 this._progressBar.style.width = (this._currentFrame % numFrames + 1) / numFr
ames * 100 + '%'; | 58 this._progressBar.style.width = (this._currentFrame % numFrames + 1) / numFr
ames * 100 + '%'; |
| 59 } | 59 } |
| 60 }; | 60 }; |
| OLD | NEW |