Bug 1046631 - Don't process meta-viewport tags from a new page load before displaying the new page. r=kats, a=lmandel
authorEugen Sawin <esawin@mozilla.com>
Tue, 12 Aug 2014 21:55:36 +0200
changeset 209463 548fff9b12dfe01f79441d8b1dd6aae5e1000c39
parent 209460 58eb677e55f302ea2ae41e99be2e05e5da6a33de
child 209464 d202ef3b87bd8e3a67ac02b4b07c7ba34b848ee5
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats, lmandel
bugs1046631
milestone32.0
Bug 1046631 - Don't process meta-viewport tags from a new page load before displaying the new page. r=kats, a=lmandel
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -6075,17 +6075,17 @@ var ViewportHandler = {
     switch (aEvent.type) {
       case "DOMMetaAdded":
         let target = aEvent.originalTarget;
         if (target.name != "viewport")
           break;
         let document = target.ownerDocument;
         let browser = BrowserApp.getBrowserForDocument(document);
         let tab = BrowserApp.getTabForBrowser(browser);
-        if (tab)
+        if (tab && tab.contentDocumentIsDisplayed)
           this.updateMetadata(tab, false);
         break;
     }
   },
 
   observe: function(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "Window:Resize":