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

Unified Diff: content/renderer/render_widget.cc

Issue 8227018: mac: Almost fix Lion accented character bubble input in web contents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whoopsies Created 9 years, 2 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_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index e4d75c0cd215d80c1b846121f808e397cb31bef6..1e608aff31d4781e3ab81d7cb17c684b69c11271 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1126,9 +1126,17 @@ void RenderWidget::OnImeSetComposition(
}
}
-void RenderWidget::OnImeConfirmComposition(const string16& text) {
- if (webwidget_)
+void RenderWidget::OnImeConfirmComposition(
+ const string16& text, const ui::Range& replacement_range) {
+ if (webwidget_) {
+ // TODO(thakis): Uncomment this once
+ // https://bugs.webkit.org/show_bug.cgi?id=69846 has landed.
jamesr 2011/10/12 00:34:51 A better way to do this is to guard this code with
+ // if (replacement_range.IsValid()) {
+ // webwidget_->setSelectionOnFocusedFrame(replacement_range.start(),
+ // replacement_range.end());
+ // }
webwidget_->confirmComposition(text);
+ }
// Send an updated IME range with just the caret range.
ui::Range range(ui::Range::InvalidRange());
size_t location, length;

Powered by Google App Engine
This is Rietveld 408576698