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

Unified Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.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/AnimationModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
index 18ee044980f55b3cf7ecdcab7408b76ecd36e553..2dd83a853f1a7b4877a0e1c982c5f8996eb22678 100644
--- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
@@ -820,12 +820,15 @@ WebInspector.AnimationModel.AnimationGroup.prototype = {
},
/**
+ * @param {function(?)=} onImageLoad
lushnikov 2016/08/01 23:16:11 Let's not pass onImageLoad here
luoe 2016/08/02 00:24:10 Yeah, I should have realized this was awkward. Mo
* @return {!Array.<!Image>}
*/
- screenshots: function()
+ screenshots: function(onImageLoad)
{
for (var i = 0; i < this._screenshots.length; ++i) {
var image = new Image();
+ if (onImageLoad)
+ image.onload = /** @type {function(?Event)} **/ (onImageLoad);
image.src = "data:image/jpeg;base64," + this._screenshots[i];
this._screenshotImages.push(image);
}

Powered by Google App Engine
This is Rietveld 408576698