зеркало из https://github.com/mozilla/gecko-dev.git
Back out Dão's patch from bug 392870 as a possible cause of the Ts regression.
This commit is contained in:
Родитель
edbcbf98d3
Коммит
5a746e48f3
|
@ -266,10 +266,6 @@ pref("browser.link.open_newwindow", 3);
|
||||||
pref("browser.link.open_newwindow.restriction", 2);
|
pref("browser.link.open_newwindow.restriction", 2);
|
||||||
|
|
||||||
// Tab browser preferences.
|
// Tab browser preferences.
|
||||||
pref("browser.tabs.autoHide", false);
|
|
||||||
pref("browser.tabs.warnOnClose", true);
|
|
||||||
pref("browser.tabs.warnOnOpen", true);
|
|
||||||
pref("browser.tabs.maxOpenBeforeWarn", 15);
|
|
||||||
pref("browser.tabs.loadInBackground", true);
|
pref("browser.tabs.loadInBackground", true);
|
||||||
pref("browser.tabs.loadFolderAndReplace", true);
|
pref("browser.tabs.loadFolderAndReplace", true);
|
||||||
pref("browser.tabs.opentabfor.middleclick", true);
|
pref("browser.tabs.opentabfor.middleclick", true);
|
||||||
|
|
|
@ -1374,6 +1374,7 @@ AutoHideTabbarPrefListener.prototype =
|
||||||
catch (e) {
|
catch (e) {
|
||||||
}
|
}
|
||||||
gBrowser.setStripVisibilityTo(aVisible);
|
gBrowser.setStripVisibilityTo(aVisible);
|
||||||
|
gPrefService.setBoolPref("browser.tabs.forceHide", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1746,8 +1747,17 @@ function BrowserCloseTabOrWindow()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If the current tab is the last one, this will close the window.
|
if (gBrowser.tabContainer.childNodes.length > 1 ||
|
||||||
gBrowser.removeCurrentTab();
|
window.toolbar.visible && !gPrefService.getBoolPref("browser.tabs.autoHide")) {
|
||||||
|
// Just close the tab (and focus the address bar if it was the last one).
|
||||||
|
var isLastTab = gBrowser.tabContainer.childNodes.length == 1;
|
||||||
|
gBrowser.removeCurrentTab();
|
||||||
|
if (isLastTab && gURLBar)
|
||||||
|
setTimeout(function() { gURLBar.focus(); }, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
closeWindow(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserTryToCloseWindow()
|
function BrowserTryToCloseWindow()
|
||||||
|
|
|
@ -1166,6 +1166,8 @@
|
||||||
if (this.mStrip.collapsed)
|
if (this.mStrip.collapsed)
|
||||||
this.setStripVisibilityTo(true);
|
this.setStripVisibilityTo(true);
|
||||||
|
|
||||||
|
this.mPrefs.setBoolPref("browser.tabs.forceHide", false);
|
||||||
|
|
||||||
// wire up a progress listener for the new browser object.
|
// wire up a progress listener for the new browser object.
|
||||||
var position = this.mTabContainer.childNodes.length-1;
|
var position = this.mTabContainer.childNodes.length-1;
|
||||||
var tabListener = this.mTabProgressListener(t, b, blank);
|
var tabListener = this.mTabProgressListener(t, b, blank);
|
||||||
|
@ -1339,22 +1341,18 @@
|
||||||
if (aTab.localName != "tab")
|
if (aTab.localName != "tab")
|
||||||
aTab = this.mCurrentTab;
|
aTab = this.mCurrentTab;
|
||||||
|
|
||||||
|
var l = this.mTabContainer.childNodes.length;
|
||||||
|
if (l == 1 && this.mPrefs.getBoolPref("browser.tabs.autoHide")) {
|
||||||
|
// hide the tab bar
|
||||||
|
this.mPrefs.setBoolPref("browser.tabs.forceHide", true);
|
||||||
|
this.setStripVisibilityTo(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var ds = this.getBrowserForTab(aTab).docShell;
|
var ds = this.getBrowserForTab(aTab).docShell;
|
||||||
if (ds.contentViewer && !ds.contentViewer.permitUnload())
|
if (ds.contentViewer && !ds.contentViewer.permitUnload())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var l = this.mTabContainer.childNodes.length;
|
|
||||||
if (l == 1) {
|
|
||||||
closeWindow(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (l == 2) {
|
|
||||||
var autohide = this.mPrefs.getBoolPref("browser.tabs.autoHide");
|
|
||||||
var tabStripHide = !window.toolbar.visible;
|
|
||||||
if (autohide || tabStripHide)
|
|
||||||
this.setStripVisibilityTo(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// see notes in addTab
|
// see notes in addTab
|
||||||
var _delayedUpdate = function(aTabContainer) {
|
var _delayedUpdate = function(aTabContainer) {
|
||||||
aTabContainer.adjustTabstrip();
|
aTabContainer.adjustTabstrip();
|
||||||
|
@ -1362,6 +1360,19 @@
|
||||||
}
|
}
|
||||||
setTimeout(_delayedUpdate, 0, this.mTabContainer);
|
setTimeout(_delayedUpdate, 0, this.mTabContainer);
|
||||||
|
|
||||||
|
if (l == 1) {
|
||||||
|
// add a new blank tab to replace the one we're about to close
|
||||||
|
// (this ensures that the remaining tab is as good as new)
|
||||||
|
this.addTab("about:blank");
|
||||||
|
l++;
|
||||||
|
}
|
||||||
|
else if (l == 2) {
|
||||||
|
var autohide = this.mPrefs.getBoolPref("browser.tabs.autoHide");
|
||||||
|
var tabStripHide = !window.toolbar.visible;
|
||||||
|
if (autohide || tabStripHide)
|
||||||
|
this.setStripVisibilityTo(false);
|
||||||
|
}
|
||||||
|
|
||||||
// We're committed to closing the tab now.
|
// We're committed to closing the tab now.
|
||||||
// Dispatch a notification.
|
// Dispatch a notification.
|
||||||
// We dispatch it before any teardown so that event listeners can
|
// We dispatch it before any teardown so that event listeners can
|
||||||
|
@ -1538,8 +1549,9 @@
|
||||||
if (!this.mAddProgressListenerWasCalled) {
|
if (!this.mAddProgressListenerWasCalled) {
|
||||||
this.mAddProgressListenerWasCalled = true;
|
this.mAddProgressListenerWasCalled = true;
|
||||||
var autoHide = this.mPrefs.getBoolPref("browser.tabs.autoHide");
|
var autoHide = this.mPrefs.getBoolPref("browser.tabs.autoHide");
|
||||||
|
var forceHide = this.mPrefs.getBoolPref("browser.tabs.forceHide");
|
||||||
var tabStripHide = !window.toolbar.visible;
|
var tabStripHide = !window.toolbar.visible;
|
||||||
if (!autoHide && !tabStripHide)
|
if (!autoHide && !forceHide && !tabStripHide)
|
||||||
this.setStripVisibilityTo(true);
|
this.setStripVisibilityTo(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,10 +172,29 @@ pref("browser.frames.enabled", true);
|
||||||
// form submission
|
// form submission
|
||||||
pref("browser.forms.submit.backwards_compatible", true);
|
pref("browser.forms.submit.backwards_compatible", true);
|
||||||
|
|
||||||
|
// xxxbsmedberg more toolkit prefs?
|
||||||
|
// Tab browser preferences.
|
||||||
|
pref("browser.tabs.autoHide", true);
|
||||||
|
pref("browser.tabs.forceHide", false);
|
||||||
|
pref("browser.tabs.warnOnClose", true);
|
||||||
|
pref("browser.tabs.warnOnCloseOther", true);
|
||||||
|
pref("browser.tabs.warnOnOpen", true);
|
||||||
|
pref("browser.tabs.maxOpenBeforeWarn", 15);
|
||||||
|
// 0 = append, 1 = replace
|
||||||
|
pref("browser.tabs.loadGroup", 1);
|
||||||
|
|
||||||
pref("toolkit.scrollbox.smoothScroll", true);
|
pref("toolkit.scrollbox.smoothScroll", true);
|
||||||
pref("toolkit.scrollbox.scrollIncrement", 20);
|
pref("toolkit.scrollbox.scrollIncrement", 20);
|
||||||
pref("toolkit.scrollbox.clickToScroll.scrollDelay", 150);
|
pref("toolkit.scrollbox.clickToScroll.scrollDelay", 150);
|
||||||
|
|
||||||
|
// lets new tab/window load something different than first window
|
||||||
|
// -1 - use navigator startup preference
|
||||||
|
// 0 - loads blank page
|
||||||
|
// 1 - loads home page
|
||||||
|
// 2 - loads last page visited
|
||||||
|
pref("browser.tabs.loadOnNewTab", 0);
|
||||||
|
pref("browser.windows.loadOnNewWindow", 1);
|
||||||
|
|
||||||
// view source
|
// view source
|
||||||
pref("view_source.syntax_highlight", true);
|
pref("view_source.syntax_highlight", true);
|
||||||
pref("view_source.wrap_long_lines", false);
|
pref("view_source.wrap_long_lines", false);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче