Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1502)

Unified Diff: content/renderer/render_view_impl.cc

Issue 12093068: Adding missing UpdateTextInputState calls after each ime event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 8dde7b7da823272dab6b3713f96a58f10274d5a8..933499561407d552724fd914007375ebc913dd89 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1450,7 +1450,11 @@ void RenderViewImpl::OnUnselect() {
}
void RenderViewImpl::OnSetEditableSelectionOffsets(int start, int end) {
+ DCHECK(!handling_ime_event_);
+ handling_ime_event_ = true;
webview()->setEditableSelectionOffsets(start, end);
+ handling_ime_event_ = false;
+ UpdateTextInputState(DO_NOT_SHOW_IME);
}
void RenderViewImpl::OnSetCompositionFromExistingText(
@@ -1458,13 +1462,21 @@ void RenderViewImpl::OnSetCompositionFromExistingText(
const std::vector<WebKit::WebCompositionUnderline>& underlines) {
if (!webview())
return;
+ DCHECK(!handling_ime_event_);
+ handling_ime_event_ = true;
webview()->setCompositionFromExistingText(start, end, underlines);
+ handling_ime_event_ = false;
+ UpdateTextInputState(DO_NOT_SHOW_IME);
}
void RenderViewImpl::OnExtendSelectionAndDelete(int before, int after) {
if (!webview())
return;
+ DCHECK(!handling_ime_event_);
+ handling_ime_event_ = true;
webview()->extendSelectionAndDelete(before, after);
+ handling_ime_event_ = false;
+ UpdateTextInputState(DO_NOT_SHOW_IME);
}
void RenderViewImpl::OnSelectRange(const gfx::Point& start,
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ImeTest.java ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698