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

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: Adding the missing selection values to EditorInfo Created 7 years, 11 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 faa04ba4181f24b31c9c136f8b912f6903604782..50ec1255dd002fe198fc7e8ab127000ebb545a04 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1421,7 +1421,10 @@ void RenderViewImpl::OnUnselect() {
}
void RenderViewImpl::OnSetEditableSelectionOffsets(int start, int end) {
+ handling_ime_event_ = true;
jamesr 2013/02/01 00:22:10 What does this do? I can't find any code that cons
aurimas (slooooooooow) 2013/02/01 00:30:03 This is used in RenderWidget::UpdateTextInputState
webview()->setEditableSelectionOffsets(start, end);
+ handling_ime_event_ = false;
+ UpdateTextInputState(DO_NOT_SHOW_IME);
}
void RenderViewImpl::OnSetCompositionFromExistingText(
@@ -1429,13 +1432,19 @@ void RenderViewImpl::OnSetCompositionFromExistingText(
const std::vector<WebKit::WebCompositionUnderline>& underlines) {
if (!webview())
return;
+ 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;
+ handling_ime_event_ = true;
webview()->extendSelectionAndDelete(before, after);
+ handling_ime_event_ = false;
+ UpdateTextInputState(DO_NOT_SHOW_IME);
}
void RenderViewImpl::OnSelectRange(const gfx::Point& start,

Powered by Google App Engine
This is Rietveld 408576698