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

Unified Diff: ui/base/ime/win/imm32_manager.cc

Issue 313053007: Passing BackgroundColorSpan and UnderlineSpan from Clank to Blink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Putting back import java.lang.CharSequence for android_aosp. Created 6 years, 6 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 | « ui/base/ime/input_method_chromeos_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/win/imm32_manager.cc
diff --git a/ui/base/ime/win/imm32_manager.cc b/ui/base/ime/win/imm32_manager.cc
index e1c9e9a29028417967c9049fc0a779625fc2e1c5..7ad2d875e4c881b75387ee87d47698d859131e14 100644
--- a/ui/base/ime/win/imm32_manager.cc
+++ b/ui/base/ime/win/imm32_manager.cc
@@ -83,10 +83,11 @@ void GetCompositionUnderlines(HIMC imm_context,
underline.end_offset = clause_data[i+1];
underline.color = SK_ColorBLACK;
underline.thick = false;
+ underline.background_color = SK_ColorTRANSPARENT;
// Use thick underline for the target clause.
- if (underline.start_offset >= static_cast<unsigned>(target_start) &&
- underline.end_offset <= static_cast<unsigned>(target_end)) {
+ if (underline.start_offset >= static_cast<uint32>(target_start) &&
+ underline.end_offset <= static_cast<uint32>(target_end)) {
underline.thick = true;
}
underlines->push_back(underline);
@@ -342,21 +343,22 @@ void IMM32Manager::GetCompositionInfo(HIMC imm_context, LPARAM lparam,
if (!composition->underlines.size()) {
CompositionUnderline underline;
underline.color = SK_ColorBLACK;
+ underline.background_color = SK_ColorTRANSPARENT;
if (target_start > 0) {
- underline.start_offset = 0;
- underline.end_offset = target_start;
+ underline.start_offset = 0U;
+ underline.end_offset = static_cast<uint32>(target_start);
underline.thick = false;
composition->underlines.push_back(underline);
}
if (target_end > target_start) {
- underline.start_offset = target_start;
- underline.end_offset = target_end;
+ underline.start_offset = static_cast<uint32>(target_start);
+ underline.end_offset = static_cast<uint32>(target_end);
underline.thick = true;
composition->underlines.push_back(underline);
}
if (target_end < length) {
- underline.start_offset = target_end;
- underline.end_offset = length;
+ underline.start_offset = static_cast<uint32>(target_end);
+ underline.end_offset = static_cast<uint32>(length);
underline.thick = false;
composition->underlines.push_back(underline);
}
« no previous file with comments | « ui/base/ime/input_method_chromeos_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698