Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Unified Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js

Issue 2199103002: DevTools: fix animations panel after image loading became async (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()

Powered by Google App Engine
This is Rietveld 408576698