Bug 1374741 - Within toolkit/ make openUILinkIn() provide the correct triggeringPrincipal. r?Gijs
MozReview-Commit-ID: AX2S3bEKl1w
--- a/toolkit/components/passwordmgr/content/passwordManager.js
+++ b/toolkit/components/passwordmgr/content/passwordManager.js
@@ -663,17 +663,17 @@ function EditCellInSelectedRow(columnNam
let row = signonsTree.currentIndex;
let columnElement = getColumnByName(columnName);
signonsTree.startEditing(row, signonsTree.columns.getColumnFor(columnElement));
}
function LaunchSiteUrl() {
let row = signonsTree.currentIndex;
let url = signonsTreeView.getCellText(row, {id: "siteCol"});
- window.openUILinkIn(url, "tab");
+ window.openWebLinkIn(url, "tab");
}
function UpdateContextMenu() {
let singleSelection = (signonsTreeView.selection.count == 1);
let menuItems = new Map();
let menupopup = document.getElementById("signonsTreeContextMenu");
for (let menuItem of menupopup.querySelectorAll("menuitem")) {
menuItems.set(menuItem.id, menuItem);
@@ -684,17 +684,17 @@ function UpdateContextMenu() {
menuItem.setAttribute("disabled", "true");
}
return;
}
let selectedRow = signonsTree.currentIndex;
// Don't display "Launch Site URL" if we're not a browser.
- if (window.openUILinkIn) {
+ if (window.openWebLinkIn) {
menuItems.get("context-launchsiteurl").removeAttribute("disabled");
} else {
menuItems.get("context-launchsiteurl").setAttribute("disabled", "true");
menuItems.get("context-launchsiteurl").setAttribute("hidden", "true");
}
// Disable "Copy Username" if the username is empty.
if (signonsTreeView.getCellText(selectedRow, { id: "userCol" }) != "") {
--- a/toolkit/components/viewsource/content/viewSourceUtils.js
+++ b/toolkit/components/viewsource/content/viewSourceUtils.js
@@ -69,17 +69,17 @@ var gViewSourceUtils = {
Services.ww.unregisterNotification(onOpen);
let win = subj.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
win.addEventListener("load", () => {
aArgs.viewSourceBrowser = win.gBrowser.selectedTab.linkedBrowser;
utils.viewSourceInBrowser(aArgs);
}, { once: true });
});
- window.top.openUILinkIn("about:blank", "current");
+ window.top.openWebLinkIn("about:blank", "current");
},
/**
* Displays view source in the provided <browser>. This allows for non-window
* display methods, such as a tab from Firefox.
*
* @param aArgs
* An object with the following properties:
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -1243,17 +1243,17 @@
xbl:inherits="selected"/>
</xul:description>
</xul:hbox>
</content>
<handlers>
<handler event="click" button="0"><![CDATA[
let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
- window.openUILinkIn(baseURL + "insecure-password", "tab", {
+ window.openTrustedLinkIn(baseURL + "insecure-password", "tab", {
relatedToCurrent: true,
});
]]></handler>
</handlers>
<implementation>
<constructor><![CDATA[
// Unlike other autocomplete items, the height of the insecure warning