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

Unified Diff: ui/base/ime/input_method_chromeos.cc

Issue 2091693003: Correctly fallback to caret bounds when composition_head is not provided (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_chromeos.cc
diff --git a/ui/base/ime/input_method_chromeos.cc b/ui/base/ime/input_method_chromeos.cc
index 924c9cf968321b28c022dbe6553290bc3929d75f..4de4db2dfbc0c272a34c8030e152a5ef7cd20635 100644
--- a/ui/base/ime/input_method_chromeos.cc
+++ b/ui/base/ime/input_method_chromeos.cc
@@ -180,12 +180,13 @@ void InputMethodChromeOS::OnCaretBoundsChanged(const TextInputClient* client) {
const gfx::Rect caret_rect = client->GetCaretBounds();
- // Pepper doesn't support composition bounds, so fall back to caret bounds to
- // avoid a bad user experience (the IME window moved to upper left corner).
gfx::Rect composition_head;
if (client->HasCompositionText())
client->GetCompositionCharacterBounds(0, &composition_head);
- else
+
+ // Pepper doesn't support composition bounds, so fall back to caret bounds to
+ // avoid a bad user experience (the IME window moved to upper left corner).
+ if (composition_head.IsEmpty())
composition_head = caret_rect;
candidate_window->SetCursorBounds(caret_rect, composition_head);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698