mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1039904 - Changing the URL in a pinned tab shouldn't open a new tab. r=gavin
This commit is contained in:
parent
26204314d1
commit
a196c27a6f
@ -317,6 +317,7 @@
|
||||
openUILinkIn(url, "current", {
|
||||
allowThirdPartyFixup: true,
|
||||
disallowInheritPrincipal: !mayInheritPrincipal,
|
||||
allowPinnedTabHostChange: true,
|
||||
postData: postData
|
||||
});
|
||||
}
|
||||
|
@ -185,6 +185,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
|
||||
* referrerURI (nsIURI)
|
||||
* relatedToCurrent (boolean)
|
||||
* skipTabAnimation (boolean)
|
||||
* allowPinnedTabHostChange (boolean)
|
||||
*/
|
||||
function openUILinkIn(url, where, aAllowThirdPartyFixup, aPostData, aReferrerURI) {
|
||||
var params;
|
||||
@ -220,6 +221,7 @@ function openLinkIn(url, where, params) {
|
||||
var aInitiatingDoc = params.initiatingDoc;
|
||||
var aIsPrivate = params.private;
|
||||
var aSkipTabAnimation = params.skipTabAnimation;
|
||||
var aAllowPinnedTabHostChange = !!params.allowPinnedTabHostChange;
|
||||
|
||||
if (where == "save") {
|
||||
if (!aInitiatingDoc) {
|
||||
@ -288,7 +290,8 @@ function openLinkIn(url, where, params) {
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
if (where == "current" && w.gBrowser.selectedTab.pinned) {
|
||||
if (where == "current" && w.gBrowser.selectedTab.pinned &&
|
||||
!aAllowPinnedTabHostChange) {
|
||||
try {
|
||||
// nsIURI.host can throw for non-nsStandardURL nsIURIs.
|
||||
if (!uriObj || (!uriObj.schemeIs("javascript") &&
|
||||
|
Loading…
Reference in New Issue
Block a user