Bug 1307112 part.4 Rename NativeKey::IsFollowedByNonControlCharMessage() to IsFollowedByPrintableCharMessage() r=m_kato
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 03 Oct 2016 18:07:33 +0900
changeset 316878 a041e03e326859f84aa68dac9541b1890d8e2722
parent 316877 475d07b93930b5a85e92bee20eb2e8a43d55c1c9
child 316879 38f802fc35a0944031248d677b60e67c3adc8d78
push id32935
push usermasayuki@d-toybox.com
push dateFri, 07 Oct 2016 05:19:38 +0000
treeherderautoland@1de5e07bed66 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm_kato
bugs1307112
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1307112 part.4 Rename NativeKey::IsFollowedByNonControlCharMessage() to IsFollowedByPrintableCharMessage() r=m_kato For consistency with IsPrintableCharMessage(), IsFollowedByNonControlCharMessage() should be renamed to IsFollowedByPrintableCharMessage(). MozReview-Commit-ID: CBJFPO4FZej
widget/windows/KeyboardLayout.cpp
widget/windows/KeyboardLayout.h
--- a/widget/windows/KeyboardLayout.cpp
+++ b/widget/windows/KeyboardLayout.cpp
@@ -1454,19 +1454,19 @@ NativeKey::InitWithKeyChar()
     mVirtualKeyCode = mOriginalVirtualKeyCode;
   }
 
   KeyboardLayout* keyboardLayout = KeyboardLayout::GetInstance();
   mDOMKeyCode =
     keyboardLayout->ConvertNativeKeyCodeToDOMKeyCode(mOriginalVirtualKeyCode);
   // Be aware, keyboard utilities can change non-printable keys to printable
   // keys.  In such case, we should make the key value as a printable key.
-  // FYI: IsFollowedByNonControlCharMessage() returns true only when it's
+  // FYI: IsFollowedByPrintableCharMessage() returns true only when it's
   //      handling a keydown message.
-  mKeyNameIndex = IsFollowedByNonControlCharMessage() ?
+  mKeyNameIndex = IsFollowedByPrintableCharMessage() ?
     KEY_NAME_INDEX_USE_STRING :
     keyboardLayout->ConvertNativeKeyCodeToKeyNameIndex(mOriginalVirtualKeyCode);
   mCodeNameIndex =
     KeyboardLayout::ConvertScanCodeToCodeNameIndex(
       GetScanCodeWithExtendedFlag());
 
   // If next message of WM_(SYS)KEYDOWN is WM_*CHAR message and the key
   // combination is not reserved by the system, let's consume it now.
@@ -1654,17 +1654,17 @@ NativeKey::IsFollowedByDeadCharMessage()
 {
   if (mFollowingCharMsgs.IsEmpty()) {
     return false;
   }
   return IsDeadCharMessage(mFollowingCharMsgs[0]);
 }
 
 bool
-NativeKey::IsFollowedByNonControlCharMessage() const
+NativeKey::IsFollowedByPrintableCharMessage() const
 {
   for (size_t i = 0; i < mFollowingCharMsgs.Length(); ++i) {
     if (IsPrintableCharMessage(mFollowingCharMsgs[i])) {
       return true;
     }
   }
   return false;
 }
@@ -2792,17 +2792,17 @@ NativeKey::NeedsToHandleWithoutFollowing
   // whole following char messages.
   if (mCommittedCharsAndModifiers.mLength > 1) {
     return true;
   }
 
   // If keydown message is followed by WM_CHAR whose wParam isn't a control
   // character, we should dispatch keypress event with the char message
   // even with any modifier state.
-  if (IsFollowedByNonControlCharMessage()) {
+  if (IsFollowedByPrintableCharMessage()) {
     return false;
   }
 
   // If any modifier keys which may cause printable keys becoming non-printable
   // are not pressed, we don't need special handling for the key.
   if (!mModKeyState.IsControl() && !mModKeyState.IsAlt() &&
       !mModKeyState.IsWin()) {
     return false;
--- a/widget/windows/KeyboardLayout.h
+++ b/widget/windows/KeyboardLayout.h
@@ -461,17 +461,17 @@ private:
   {
     return IsSysCharMessage(aMSG.message);
   }
   bool IsSysCharMessage(UINT aMessage) const
   {
     return (aMessage == WM_SYSCHAR || aMessage == WM_SYSDEADCHAR);
   }
   bool MayBeSameCharMessage(const MSG& aCharMsg1, const MSG& aCharMsg2) const;
-  bool IsFollowedByNonControlCharMessage() const;
+  bool IsFollowedByPrintableCharMessage() const;
   bool IsFollowedByDeadCharMessage() const;
   bool IsKeyMessageOnPlugin() const
   {
     return (mMsg.message == MOZ_WM_KEYDOWN ||
             mMsg.message == MOZ_WM_KEYUP);
   }
   bool IsPrintableCharMessage(const MSG& aMSG) const
   {