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.
|
} |