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

Unified Diff: components/neterror/resources/offline.js

Issue 2140653002: Fix display at start of offline dinosaur game [iOS] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rex
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
« 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: components/neterror/resources/offline.js
diff --git a/components/neterror/resources/offline.js b/components/neterror/resources/offline.js
index 5fa3050629dc6da4bc2fbd02e01081f3dcef2edd..368c2f96777e7d9f222277e2b33edb8a5ef3aa1e 100644
--- a/components/neterror/resources/offline.js
+++ b/components/neterror/resources/offline.js
@@ -291,7 +291,16 @@ Runner.prototype = {
this.spriteDef = Runner.spriteDefinition.LDPI;
}
- this.init();
+ if(!Runner.imageSprite.complete) {
+ // If the images are not yet loaded, add a listener.
+ Runner.imageSprite.runner = this;
+
+ Runner.imageSprite.onload = function() {
+ this.runner.init();
+ }
+ } else {
+ this.init();
+ }
},
/**
« 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