Backed out changeset 6918dea06b7b (bug 1400147) for causing various form autofill heuristics xpcshell failures on Beta 57.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 20 Sep 2017 21:52:23 -0400
changeset 668157 540d10078b32f3f2426dc208df2fd710bb5c7ca1
parent 668156 45b6bcd4422245ded71191437fb4018e895ad178
child 668158 6169cd08ca7d5912648e2f640d17d556355eb7a8
push id80945
push usernnethercote@mozilla.com
push dateThu, 21 Sep 2017 07:22:53 +0000
bugs1400147
milestone57.0a1
backs out6918dea06b7bfb2bd6d26da1640cd0a0d6da341c
Backed out changeset 6918dea06b7b (bug 1400147) for causing various form autofill heuristics xpcshell failures on Beta 57.
browser/extensions/formautofill/FormAutofillHeuristics.jsm
--- a/browser/extensions/formautofill/FormAutofillHeuristics.jsm
+++ b/browser/extensions/formautofill/FormAutofillHeuristics.jsm
@@ -471,33 +471,16 @@ this.FormAutofillHeuristics = {
       "cc-name",
       "cc-number",
       "cc-exp-month",
       "cc-exp-year",
       "cc-exp",
     ];
     let regexps = isAutoCompleteOff ? FIELDNAMES_IGNORING_AUTOCOMPLETE_OFF : Object.keys(this.RULES);
 
-    if (!FormAutofillUtils.isAutofillCreditCardsAvailable) {
-      if (isAutoCompleteOff) {
-        if (!this._regexpListOf_CcUnavailable_AcOff) {
-          this._regexpListOf_CcUnavailable_AcOff = regexps.filter(name => !FormAutofillUtils.isCreditCardField(name));
-        }
-        regexps = this._regexpListOf_CcUnavailable_AcOff;
-      } else {
-        if (!this._regexpListOf_CcUnavailable_AcOn) {
-          this._regexpListOf_CcUnavailable_AcOn = regexps.filter(name => !FormAutofillUtils.isCreditCardField(name));
-        }
-        regexps = this._regexpListOf_CcUnavailable_AcOn;
-      }
-    }
-    if (regexps.length == 0) {
-      return null;
-    }
-
     let labelStrings;
     let getElementStrings = {};
     getElementStrings[Symbol.iterator] = function* () {
       yield element.id;
       yield element.name;
       if (!labelStrings) {
         labelStrings = [];
         let labels = LabelUtils.findLabelElements(element);