Bug 975383 part.8 Remove unnecesary handler of compositionupdate r=smaug
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -815,17 +815,16 @@ EventStateManager::PreHandleEvent(nsPres
WidgetCompositionEvent* compositionEvent = aEvent->AsCompositionEvent();
WidgetQueryContentEvent selectedText(true, NS_QUERY_SELECTED_TEXT,
compositionEvent->widget);
DoQuerySelectedText(&selectedText);
NS_ASSERTION(selectedText.mSucceeded, "Failed to get selected text");
compositionEvent->data = selectedText.mReply.mString;
}
// through to compositionend handling
- case NS_COMPOSITION_UPDATE:
case NS_COMPOSITION_END:
{
WidgetCompositionEvent* compositionEvent = aEvent->AsCompositionEvent();
if (IsTargetCrossProcess(compositionEvent)) {
// Will not be handled locally, remote the event
if (GetCrossProcessTarget()->SendCompositionEvent(*compositionEvent)) {
// Cancel local dispatching
aEvent->mFlags.mPropagationStopped = true;
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -903,20 +903,18 @@ IMEStateManager::DispatchCompositionEven
GetBoolName(aIsSynthesized)));
MOZ_ASSERT(aEvent->mClass == eCompositionEventClass ||
aEvent->mClass == eTextEventClass);
if (!aEvent->mFlags.mIsTrusted || aEvent->mFlags.mPropagationStopped) {
return;
}
- // Temporarily, let's ignore compositionupdate event from widget.
- if (aEvent->message == NS_COMPOSITION_UPDATE) {
- return;
- }
+ MOZ_ASSERT(aEvent->message != NS_COMPOSITION_UPDATE,
+ "compositionupdate event shouldn't be dispatched manually");
EnsureTextCompositionArray();
WidgetGUIEvent* GUIEvent = aEvent->AsGUIEvent();
nsRefPtr<TextComposition> composition =
sTextCompositions->GetCompositionFor(GUIEvent->widget);
if (!composition) {