Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js b/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js |
| index e6ecf4a074d27b93c4b27d29de9ec95a478e5d92..9818a93a51f71bf185cfd0fcd193dd73b2ec004a 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js |
| @@ -191,12 +191,23 @@ WebInspector.AnimationTimeline.prototype = { |
| animGroup = group; |
| } |
| console.assert(animGroup); |
| - var screenshots = animGroup.screenshots(); |
| + var screenshots = animGroup.screenshots(onImageLoad); |
| if (!screenshots.length) |
| return; |
| - var content = new WebInspector.AnimationScreenshotPopover(screenshots); |
| - popover.setNoMargins(true); |
| - popover.showView(content, anchor); |
| + if (screenshots[0].complete) |
|
lushnikov
2016/08/01 23:16:11
why do we care only about the 0's screenshot?
luoe
2016/08/02 00:24:10
We shouldn't :)
Changed to keep a counter for rema
|
| + onImageLoad(); |
| + |
| + var loaded = false; |
| + function onImageLoad() |
| + { |
| + if (loaded) |
| + return; |
| + loaded = true; |
| + |
| + var content = new WebInspector.AnimationScreenshotPopover(screenshots); |
| + popover.setNoMargins(true); |
| + popover.showView(content, anchor); |
| + } |
| }, |
| _onHidePopover: function() |