Bug 594002 - Use the tab's outer width when calculating the number of visible tabs for session restore prioritization. r=zpao, a=betaN
authorMarkus Stange <mstange@themasta.com>
Wed, 24 Nov 2010 10:52:42 +0100
changeset 58138 fad69d390b23731a2f05124bf5117e22ee10d18f
parent 58137 c32ed22725099c6b24835780164a4afb73f8f522
child 58139 fa6f069c82cbb703f4a7ce260e6a20b3541d5b71
push id17174
push usermstange@themasta.com
push dateWed, 24 Nov 2010 09:57:48 +0000
treeherderautoland@fad69d390b23 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerszpao, betaN
bugs594002
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 594002 - Use the tab's outer width when calculating the number of visible tabs for session restore prioritization. r=zpao, a=betaN
browser/components/sessionstore/src/nsSessionStore.js
--- a/browser/components/sessionstore/src/nsSessionStore.js
+++ b/browser/components/sessionstore/src/nsSessionStore.js
@@ -2438,17 +2438,17 @@ SessionStoreService.prototype = {
           --unhiddenTabs;
           continue;
         }
         ++t;
       }
 
       // Determine if we can optimize & load visible tabs first
       let maxVisibleTabs = Math.ceil(tabbrowser.tabContainer.mTabstrip.scrollClientSize /
-                                     aTabs[unhiddenTabs - 1].clientWidth);
+                                     aTabs[unhiddenTabs - 1].getBoundingClientRect().width);
 
       // make sure we restore visible tabs first, if there are enough
       if (maxVisibleTabs < unhiddenTabs && aSelectTab > 1) {
         let firstVisibleTab = 0;
         if (unhiddenTabs - maxVisibleTabs > aSelectTab) {
           // aSelectTab is leftmost since we scroll to it when possible
           firstVisibleTab = aSelectTab - 1;
         } else {