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

Unified Diff: ui/keyboard/keyboard_ui.cc

Issue 2554513002: Change |EnsureCaretInRect| to |EnsureCaretNotInRect|. (Closed)
Patch Set: Created 4 years 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/text_input_client.h ('k') | ui/views/controls/prefix_selector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_ui.cc
diff --git a/ui/keyboard/keyboard_ui.cc b/ui/keyboard/keyboard_ui.cc
index 816933bf7e6afbb60488e9af8e7030645900125f..896add64cb2fa7fb0d84096e41a51c31141d9c9b 100644
--- a/ui/keyboard/keyboard_ui.cc
+++ b/ui/keyboard/keyboard_ui.cc
@@ -31,12 +31,8 @@ void KeyboardUI::HideKeyboardContainer(aura::Window* container) {
void KeyboardUI::EnsureCaretInWorkArea() {
if (GetInputMethod()->GetTextInputClient()) {
aura::Window* keyboard_window = GetKeyboardWindow();
- aura::Window* root_window = keyboard_window->GetRootWindow();
- gfx::Rect available_bounds = root_window->bounds();
- gfx::Rect keyboard_bounds = keyboard_window->bounds();
- available_bounds.set_height(available_bounds.height() -
- keyboard_bounds.height());
- GetInputMethod()->GetTextInputClient()->EnsureCaretInRect(available_bounds);
+ GetInputMethod()->GetTextInputClient()->EnsureCaretNotInRect(
+ keyboard_window->GetBoundsInScreen());
}
}
« no previous file with comments | « ui/base/ime/text_input_client.h ('k') | ui/views/controls/prefix_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698