| 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 a3910b703718fdc7157fd0f1152a61c8d3aefaf8..aef3e9ffd97a0b5d07021c57c2dbdbdde2e8abfb 100644
|
| --- a/ui/base/ime/input_method_chromeos.cc
|
| +++ b/ui/base/ime/input_method_chromeos.cc
|
| @@ -189,19 +189,20 @@ void InputMethodChromeOS::OnCaretBoundsChanged(const TextInputClient* client) {
|
| const gfx::Rect caret_rect = client->GetCaretBounds();
|
|
|
| gfx::Rect composition_head;
|
| + std::vector<gfx::Rect> rects;
|
| if (client->HasCompositionText()) {
|
| - std::vector<gfx::Rect> rects;
|
| uint32 i = 0;
|
| gfx::Rect rect;
|
| while (client->GetCompositionCharacterBounds(i++, &rect))
|
| rects.push_back(rect);
|
| - if (rects.size() > 0) {
|
| - if (GetEngine())
|
| - GetEngine()->SetCompositionBounds(rects);
|
| - composition_head = rects[0];
|
| - }
|
| } else {
|
| - composition_head = caret_rect;
|
| + rects.push_back(caret_rect);
|
| + }
|
| +
|
| + if (rects.size() > 0) {
|
| + composition_head = rects[0];
|
| + if (GetEngine())
|
| + GetEngine()->SetCompositionBounds(rects);
|
| }
|
|
|
| chromeos::IMECandidateWindowHandlerInterface* candidate_window =
|
|
|