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

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

Issue 81023002: Remove dead code unnecessarily added by r231563 and 236449 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 1 month 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_ibus.cc ('k') | ui/base/ime/input_method_linux_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ui/base/ime/input_method_ibus.cc ('k') | ui/base/ime/input_method_linux_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698