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

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

Issue 665903003: Magnifier needs to follow the focus of the textfield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test cases. Created 6 years, 2 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
« ui/base/ime/input_method_chromeos.h ('K') | « ui/base/ime/input_method_chromeos.h ('k') | 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 6930968f7db6d043ea92027ce2904119914238e4..42d9cceb9c5ede6d6af4bced4ab13e33b6987ffb 100644
--- a/ui/base/ime/input_method_chromeos.cc
+++ b/ui/base/ime/input_method_chromeos.cc
@@ -175,7 +175,12 @@ void InputMethodChromeOS::OnTextInputTypeChanged(
}
void InputMethodChromeOS::OnCaretBoundsChanged(const TextInputClient* client) {
- if (!IsInputFieldFocused() || !IsTextInputClientFocused(client))
+ if (!IsTextInputFieldFocused() || !IsTextInputClientFocused(client))
+ return;
+
+ NotifyTextInputCaretBoundsChanged(client);
+
+ if (!IsInputFieldFocused())
return;
// The current text input type should not be NONE if |context_| is focused.
@@ -659,4 +664,8 @@ bool InputMethodChromeOS::IsInputFieldFocused() {
return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD);
}
+bool InputMethodChromeOS::IsTextInputFieldFocused() {
+ return GetTextInputType() != TEXT_INPUT_TYPE_NONE;
+}
+
} // namespace ui
« ui/base/ime/input_method_chromeos.h ('K') | « ui/base/ime/input_method_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698