summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-26 03:58:39 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-26 03:58:39 +0000
commit5066e8c1c478ae2b5d34ada786b40b229dc3fc3a (patch)
tree20f28c262a327ec95ee83f12df439703813e37dc
parent1ac38a9e6242f8f0c988ac134c7be56eb5e68664 (diff)
downloadchromium_src-5066e8c1c478ae2b5d34ada786b40b229dc3fc3a.zip
chromium_src-5066e8c1c478ae2b5d34ada786b40b229dc3fc3a.tar.gz
chromium_src-5066e8c1c478ae2b5d34ada786b40b229dc3fc3a.tar.bz2
Fix a regression where we send too many IME_CANCEL_COMPOSITION
events back to the browser. This isn't a problem on OSX because we clear the compositon before sending WebCompositionCommandDiscard (hbono even asked about this during the OSX review). BUG=45003 Review URL: http://codereview.chromium.org/2247003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48251 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/renderer/render_widget.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index 9d1af7b..eb2b423c 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -734,9 +734,11 @@ void RenderWidget::OnImeSetComposition(WebCompositionCommand command,
return;
ime_control_busy_ = true;
if (!webwidget_->handleCompositionEvent(command, cursor_position,
- target_start, target_end, ime_string)) {
- // If the composition event can't be handled, let the browser process
- // know so it can update it's state.
+ target_start, target_end, ime_string) &&
+ command == WebKit::WebCompositionCommandSet) {
+ // If the composition event can't be handled while we were trying to update
+ // the composition, let the browser process know so it can update it's
+ // state.
Send(new ViewHostMsg_ImeUpdateStatus(routing_id(), IME_CANCEL_COMPOSITION,
WebRect()));
}