Bug 1052343 part.4 Remove nsTextStore::sFlushTIPInputMessage which is no longer used r=emk
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 02 Sep 2014 09:27:25 +0900
changeset 202839 ea981f4abf43fb6f54ba79d5343d1c9a034d236a
parent 202838 f9e2e2b2b065c5f49dea5419e9c87e11d575ca28
child 202840 5a27019cb71c7e688650112a6da4514fbe319664
push id48511
push usermasayuki@d-toybox.com
push dateTue, 02 Sep 2014 00:27:30 +0000
treeherdermozilla-inbound@7b7c24a989fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemk
bugs1052343
milestone34.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_*/