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

Unified Diff: chrome/browser/ui/input_method/input_method_engine_base.cc

Issue 1657593007: Implement chrome.input.ime.setComposition/commitText API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: chrome/browser/ui/input_method/input_method_engine_base.cc
diff --git a/chrome/browser/ui/input_method/input_method_engine_base.cc b/chrome/browser/ui/input_method/input_method_engine_base.cc
index 6cd3a6412a8490e8e9f83855ee09d7d0cd56556d..5377dfa9e37e29e46ee8b11ad6748bed14c49c45 100644
--- a/chrome/browser/ui/input_method/input_method_engine_base.cc
+++ b/chrome/browser/ui/input_method/input_method_engine_base.cc
@@ -249,6 +249,13 @@ bool InputMethodEngineBase::SetComposition(
composition_text_->underlines.push_back(underline);
}
+ // Use a black thin underline by default.
+ if (composition_text_->underlines.empty()) {
+ composition_text_->underlines.push_back(ui::CompositionUnderline(
+ 0, composition_text_->text.length(), SK_ColorBLACK, false /* thick */,
+ SK_ColorTRANSPARENT));
+ }
+
// TODO(nona): Makes focus out mode configuable, if necessary.
UpdateComposition(*composition_text_, composition_cursor_, true);
return true;

Powered by Google App Engine
This is Rietveld 408576698