Bug 1377006 - Part 2: Add disableHighlight option in formautofill doorhanger. r=lchang, r=MattN, a=gchang
authorsteveck-chung <schung@mozilla.com>
Thu, 27 Jul 2017 18:11:12 +0800
changeset 421652 47dcb670f8ca
parent 421651 8dcbff75d8f1
child 421653 1b63df5a180b
push id7735
push userryanvm@gmail.com
push dateMon, 11 Sep 2017 14:54:08 +0000
treeherdermozilla-beta@47dcb670f8ca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslchang, MattN, gchang
bugs1377006
milestone56.0
Bug 1377006 - Part 2: Add disableHighlight option in formautofill doorhanger. r=lchang, r=MattN, a=gchang MozReview-Commit-ID: 3UkSIUeM0oK
browser/extensions/formautofill/FormAutofillDoorhanger.jsm
--- a/browser/extensions/formautofill/FormAutofillDoorhanger.jsm
+++ b/browser/extensions/formautofill/FormAutofillDoorhanger.jsm
@@ -40,16 +40,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");
         },
@@ -105,19 +106,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);