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

Unified Diff: content/renderer/render_widget.cc

Issue 2568093003: Support parsing BackgroundSpans and UnderlineSpans in Android IME's commitText() (Closed)
Patch Set: Don't try to add default underline for commitText(), attempt to fix Mac builds Created 4 years 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | third_party/WebKit/Source/core/editing/InputMethodController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index e47f7f661395de1b053f167b9ce502f19915730a..5bba2ac9163811f808c8f83a09192b6052fd8fd2 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1530,9 +1530,11 @@ void RenderWidget::OnImeSetComposition(
UpdateCompositionInfo(false /* not an immediate request */);
}
-void RenderWidget::OnImeCommitText(const base::string16& text,
- const gfx::Range& replacement_range,
- int relative_cursor_pos) {
+void RenderWidget::OnImeCommitText(
+ const base::string16& text,
+ const std::vector<WebCompositionUnderline>& underlines,
+ const gfx::Range& replacement_range,
+ int relative_cursor_pos) {
#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_) {
focused_pepper_plugin_->render_frame()->OnImeCommitText(
@@ -1550,7 +1552,8 @@ void RenderWidget::OnImeCommitText(const base::string16& text,
ImeEventGuard guard(this);
input_handler_->set_handling_input_event(true);
if (auto* controller = GetInputMethodController())
- controller->commitText(text, relative_cursor_pos);
+ controller->commitText(text, WebVector<WebCompositionUnderline>(underlines),
dcheng 2016/12/15 10:13:17 I think the explicit call to WebVector is usually
+ relative_cursor_pos);
input_handler_->set_handling_input_event(false);
UpdateCompositionInfo(false /* not an immediate request */);
}
« no previous file with comments | « content/renderer/render_widget.h ('k') | third_party/WebKit/Source/core/editing/InputMethodController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698