Bug 975383 part.3 Remove compositionupdate dispatchers in TextInputHandler of Cocoa r=smichaud
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 03 Oct 2014 15:33:48 +0900
changeset 231742 84a46c657337e3539f229f13a3aa3ce8509bb670
parent 231741 f784b7a2d71804c03c32a15516b7df6ec2f555a4
child 231743 e9da63e6046bae7124688bcb2dc0d4a76c936874
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs975383
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 975383 part.3 Remove compositionupdate dispatchers in TextInputHandler of Cocoa r=smichaud
widget/cocoa/TextInputHandler.mm
--- a/widget/cocoa/TextInputHandler.mm
+++ b/widget/cocoa/TextInputHandler.mm
@@ -2717,35 +2717,17 @@ IMEInputHandler::DispatchTextEvent(const
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
   WidgetTextEvent textEvent(true, NS_TEXT_TEXT, mWidget);
   textEvent.time = PR_IntervalNow();
   textEvent.theText = aText;
   if (!aDoCommit) {
     textEvent.mRanges = CreateTextRangeArray(aAttrString, aSelectedRange);
   }
-
-  if (textEvent.theText != mLastDispatchedCompositionString) {
-    WidgetCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
-                                             mWidget);
-    compositionUpdate.time = textEvent.time;
-    compositionUpdate.data = textEvent.theText;
-    mLastDispatchedCompositionString = textEvent.theText;
-    DispatchEvent(compositionUpdate);
-    if (mIsInFocusProcessing || Destroyed()) {
-      PR_LOG(gLog, PR_LOG_ALWAYS,
-        ("%p IMEInputHandler::DispatchTextEvent, compositionupdate causes "
-         "aborting the composition, mIsInFocusProcessing=%s, Destryoed()=%s",
-         this, TrueOrFalse(mIsInFocusProcessing), TrueOrFalse(Destroyed())));
-      if (Destroyed()) {
-        return true;
-      }
-    }
-  }
-
+  mLastDispatchedCompositionString = textEvent.theText;
   return DispatchEvent(textEvent);
 }
 
 void
 IMEInputHandler::InitCompositionEvent(WidgetCompositionEvent& aCompositionEvent)
 {
   aCompositionEvent.time = PR_IntervalNow();
 }