Bug 1052343 part.4 Remove nsTextStore::sFlushTIPInputMessage which is no longer used r=emk
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 03 Sep 2014 10:38:20 +0900
changeset 203158 31cd3664ea7d274346f8318939d9c81f0f0c782f
parent 203157 deb6d7d73c932a3ee537f00012e092a5225bb3f0
child 203159 06ba93acf94e6ff7c7562ea2bf7d90588a975668
push id48592
push usermasayuki@d-toybox.com
push dateWed, 03 Sep 2014 01:38:24 +0000
treeherdermozilla-inbound@b364c512840e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemk
bugs1052343
milestone35.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 1052343 part.4 Remove nsTextStore::sFlushTIPInputMessage which is no longer used r=emk
widget/windows/nsTextStore.cpp
widget/windows/nsTextStore.h
--- a/widget/windows/nsTextStore.cpp
+++ b/widget/windows/nsTextStore.cpp
@@ -1160,18 +1160,16 @@ bool nsTextStore::sDoNotReturnNoLayoutEr
   (NS_LITERAL_STRING("ATOK "))
 // NOTE: Free ChangJie 2010 missspells its name...
 #define TIP_NAME_FREE_CHANG_JIE_2010 \
   (NS_LITERAL_STRING("Free CangJie IME 10"))
 #define TIP_NAME_EASY_CHANGJEI \
   (NS_LITERAL_STRING( \
      "\x4E2D\x6587 (\x7E41\x9AD4) - \x6613\x9821\x8F38\x5165\x6CD5"))
 
-UINT nsTextStore::sFlushTIPInputMessage  = 0;
-
 #define TEXTSTORE_DEFAULT_VIEW (1)
 
 nsTextStore::nsTextStore()
   : mLockedContent(mComposition, mSelection)
   , mEditCookie(0)
   , mSinkMask(0)
   , mLock(0)
   , mLockQueued(0)
@@ -1268,28 +1266,16 @@ nsTextStore::Destroy(void)
   if (mComposition.IsComposing()) {
     NS_WARNING("Composition is still alive at destroying the text store");
     CommitCompositionInternal(false);
   }
 
   mLockedContent.Clear();
   mSelection.MarkDirty();
 
-  if (mWidget) {
-    // When blurred, Tablet Input Panel posts "blur" messages
-    // and try to insert text when the message is retrieved later.
-    // But by that time the text store is already destroyed,
-    // so try to get the message early
-    MSG msg;
-    if (WinUtils::PeekMessage(&msg, mWidget->GetWindowHandle(),
-                              sFlushTIPInputMessage, sFlushTIPInputMessage,
-                              PM_REMOVE)) {
-      ::DispatchMessageW(&msg);
-    }
-  }
   mContext = nullptr;
   if (mDocumentMgr) {
     mDocumentMgr->Pop(TF_POPF_ALL);
     mDocumentMgr = nullptr;
   }
   mSink = nullptr;
   mWidget = nullptr;
 
@@ -4617,19 +4603,16 @@ nsTextStore::Initialize()
     Preferences::GetBool("intl.tsf.hack.atok.create_native_caret", true);
   sDoNotReturnNoLayoutErrorToFreeChangJie =
     Preferences::GetBool(
       "intl.tsf.hack.free_chang_jie.do_not_return_no_layout_error", true);
   sDoNotReturnNoLayoutErrorToEasyChangjei =
     Preferences::GetBool(
       "intl.tsf.hack.easy_changjei.do_not_return_no_layout_error", true);
 
-  MOZ_ASSERT(!sFlushTIPInputMessage);
-  sFlushTIPInputMessage = ::RegisterWindowMessageW(L"Flush TIP Input Message");
-
   PR_LOG(sTextStoreLog, PR_LOG_ALWAYS,
     ("TSF:   nsTextStore::Initialize(), sTsfThreadMgr=0x%p, "
      "sTsfClientId=0x%08X, sEnabledTextStore=0x%p, sDisplayAttrMgr=0x%p, "
      "sCategoryMgr=0x%p, sTsfDisabledDocumentMgr=0x%p, sTsfDisabledContext=%p, "
      "sCreateNativeCaretForATOK=%s, "
      "sDoNotReturnNoLayoutErrorToFreeChangJie=%s, "
      "sDoNotReturnNoLayoutErrorToEasyChangjei=%s",
      sTsfThreadMgr, sTsfClientId, sEnabledTextStore, sDisplayAttrMgr,
--- a/widget/windows/nsTextStore.h
+++ b/widget/windows/nsTextStore.h
@@ -757,15 +757,11 @@ protected:
   static ITfContext* sTsfDisabledContext;
 
   static ITfInputProcessorProfiles* sInputProcessorProfiles;
 
   // Enables/Disables hack for specific TIP.
   static bool sCreateNativeCaretForATOK;
   static bool sDoNotReturnNoLayoutErrorToFreeChangJie;
   static bool sDoNotReturnNoLayoutErrorToEasyChangjei;
-
-  // Message the Tablet Input Panel uses to flush text during blurring.
-  // See comments in Destroy
-  static UINT           sFlushTIPInputMessage;
 };
 
 #endif /*NSTEXTSTORE_H_*/