mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
fixed bug 13810 by removing an extraneous check for empty string. empty strings are perfectly legal
in WillInsertText
This commit is contained in:
parent
673ff30a88
commit
e52e18ffbf
@ -282,21 +282,17 @@ nsTextEditRules::WillInsertText(nsIDOMSelection *aSelection,
|
||||
res = TruncateInsertionIfNeeded(aSelection, aInString, aOutString, aMaxLength);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
if (aOutString->Length())
|
||||
// handle password field docs
|
||||
if (mFlags & nsIHTMLEditor::eEditorPasswordMask)
|
||||
{
|
||||
|
||||
// handle password field docs
|
||||
if (mFlags & nsIHTMLEditor::eEditorPasswordMask)
|
||||
{
|
||||
res = EchoInsertionToPWBuff(aSelection, aOutString);
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
|
||||
// do text insertion
|
||||
PRBool bCancel;
|
||||
res = DoTextInsertion(aSelection, &bCancel, aTxn, aOutString, aTypeInState);
|
||||
res = EchoInsertionToPWBuff(aSelection, aOutString);
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
|
||||
// do text insertion
|
||||
PRBool bCancel;
|
||||
res = DoTextInsertion(aSelection, &bCancel, aTxn, aOutString, aTypeInState);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -282,21 +282,17 @@ nsTextEditRules::WillInsertText(nsIDOMSelection *aSelection,
|
||||
res = TruncateInsertionIfNeeded(aSelection, aInString, aOutString, aMaxLength);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
if (aOutString->Length())
|
||||
// handle password field docs
|
||||
if (mFlags & nsIHTMLEditor::eEditorPasswordMask)
|
||||
{
|
||||
|
||||
// handle password field docs
|
||||
if (mFlags & nsIHTMLEditor::eEditorPasswordMask)
|
||||
{
|
||||
res = EchoInsertionToPWBuff(aSelection, aOutString);
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
|
||||
// do text insertion
|
||||
PRBool bCancel;
|
||||
res = DoTextInsertion(aSelection, &bCancel, aTxn, aOutString, aTypeInState);
|
||||
res = EchoInsertionToPWBuff(aSelection, aOutString);
|
||||
if (NS_FAILED(res)) return res;
|
||||
}
|
||||
|
||||
// do text insertion
|
||||
PRBool bCancel;
|
||||
res = DoTextInsertion(aSelection, &bCancel, aTxn, aOutString, aTypeInState);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user