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

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: put into one file 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..71aba877044d69e0f1c201644413993fed4ef5be 100644
--- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js
+++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js
@@ -194,9 +194,21 @@ WebInspector.AnimationTimeline.prototype = {
var screenshots = animGroup.screenshots();
if (!screenshots.length)
return;
- var content = new WebInspector.AnimationScreenshotPopover(screenshots);
- popover.setNoMargins(true);
- popover.showView(content, anchor);
+
+ if (!screenshots[0].complete)
+ screenshots[0].onload = onFirstScreenshotLoaded.bind(null, screenshots);
+ else
+ onFirstScreenshotLoaded(screenshots);
+
+ /**
+ * @param {!Array.<!Image>} screenshots
+ */
+ function onFirstScreenshotLoaded(screenshots)
+ {
+ var content = new WebInspector.AnimationScreenshotPopover(screenshots);
+ popover.setNoMargins(true);
+ popover.showView(content, anchor);
+ }
},
_onHidePopover: function()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698