Bug 806142 - Only hide password characters if the text editor is (still) a password editor. r=ehsan

This commit is contained in:
Chris Peterson 2012-11-06 10:45:58 -08:00
parent 6a161afd5e
commit 7ff53c9300

View File

@ -1227,8 +1227,13 @@ nsTextEditRules::RemoveIMETextFromPWBuf(int32_t &aStart, nsAString *aIMEString)
mPasswordIMEText.Assign(*aIMEString);
}
NS_IMETHODIMP nsTextEditRules::Notify(class nsITimer *) {
nsresult res = HideLastPWInput();
NS_IMETHODIMP nsTextEditRules::Notify(nsITimer *)
{
MOZ_ASSERT(mTimer);
// Check whether our text editor's password flag was changed before this
// "hide password character" timer actually fires.
nsresult res = IsPasswordEditor() ? HideLastPWInput() : NS_OK;
ASSERT_PASSWORD_LENGTHS_EQUAL();
mLastLength = 0;
return res;