Bug 1374741 - Within toolkit/ make openUILinkIn() provide the correct triggeringPrincipal. r?Gijs draft
authorJonathan Kingston <jkt@mozilla.com>
Wed, 21 Feb 2018 23:08:42 +0000
changeset 759755 9e74f48c2a0842d7c53050d8ed886ef1e645f992
parent 759754 d4d4f1aea0d49bf9c64c6380ac0849bd20697f70
child 759756 9381663777dacbc2b84faaf607760026a4cfbb3a
push id100453
push userbmo:jkt@mozilla.com
push dateMon, 26 Feb 2018 15:22:58 +0000
reviewersGijs
bugs1374741
milestone60.0a1
Bug 1374741 - Within toolkit/ make openUILinkIn() provide the correct triggeringPrincipal. r?Gijs MozReview-Commit-ID: AX2S3bEKl1w
toolkit/components/passwordmgr/content/passwordManager.js
toolkit/components/viewsource/content/viewSourceUtils.js
toolkit/content/widgets/autocomplete.xml
--- 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
@@ -65,17 +65,17 @@ var gViewSourceUtils = {
       Services.ww.unregisterNotification(onOpen);
       let win = subj.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                     .getInterface(Components.interfaces.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