Bug 841507 - Mask events when removing composition; r=cpeterson
authorJim Chen <nchen@mozilla.com>
Mon, 18 Feb 2013 14:06:04 -0500
changeset 122251 3bd8f038263de01b208f4e320634c4b71e7ac965
parent 122250 2eec9cb2be86a86473208b8f74ff88ddb7af99ae
child 122252 162a860a2b39a3c76bed87561dcf9520e77dabfc
push id24327
push usergszorc@mozilla.com
push dateTue, 19 Feb 2013 05:22:32 +0000
treeherdermozilla-central@e8f8a3f6f1f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpeterson
bugs841507
milestone21.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 841507 - Mask events when removing composition; r=cpeterson
widget/android/nsWindow.cpp
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1954,16 +1954,25 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *
 #endif // DEBUG_ANDROID_IME
 
             DispatchEvent(&event);
             mIMERanges.Clear();
         }
         break;
     case AndroidGeckoEvent::IME_REMOVE_COMPOSITION:
         {
+            /*
+             *  Remove any previous composition.  This is only used for
+             *    visual indication and does not affect the text content.
+             *
+             *  Selection and text updates are masked so the result of
+             *    temporary events are not passed on to Java
+             */
+            AutoIMEMask selMask(mIMEMaskSelectionUpdate);
+            AutoIMEMask textMask(mIMEMaskTextUpdate);
             RemoveIMEComposition();
             mIMERanges.Clear();
         }
         break;
     }
 }
 
 nsWindow *