Bug 1377006 - Part 2: Add disableHighlight option in formautofill doorhanger. r=lchang draft
authorsteveck-chung <schung@mozilla.com>
Thu, 27 Jul 2017 18:11:12 +0800
changeset 661166 6265813e87b1
parent 661165 0ad95fcda824
child 730475 4a5d77e3e4e6
push id78655
push userbmo:schung@mozilla.com
push dateFri, 08 Sep 2017 03:08:54 +0000
reviewerslchang
bugs1377006
milestone57.0a1
Bug 1377006 - Part 2: Add disableHighlight option in formautofill doorhanger. r=lchang MozReview-Commit-ID: 3UkSIUeM0oK
browser/extensions/formautofill/FormAutofillDoorhanger.jsm
--- a/browser/extensions/formautofill/FormAutofillDoorhanger.jsm
+++ b/browser/extensions/formautofill/FormAutofillDoorhanger.jsm
@@ -42,16 +42,17 @@ const CONTENT = {
       id: "autofill-address-notification-icon",
       URL: "chrome://formautofill/content/formfill-anchor.svg",
       tooltiptext: GetStringFromName("openAutofillMessagePanel"),
     },
     mainAction: {
       label: GetStringFromName(changeAutofillOptsKey),
       accessKey: "C",
       callbackState: "open-pref",
+      disableHighlight: true,
     },
     options: {
       persistWhileVisible: true,
       popupIconURL: "chrome://formautofill/content/icon-address-save.svg",
       checkbox: {
         get checked() {
           return Services.prefs.getBoolPref("services.sync.engine.addresses");
         },
@@ -136,19 +137,19 @@ let FormAutofillDoorhanger = {
    * @returns {Array<Object>}
               Return the mainAction and secondary actions in an array for showing doorhanger
    */
   _createActions(mainActionParams, secondaryActionParams, resolve) {
     if (!mainActionParams) {
       return [null, null];
     }
 
-    let {label, accessKey, callbackState} = mainActionParams;
+    let {label, accessKey, disableHighlight, callbackState} = mainActionParams;
     let callback = resolve.bind(null, callbackState);
-    let mainAction = {label, accessKey, callback};
+    let mainAction = {label, accessKey, callback, disableHighlight};
 
     if (!secondaryActionParams) {
       return [mainAction, null];
     }
 
     let secondaryActions = [];
     for (let params of secondaryActionParams) {
       let cb = resolve.bind(null, params.callbackState);