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

Unified Diff: content/renderer/render_widget.cc

Issue 2568093003: Support parsing BackgroundSpans and UnderlineSpans in Android IME's commitText() (Closed)
Patch Set: Use addCompositionUnderlines() where I said I couldn't Created 3 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_browsertest.cc » ('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 87b5077572cb4f10271c9e6125afccf0ddff28ca..edc343b425f274115c55eac29621bf23c5d1655f 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1539,9 +1539,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 (!ShouldHandleImeEvents())
return;
@@ -1562,7 +1564,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),
+ 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') | content/renderer/render_widget_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698