Bug 1307112 part.3 NativeKey::IsFollowedByNonControlCharMessage() should return true when one of following char messages is a printable char message r=m_kato

Currently, NativeKey::IsFollowedByNonControlCharMessage() returns true only when the first char message is a printable char message.  Although, I don't know actual cases coming printable WM_CHAR message after non-printable char message, i.e.,

1. WM_SYSCHAR or WM_DEADCHAR
2. WM_CHAR for a printable character

or

1. WM_CHAR with a non-printable character (a control character)
2. WM_CHAR with a printable character

, we should make it return true because when one or more characters are being inputted, we should ignore non-printable char messages and handle printable char messages in the path handling text input.

MozReview-Commit-ID: 1v7v5mCRFCP

--HG--
extra : rebase_source : f82f7b77376450168bad34be031164ecf7338621
This commit is contained in:
Masayuki Nakano 2016-10-03 18:03:46 +09:00
Родитель b8a5c9fef9
Коммит 432f317b32
1 изменённых файлов: 5 добавлений и 3 удалений

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

@ -1661,10 +1661,12 @@ NativeKey::IsFollowedByDeadCharMessage() const
bool
NativeKey::IsFollowedByNonControlCharMessage() const
{
if (mFollowingCharMsgs.IsEmpty()) {
return false;
for (size_t i = 0; i < mFollowingCharMsgs.Length(); ++i) {
if (IsPrintableCharMessage(mFollowingCharMsgs[i])) {
return true;
}
return IsPrintableCharMessage(mFollowingCharMsgs[0]);
}
return false;
}
bool