From 432f317b32fdb9219739c578e08f103fe71cc30f Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Mon, 3 Oct 2016 18:03:46 +0900 Subject: [PATCH] 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 --- widget/windows/KeyboardLayout.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/widget/windows/KeyboardLayout.cpp b/widget/windows/KeyboardLayout.cpp index 79eae70e8605..1bcb9788be47 100644 --- a/widget/windows/KeyboardLayout.cpp +++ b/widget/windows/KeyboardLayout.cpp @@ -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