Bug 689349 - Don't suggest values for password text boxes (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 28 Sep 2011 17:50:19 +0100
changeset 77759 638433a972a31d82060b30cb45db3a3e69f11fae
parent 77758 fd799dc8611637c60143d5b1bf6a98d4c2bd071e
child 77760 b626aecfddf79d6d3333b19f625f3d6514d5b602
push id2234
push userlrocha@mozilla.com
push dateWed, 28 Sep 2011 16:51:33 +0000
treeherdermozilla-inbound@638433a972a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs689349
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 689349 - Don't suggest values for password text boxes (r=mfinkle)
mobile/chrome/content/forms.js
--- a/mobile/chrome/content/forms.js
+++ b/mobile/chrome/content/forms.js
@@ -541,16 +541,19 @@ FormAssistant.prototype = {
            (aElement instanceof HTMLInputElement ||
             aElement instanceof HTMLTextAreaElement ||
             aElement instanceof HTMLSelectElement ||
             aElement instanceof HTMLButtonElement);
   },
 
   _isAutocomplete: function formHelperIsAutocomplete(aElement) {
     if (aElement instanceof HTMLInputElement) {
+      if (aElement.getAttribute("type") == "password")
+        return false;
+
       let autocomplete = aElement.getAttribute("autocomplete");
       let allowedValues = ["off", "false", "disabled"];
       if (allowedValues.indexOf(autocomplete) == -1)
         return true;
     }
 
     return false;
   },