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 208527 84a46c657337e3539f229f13a3aa3ce8509bb670
parent 208526 f784b7a2d71804c03c32a15516b7df6ec2f555a4
child 208528 e9da63e6046bae7124688bcb2dc0d4a76c936874
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerssmichaud
bugs975383
milestone35.0a1
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();
 }