From 3b643538c63fd69d19052decd720e80d5baca0f4 Mon Sep 17 00:00:00 2001 From: "morse%netscape.com" Date: Thu, 8 Mar 2001 22:15:35 +0000 Subject: [PATCH] bug 63961, server can't turn off password manager, r=jelwell@netscape.com, sr=alecf@netscape.com git-svn-id: svn://10.0.0.236/trunk@88991 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/extensions/wallet/src/wallet.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mozilla/extensions/wallet/src/wallet.cpp b/mozilla/extensions/wallet/src/wallet.cpp index 911a65a9ec6..05a35682f7e 100644 --- a/mozilla/extensions/wallet/src/wallet.cpp +++ b/mozilla/extensions/wallet/src/wallet.cpp @@ -3872,6 +3872,21 @@ WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindowInternal* window) { PRBool isText = (type.IsEmpty() || (type.CompareWithConversion("text", PR_TRUE)==0)); PRBool isPassword = (type.CompareWithConversion("password", PR_TRUE)==0); +#define WALLET_DONT_CACHE_ALL_PASSWORDS +#ifdef WALLET_DONT_CACHE_ALL_PASSWORDS + if (isPassword) { + nsAutoString val; + (void) inputElement->GetAttribute(NS_LITERAL_STRING("autocomplete"), val); + if (val.EqualsIgnoreCase("off")) { + isPassword = PR_FALSE; + } else { + (void) formElement->GetAttribute(NS_LITERAL_STRING("autocomplete"), val); + if (val.EqualsIgnoreCase("off")) { + isPassword = PR_FALSE; + } + } + } +#endif #ifdef AutoCapture if (isPassword) { passwordcount++;