зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e388e453977c (bug 1313403) for bc4 bustage a=backout
This commit is contained in:
Родитель
89d1b0e084
Коммит
cdb409b262
|
@ -348,7 +348,6 @@ function openLinkIn(url, where, params) {
|
||||||
// result in a new frontmost window (e.g. "javascript:window.open('');").
|
// result in a new frontmost window (e.g. "javascript:window.open('');").
|
||||||
w.focus();
|
w.focus();
|
||||||
|
|
||||||
let browserUsedForLoad = null;
|
|
||||||
switch (where) {
|
switch (where) {
|
||||||
case "current":
|
case "current":
|
||||||
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||||
|
@ -384,13 +383,12 @@ function openLinkIn(url, where, params) {
|
||||||
postData: aPostData,
|
postData: aPostData,
|
||||||
userContextId: aUserContextId
|
userContextId: aUserContextId
|
||||||
});
|
});
|
||||||
browserUsedForLoad = aCurrentBrowser;
|
|
||||||
break;
|
break;
|
||||||
case "tabshifted":
|
case "tabshifted":
|
||||||
loadInBackground = !loadInBackground;
|
loadInBackground = !loadInBackground;
|
||||||
// fall through
|
// fall through
|
||||||
case "tab":
|
case "tab":
|
||||||
let tabUsedForLoad = w.gBrowser.loadOneTab(url, {
|
w.gBrowser.loadOneTab(url, {
|
||||||
referrerURI: aReferrerURI,
|
referrerURI: aReferrerURI,
|
||||||
referrerPolicy: aReferrerPolicy,
|
referrerPolicy: aReferrerPolicy,
|
||||||
charset: aCharset,
|
charset: aCharset,
|
||||||
|
@ -404,15 +402,10 @@ function openLinkIn(url, where, params) {
|
||||||
userContextId: aUserContextId,
|
userContextId: aUserContextId,
|
||||||
originPrincipal: aPrincipal,
|
originPrincipal: aPrincipal,
|
||||||
});
|
});
|
||||||
browserUsedForLoad = tabUsedForLoad.linkedBrowser;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Focus the content, but only if the browser used for the load is selected.
|
aCurrentBrowser.focus();
|
||||||
if (browserUsedForLoad &&
|
|
||||||
browserUsedForLoad == browserUsedForLoad.ownerGlobal.gBrowser.selectedBrowser) {
|
|
||||||
browserUsedForLoad.focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!loadInBackground && w.isBlankPageURL(url)) {
|
if (!loadInBackground && w.isBlankPageURL(url)) {
|
||||||
w.focusAndSelectUrlBar();
|
w.focusAndSelectUrlBar();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче