зеркало из https://github.com/mozilla/pjs.git
Camino only - Bug 392038: Support browser.tabs.loadDivertedInBackground as a hidden pref. r=smurph sr=pink
This commit is contained in:
Родитель
b9d1651064
Коммит
43ed5f9f6c
|
@ -143,6 +143,9 @@ pref("browser.link.open_newwindow", 2);
|
|||
// 1 = use SWM on every window.open, 2 = use SWM unless size or features specified
|
||||
pref("browser.link.open_newwindow.restriction", 2);
|
||||
|
||||
// don't force all windows diverted by SWM to load in the background
|
||||
pref("browser.tabs.loadDivertedInBackground", false);
|
||||
|
||||
// load links from external apps: 0 = new window, 1 = new tab,
|
||||
// 2 = current window/tab
|
||||
pref("browser.reuse_window", 0);
|
||||
|
|
|
@ -920,12 +920,18 @@ enum StatusPriority {
|
|||
CHBrowserView* viewToUse = mBrowserView;
|
||||
int openNewWindow = [[PreferenceManager sharedInstance] getIntPref:"browser.link.open_newwindow" withSuccess:NULL];
|
||||
if (openNewWindow == nsIBrowserDOMWindow::OPEN_NEWTAB) {
|
||||
// we decide whether or not to open the new tab in the background based on
|
||||
// if we're the fg tab. If we are, we assume the user wants to see the new tab
|
||||
// because it's contextually relevat. If this tab is in the bg, the user doesn't
|
||||
// want to be bothered with a bg tab throwing things up in their face. We know
|
||||
// If browser.tabs.loadDivertedInBackground isn't set, we decide whether or
|
||||
// not to open the new tab in the background based on whether we're the fg
|
||||
// tab. If we are, we assume the user wants to see the new tab because it's
|
||||
// contextually relevant. If this tab is in the bg, the user doesn't want to
|
||||
// be bothered with a bg tab throwing things up in their face. We know
|
||||
// we're in the bg if our delegate is nil.
|
||||
viewToUse = [mCreateDelegate createNewTabBrowser:(mDelegate == nil)];
|
||||
BOOL loadInBackground;
|
||||
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadDivertedInBackground" withSuccess:NULL])
|
||||
loadInBackground = YES;
|
||||
else
|
||||
loadInBackground = (mDelegate == nil);
|
||||
viewToUse = [mCreateDelegate createNewTabBrowser:loadInBackground];
|
||||
}
|
||||
|
||||
return viewToUse;
|
||||
|
|
Загрузка…
Ссылка в новой задаче