| Index: ui/base/ime/input_method_imm32.cc
|
| diff --git a/ui/base/ime/input_method_imm32.cc b/ui/base/ime/input_method_imm32.cc
|
| index 074f37cd9ac6ae738861ca79f52f53987ec73f6d..8ee5c5c0e94f6f8901372517b4724b51f7823cbd 100644
|
| --- a/ui/base/ime/input_method_imm32.cc
|
| +++ b/ui/base/ime/input_method_imm32.cc
|
| @@ -94,23 +94,24 @@ void InputMethodIMM32::OnTextInputTypeChanged(const TextInputClient* client) {
|
| }
|
|
|
| void InputMethodIMM32::OnCaretBoundsChanged(const TextInputClient* client) {
|
| - if (enabled_ && IsTextInputClientFocused(client) && IsWindowFocused(client)) {
|
| - // The current text input type should not be NONE if |client| is focused.
|
| - DCHECK(!IsTextInputTypeNone());
|
| - gfx::Rect screen_bounds(GetTextInputClient()->GetCaretBounds());
|
| -
|
| - HWND attached_window = GetAttachedWindowHandle(client);
|
| - // TODO(ime): see comment in TextInputClient::GetCaretBounds(), this
|
| - // conversion shouldn't be necessary.
|
| - RECT r = {};
|
| - GetClientRect(attached_window, &r);
|
| - POINT window_point = { screen_bounds.x(), screen_bounds.y() };
|
| - ScreenToClient(attached_window, &window_point);
|
| - gfx::Rect caret_rect(gfx::Point(window_point.x, window_point.y),
|
| - screen_bounds.size());
|
| - imm32_manager_.UpdateCaretRect(attached_window, caret_rect);
|
| + if (!enabled_ || !IsTextInputClientFocused(client) ||
|
| + !IsWindowFocused(client)) {
|
| + return;
|
| }
|
| - InputMethodWin::OnCaretBoundsChanged(client);
|
| + // The current text input type should not be NONE if |client| is focused.
|
| + DCHECK(!IsTextInputTypeNone());
|
| + gfx::Rect screen_bounds(GetTextInputClient()->GetCaretBounds());
|
| +
|
| + HWND attached_window = GetAttachedWindowHandle(client);
|
| + // TODO(ime): see comment in TextInputClient::GetCaretBounds(), this
|
| + // conversion shouldn't be necessary.
|
| + RECT r = {};
|
| + GetClientRect(attached_window, &r);
|
| + POINT window_point = { screen_bounds.x(), screen_bounds.y() };
|
| + ScreenToClient(attached_window, &window_point);
|
| + gfx::Rect caret_rect(gfx::Point(window_point.x, window_point.y),
|
| + screen_bounds.size());
|
| + imm32_manager_.UpdateCaretRect(attached_window, caret_rect);
|
| }
|
|
|
| void InputMethodIMM32::CancelComposition(const TextInputClient* client) {
|
|
|