Bug 878801 - part 2 - query tabbrowser bounds without flushing layout; r=jaws
authorTim Taubert <ttaubert@mozilla.com>
Tue, 04 Jun 2013 08:06:30 +0200
changeset 133862 ce5ab0de1b092e51f5aba1304588ec0f508566ef
parent 133861 40216a220b803dd729f33962cc52ba951c0d8829
child 133863 5dd0e1ec10f515932031dac859205cc7557b22a1
child 133873 34e86aa3ee1997e6783025072c3e0015ccc80d68
push id1705
push userttaubert@mozilla.com
push dateTue, 04 Jun 2013 06:06:48 +0000
treeherderfx-team@ce5ab0de1b09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs878801
milestone24.0a1
Bug 878801 - part 2 - query tabbrowser bounds without flushing layout; r=jaws
browser/modules/BrowserNewTabPreloader.jsm
--- a/browser/modules/BrowserNewTabPreloader.jsm
+++ b/browser/modules/BrowserNewTabPreloader.jsm
@@ -57,17 +57,20 @@ this.BrowserNewTabPreloader = {
     HostFrame.destroy();
     Preferences.uninit();
     HiddenBrowsers.uninit();
   },
 
   newTab: function Preloader_newTab(aTab) {
     let win = aTab.ownerDocument.defaultView;
     if (win.gBrowser) {
-      let {boxObject: {width, height}} = win.gBrowser;
+      let utils = win.QueryInterface(Ci.nsIInterfaceRequestor)
+                     .getInterface(Ci.nsIDOMWindowUtils);
+
+      let {width, height} = utils.getBoundsWithoutFlushing(win.gBrowser);
       let hiddenBrowser = HiddenBrowsers.get(width, height)
       if (hiddenBrowser) {
         return hiddenBrowser.swapWithNewTab(aTab);
       }
     }
 
     return false;
   }