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

Unified Diff: ui/keyboard/keyboard_controller_proxy.cc

Issue 1008453002: Allow javascript change the virtual keyboard window size and position freely in FLOATING mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 8 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
« no previous file with comments | « ui/keyboard/keyboard_controller.cc ('k') | ui/keyboard/keyboard_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller_proxy.cc
diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc
index bf921efd76440b766a4f2c7339cfa2be645a31ee..83d5e77448a2b351f16afeb76eeebb104f336a1c 100644
--- a/ui/keyboard/keyboard_controller_proxy.cc
+++ b/ui/keyboard/keyboard_controller_proxy.cc
@@ -55,15 +55,10 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
// point. Otherwise, wrong keyboard bounds is used and may cause problem as
// described in crbug.com/367788.
DCHECK(keyboard->parent());
- gfx::Rect bounds = keyboard->bounds();
- int new_height = pos.height();
- bounds.set_y(bounds.y() + bounds.height() - new_height);
- bounds.set_height(new_height);
- // Keyboard bounds should only be reset when it actually changes. Otherwise
- // it interrupts the initial animation of showing the keyboard. Described in
- // crbug.com/356753.
- if (bounds != keyboard->bounds())
- keyboard->SetBounds(bounds);
+ // keyboard window bounds may not set to |pos| after this call. If keyboard
+ // is in FULL_WIDTH mode, only the height of keyboard window will be
+ // changed.
+ keyboard->SetBounds(pos);
}
// Overridden from content::WebContentsDelegate:
« no previous file with comments | « ui/keyboard/keyboard_controller.cc ('k') | ui/keyboard/keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698