Bug 1377653 - part1: Get rid of WidgetKeyboardEvent::mInputMethodAppState r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 01 Jul 2017 16:19:40 +0900
changeset 367377 308c1f2050b734b66339ad7bdc7e066696a5eaf7
parent 367376 d3964f81fbd41c20f261a001906668fa12810fb7
child 367378 13dbbebe646ac205115b5544be44ac6f983f3646
push id32134
push userkwierso@gmail.com
push dateWed, 05 Jul 2017 23:45:30 +0000
treeherdermozilla-central@e25d645e59ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1377653
milestone56.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 1377653 - part1: Get rid of WidgetKeyboardEvent::mInputMethodAppState r=smaug WidgetKeyboardEvent::mInputMethodAppState was used by B2G for managing keyboard event propagation state between chrome process and IME process. Therefore, we can remove it now. MozReview-Commit-ID: 7BwvzE8VjIR
widget/TextEvents.h
widget/nsGUIEventIPC.h
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -147,17 +147,16 @@ protected:
     , mAccessKeyForwardedToChild(false)
     , mUniqueId(0)
 #ifdef XP_MACOSX
     , mNativeModifierFlags(0)
     , mNativeKeyCode(0)
 #endif // #ifdef XP_MACOSX
     , mKeyNameIndex(KEY_NAME_INDEX_Unidentified)
     , mCodeNameIndex(CODE_NAME_INDEX_UNKNOWN)
-    , mInputMethodAppState(eNotHandled)
     , mIsRepeat(false)
     , mIsComposing(false)
     , mIsReserved(false)
     , mIsSynthesizedByTIP(false)
     , mEditCommandsForSingleLineEditorInitialized(false)
     , mEditCommandsForMultiLineEditorInitialized(false)
     , mEditCommandsForRichTextEditorInitialized(false)
   {
@@ -178,17 +177,16 @@ public:
     , mAccessKeyForwardedToChild(false)
     , mUniqueId(0)
 #ifdef XP_MACOSX
     , mNativeModifierFlags(0)
     , mNativeKeyCode(0)
 #endif // #ifdef XP_MACOSX
     , mKeyNameIndex(KEY_NAME_INDEX_Unidentified)
     , mCodeNameIndex(CODE_NAME_INDEX_UNKNOWN)
-    , mInputMethodAppState(eNotHandled)
     , mIsRepeat(false)
     , mIsComposing(false)
     , mIsReserved(false)
     , mIsSynthesizedByTIP(false)
     , mEditCommandsForSingleLineEditorInitialized(false)
     , mEditCommandsForMultiLineEditorInitialized(false)
     , mEditCommandsForRichTextEditorInitialized(false)
   {
@@ -285,25 +283,16 @@ public:
   uint32_t mNativeModifierFlags;
   uint16_t mNativeKeyCode;
 #endif // #ifdef XP_MACOSX
 
   // DOM KeyboardEvent.key
   KeyNameIndex mKeyNameIndex;
   // DOM KeyboardEvent.code
   CodeNameIndex mCodeNameIndex;
-  // Indicates that the event is being handled by input method app
-  typedef uint8_t InputMethodAppStateType;
-  enum InputMethodAppState : InputMethodAppStateType
-  {
-    eNotHandled, // not yet handled by intput method app
-    eHandling,   // being handled by intput method app
-    eHandled     // handled by input method app
-  };
-  InputMethodAppState mInputMethodAppState;
 
   // Indicates whether the event is generated by auto repeat or not.
   // if this is keyup event, always false.
   bool mIsRepeat;
   // Indicates whether the event is generated during IME (or deadkey)
   // composition.  This is initialized by EventStateManager.  So, key event
   // dispatchers don't need to initialize this.
   bool mIsComposing;
@@ -508,17 +497,16 @@ public:
 #ifdef XP_MACOSX
     mNativeKeyCode = aEvent.mNativeKeyCode;
     mNativeModifierFlags = aEvent.mNativeModifierFlags;
     mNativeCharacters.Assign(aEvent.mNativeCharacters);
     mNativeCharactersIgnoringModifiers.
       Assign(aEvent.mNativeCharactersIgnoringModifiers);
     mPluginTextEventString.Assign(aEvent.mPluginTextEventString);
 #endif
-    mInputMethodAppState = aEvent.mInputMethodAppState;
     mIsSynthesizedByTIP = aEvent.mIsSynthesizedByTIP;
 
     // Don't copy mEditCommandsFor*Editor because it may require a lot of
     // memory space.  For example, if the event is dispatched but grabbed by
     // a JS variable, they are not necessary anymore.
 
     mEditCommandsForSingleLineEditorInitialized =
       aEvent.mEditCommandsForSingleLineEditorInitialized;
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -441,19 +441,16 @@ struct ParamTraits<mozilla::WidgetKeyboa
     WriteParam(aMsg, aParam.mPseudoCharCode);
     WriteParam(aMsg, aParam.mAlternativeCharCodes);
     WriteParam(aMsg, aParam.mIsRepeat);
     WriteParam(aMsg, aParam.mIsReserved);
     WriteParam(aMsg, aParam.mAccessKeyForwardedToChild);
     WriteParam(aMsg, aParam.mLocation);
     WriteParam(aMsg, aParam.mUniqueId);
     WriteParam(aMsg, aParam.mIsSynthesizedByTIP);
-    WriteParam(aMsg,
-               static_cast<paramType::InputMethodAppStateType>
-                 (aParam.mInputMethodAppState));
 #ifdef XP_MACOSX
     WriteParam(aMsg, aParam.mNativeKeyCode);
     WriteParam(aMsg, aParam.mNativeModifierFlags);
     WriteParam(aMsg, aParam.mNativeCharacters);
     WriteParam(aMsg, aParam.mNativeCharactersIgnoringModifiers);
     WriteParam(aMsg, aParam.mPluginTextEventString);
 #endif
 
@@ -467,34 +464,32 @@ struct ParamTraits<mozilla::WidgetKeyboa
     WriteParam(aMsg, aParam.mEditCommandsForMultiLineEditorInitialized);
     WriteParam(aMsg, aParam.mEditCommandsForRichTextEditorInitialized);
   }
 
   static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
   {
     mozilla::KeyNameIndexType keyNameIndex = 0;
     mozilla::CodeNameIndexType codeNameIndex = 0;
-    paramType::InputMethodAppStateType inputMethodAppState = 0;
     if (ReadParam(aMsg, aIter,
                   static_cast<mozilla::WidgetInputEvent*>(aResult)) &&
         ReadParam(aMsg, aIter, &keyNameIndex) &&
         ReadParam(aMsg, aIter, &codeNameIndex) &&
         ReadParam(aMsg, aIter, &aResult->mKeyValue) &&
         ReadParam(aMsg, aIter, &aResult->mCodeValue) &&
         ReadParam(aMsg, aIter, &aResult->mKeyCode) &&
         ReadParam(aMsg, aIter, &aResult->mCharCode) &&
         ReadParam(aMsg, aIter, &aResult->mPseudoCharCode) &&
         ReadParam(aMsg, aIter, &aResult->mAlternativeCharCodes) &&
         ReadParam(aMsg, aIter, &aResult->mIsRepeat) &&
         ReadParam(aMsg, aIter, &aResult->mIsReserved) &&
         ReadParam(aMsg, aIter, &aResult->mAccessKeyForwardedToChild) &&
         ReadParam(aMsg, aIter, &aResult->mLocation) &&
         ReadParam(aMsg, aIter, &aResult->mUniqueId) &&
         ReadParam(aMsg, aIter, &aResult->mIsSynthesizedByTIP) &&
-        ReadParam(aMsg, aIter, &inputMethodAppState) &&
 #ifdef XP_MACOSX
         ReadParam(aMsg, aIter, &aResult->mNativeKeyCode) &&
         ReadParam(aMsg, aIter, &aResult->mNativeModifierFlags) &&
         ReadParam(aMsg, aIter, &aResult->mNativeCharacters) &&
         ReadParam(aMsg, aIter, &aResult->mNativeCharactersIgnoringModifiers) &&
         ReadParam(aMsg, aIter, &aResult->mPluginTextEventString) &&
 #endif
         ReadParam(aMsg, aIter, &aResult->mEditCommandsForSingleLineEditor) &&
@@ -505,18 +500,16 @@ struct ParamTraits<mozilla::WidgetKeyboa
         ReadParam(aMsg, aIter,
                   &aResult->mEditCommandsForMultiLineEditorInitialized) &&
         ReadParam(aMsg, aIter,
                   &aResult->mEditCommandsForRichTextEditorInitialized)) {
       aResult->mKeyNameIndex = static_cast<mozilla::KeyNameIndex>(keyNameIndex);
       aResult->mCodeNameIndex =
         static_cast<mozilla::CodeNameIndex>(codeNameIndex);
       aResult->mNativeKeyEvent = nullptr;
-      aResult->mInputMethodAppState =
-        static_cast<paramType::InputMethodAppState>(inputMethodAppState);
       return true;
     }
     return false;
   }
 };
 
 template<>
 struct ParamTraits<mozilla::TextRangeStyle>