From da872ad255b4f3f12f2ed66627fb2f1104475164 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Tue, 17 Feb 2015 11:30:38 +0900 Subject: [PATCH] Bug 1121313 - Part 1. Replace NS_COMPOSITION_CHANGE with NS_COMPOSITION_COMMIT. r=masayuki --- widget/PuppetWidget.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/widget/PuppetWidget.cpp b/widget/PuppetWidget.cpp index f0164f138d0..63fb29790e9 100644 --- a/widget/PuppetWidget.cpp +++ b/widget/PuppetWidget.cpp @@ -402,27 +402,22 @@ PuppetWidget::IMEEndComposition(bool aCancel) #endif nsEventStatus status; - WidgetCompositionEvent compositionChangeEvent(true, NS_COMPOSITION_CHANGE, + WidgetCompositionEvent compositionCommitEvent(true, NS_COMPOSITION_COMMIT, this); - InitEvent(compositionChangeEvent, nullptr); - compositionChangeEvent.mSeqno = mIMELastReceivedSeqno; + InitEvent(compositionCommitEvent, nullptr); // SendEndIMEComposition is always called since ResetInputState // should always be called even if we aren't composing something. if (!mTabChild || !mTabChild->SendEndIMEComposition(aCancel, - &compositionChangeEvent.mData)) { + &compositionCommitEvent.mData)) { return NS_ERROR_FAILURE; } if (!mIMEComposing) return NS_OK; - DispatchEvent(&compositionChangeEvent, status); - - WidgetCompositionEvent compositionEndEvent(true, NS_COMPOSITION_END, this); - InitEvent(compositionEndEvent, nullptr); - compositionEndEvent.mSeqno = mIMELastReceivedSeqno; - DispatchEvent(&compositionEndEvent, status); + compositionCommitEvent.mSeqno = mIMELastReceivedSeqno; + DispatchEvent(&compositionCommitEvent, status); return NS_OK; }