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

Unified Diff: ui/file_manager/image_loader/piex_loader.js

Issue 2737383003: Add a workaround for the load event not being called in image loader. (Closed)
Patch Set: Fixed closure compiling error. Created 3 years, 9 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: ui/file_manager/image_loader/piex_loader.js
diff --git a/ui/file_manager/image_loader/piex_loader.js b/ui/file_manager/image_loader/piex_loader.js
index e667692f3e3d13394d321ad5c7a689b1cd7a1291..6b739a41eb229c779c20c34b37f757952e515ce6 100644
--- a/ui/file_manager/image_loader/piex_loader.js
+++ b/ui/file_manager/image_loader/piex_loader.js
@@ -194,6 +194,10 @@ PiexLoader.prototype.loadNaclModule_ = function() {
listenerContainer.style.height = '0px';
this.containerElement_ = listenerContainer;
document.body.appendChild(listenerContainer);
+
+ // Force a relayout. Workaround for load event not being called on <embed>
+ // for a NaCl module. crbug.com/699930
+ /** @suppress {suspiciousCode} */ this.naclModule_.offsetTop;
}.bind(this));
}.bind(this)).catch(function (error) {
console.error(error);
« 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