Bug 975383 part.3 Remove compositionupdate dispatchers in TextInputHandler of Cocoa r=smichaud
--- 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();
}