mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 483403 - Temporarily disable tabstrip smooth scrolling when restoring a window. r=dietrich/zeniko
This commit is contained in:
parent
30f7ea4ba4
commit
af30869344
@ -1650,10 +1650,15 @@ SessionStoreService.prototype = {
|
||||
winData.tabs = [];
|
||||
}
|
||||
|
||||
var tabbrowser = aWindow.getBrowser();
|
||||
var tabbrowser = aWindow.gBrowser;
|
||||
var openTabCount = aOverwriteTabs ? tabbrowser.browsers.length : -1;
|
||||
var newTabCount = winData.tabs.length;
|
||||
let tabs = [];
|
||||
var tabs = [];
|
||||
|
||||
// disable smooth scrolling while adding, moving, removing and selecting tabs
|
||||
var tabstrip = tabbrowser.tabContainer.mTabstrip;
|
||||
var smoothScroll = tabstrip.smoothScroll;
|
||||
tabstrip.smoothScroll = false;
|
||||
|
||||
// make sure that the selected tab won't be closed in order to
|
||||
// prevent unnecessary flickering
|
||||
@ -1696,6 +1701,9 @@ SessionStoreService.prototype = {
|
||||
this.restoreHistoryPrecursor(aWindow, tabs, winData.tabs,
|
||||
(aOverwriteTabs ? (parseInt(winData.selected) || 1) : 0), 0, 0);
|
||||
|
||||
// set smoothScroll back to the original value
|
||||
tabstrip.smoothScroll = smoothScroll;
|
||||
|
||||
this._notifyIfAllWindowsRestored();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user