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
Родитель af490f020d
Коммит 5a7e488ec1
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -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;