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/browser/renderer_host/ime_adapter_android.cc

Issue 2611813002: Add support for persisting CompositionUnderlines in InputMethodController (Closed)
Patch Set: Try one more time Created 3 years, 12 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/browser/renderer_host/ime_adapter_android.cc
diff --git a/content/browser/renderer_host/ime_adapter_android.cc b/content/browser/renderer_host/ime_adapter_android.cc
index 3a7d18b94da7ce41b8a4981e98e7d87b3eda70cc..25efda144f19426440a270947d3e07c86ed9bf36 100644
--- a/content/browser/renderer_host/ime_adapter_android.cc
+++ b/content/browser/renderer_host/ime_adapter_android.cc
@@ -80,12 +80,10 @@ void AppendBackgroundColorSpan(JNIEnv*,
std::vector<blink::WebCompositionUnderline>* underlines =
reinterpret_cast<std::vector<blink::WebCompositionUnderline>*>(
underlines_ptr);
- underlines->push_back(
- blink::WebCompositionUnderline(static_cast<unsigned>(start),
- static_cast<unsigned>(end),
- SK_ColorTRANSPARENT,
- false,
- static_cast<unsigned>(background_color)));
+ underlines->push_back(blink::WebCompositionUnderline(
+ static_cast<unsigned>(start), static_cast<unsigned>(end),
+ SK_ColorTRANSPARENT, false, static_cast<unsigned>(background_color),
+ false));
}
// Callback from Java to convert UnderlineSpan data to a
@@ -100,12 +98,9 @@ void AppendUnderlineSpan(JNIEnv*,
std::vector<blink::WebCompositionUnderline>* underlines =
reinterpret_cast<std::vector<blink::WebCompositionUnderline>*>(
underlines_ptr);
- underlines->push_back(
- blink::WebCompositionUnderline(static_cast<unsigned>(start),
- static_cast<unsigned>(end),
- SK_ColorBLACK,
- false,
- SK_ColorTRANSPARENT));
+ underlines->push_back(blink::WebCompositionUnderline(
+ static_cast<unsigned>(start), static_cast<unsigned>(end), SK_ColorBLACK,
+ false, SK_ColorTRANSPARENT, false));
}
ImeAdapterAndroid::ImeAdapterAndroid(RenderWidgetHostViewAndroid* rwhva)
@@ -154,7 +149,7 @@ void ImeAdapterAndroid::SetComposingText(JNIEnv* env,
// Default to plain underline if we didn't find any span that we care about.
if (underlines.empty()) {
underlines.push_back(blink::WebCompositionUnderline(
- 0, text16.length(), SK_ColorBLACK, false, SK_ColorTRANSPARENT));
+ 0, text16.length(), SK_ColorBLACK, false, SK_ColorTRANSPARENT, false));
}
// relative_cursor_pos is as described in the Android API for
@@ -269,7 +264,7 @@ void ImeAdapterAndroid::SetComposingRegion(JNIEnv*,
std::vector<blink::WebCompositionUnderline> underlines;
underlines.push_back(blink::WebCompositionUnderline(
- 0, end - start, SK_ColorBLACK, false, SK_ColorTRANSPARENT));
+ 0, end - start, SK_ColorBLACK, false, SK_ColorTRANSPARENT, false));
rfh->Send(new InputMsg_SetCompositionFromExistingText(
rfh->GetRoutingID(), start, end, underlines));

Powered by Google App Engine
This is Rietveld 408576698