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

Unified Diff: ui/keyboard/keyboard_util.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_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_util.cc
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc
index a1cffb2b0bdf7d7de7176fdd4f0434a9bb04ce72..c234127a9ac9b0b24e74b1cd4a714a3a682418c1 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -57,21 +57,12 @@ keyboard::KeyboardShowOverride g_keyboard_show_override =
namespace keyboard {
-gfx::Rect DefaultKeyboardBoundsFromWindowBounds(
- const gfx::Rect& window_bounds) {
- // Initialize default keyboard height to 0. The keyboard window height should
- // only be set by window.resizeTo in virtual keyboard web contents. Otherwise,
- // the default height may conflict with the new height and causing some
- // strange animation issues.
- return KeyboardBoundsFromWindowBounds(window_bounds, 0);
-}
-
-gfx::Rect KeyboardBoundsFromWindowBounds(const gfx::Rect& window_bounds,
- int keyboard_height) {
+gfx::Rect FullWidthKeyboardBoundsFromRootBounds(const gfx::Rect& root_bounds,
+ int keyboard_height) {
return gfx::Rect(
- window_bounds.x(),
- window_bounds.bottom() - keyboard_height,
- window_bounds.width(),
+ root_bounds.x(),
+ root_bounds.bottom() - keyboard_height,
+ root_bounds.width(),
keyboard_height);
}
« no previous file with comments | « ui/keyboard/keyboard_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698