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

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: nit: fix a compile error Created 5 years, 9 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/keyboard/keyboard_layout_manager.cc ('K') | « 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 480dd67d299a121998fe36b9c0964837b6532eb3..7ecc2d020aa40c8bd5591b90587aa1fcd195b76a 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -57,21 +57,25 @@ keyboard::KeyboardShowOverride g_keyboard_show_override =
namespace keyboard {
-gfx::Rect DefaultKeyboardBoundsFromWindowBounds(
- const gfx::Rect& window_bounds) {
+gfx::Rect DefaultKeyboardBoundsFromRootBounds(
+ const gfx::Rect& root_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);
+ return gfx::Rect(
+ root_bounds.x(),
+ root_bounds.bottom(),
+ root_bounds.width(),
+ 0);
sadrul 2015/04/01 06:43:49 This doesn't seem to be useful. If the height is z
bshe 2015/04/01 20:41:33 You are right. We could probably just use gfx::Rec
}
-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);
sadrul 2015/04/01 06:43:49 This only ever seems to be used in tests? Is that
bshe 2015/04/01 20:41:33 This is used in ui/keyboard and ash/. I can probab
sadrul 2015/04/07 17:35:51 Yep, makes sense. Follow up CL sgtm.
}
« ui/keyboard/keyboard_layout_manager.cc ('K') | « ui/keyboard/keyboard_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698