Bug 975383 part.5 Remove compositionupdate dispatchers in nsIMM32Handler of Windows r=emk
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 03 Oct 2014 15:33:49 +0900
changeset 231744 7c64942d1d41d079485a2349b72abda7bdc5aaeb
parent 231743 e9da63e6046bae7124688bcb2dc0d4a76c936874
child 231745 432ecdbf058a8ea649a283f0cd22f9b39bee54ec
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)
reviewersemk
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.5 Remove compositionupdate dispatchers in nsIMM32Handler of Windows r=emk
widget/windows/nsIMM32Handler.cpp
--- a/widget/windows/nsIMM32Handler.cpp
+++ b/widget/windows/nsIMM32Handler.cpp
@@ -1585,40 +1585,25 @@ nsIMM32Handler::DispatchTextEvent(nsWind
     SetIMERelatedWindowsPos(aWindow, aIMEContext);
     return;
   }
 
   nsRefPtr<nsWindow> kungFuDeathGrip(aWindow);
 
   nsIntPoint point(0, 0);
 
-  if (mCompositionString != mLastDispatchedCompositionString) {
-    WidgetCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
-                                             aWindow);
-    aWindow->InitEvent(compositionUpdate, &point);
-    compositionUpdate.data = mCompositionString;
-    mLastDispatchedCompositionString = mCompositionString;
-
-    aWindow->DispatchWindowEvent(&compositionUpdate);
-
-    if (!mIsComposing || aWindow->Destroyed()) {
-      return;
-    }
-    SetIMERelatedWindowsPos(aWindow, aIMEContext);
-  }
-
   WidgetTextEvent event(true, NS_TEXT_TEXT, aWindow);
 
   aWindow->InitEvent(event, &point);
 
   if (aCheckAttr) {
     event.mRanges = CreateTextRangeArray();
   }
 
-  event.theText = mCompositionString.get();
+  event.theText = mLastDispatchedCompositionString = mCompositionString;
 
   aWindow->DispatchWindowEvent(&event);
 
   // Calling SetIMERelatedWindowsPos will be failure on e10s at this point.
   // text event will notify NOTIFY_IME_OF_COMPOSITION_UPDATE, then
   // it will call SetIMERelatedWindowsPos.
 }