Commit 5821b658 authored by bshe@chromium.org's avatar bshe@chromium.org

Use 41% of screen height as all system VK height


Previously, accessibility keyboard uses 30 percent of screen
height as its height and compact keyboard uses 41 percent.

The IME VKs always use 41 percent for both full and compact
keyboards. This CL uses 41 percent for all system virtual
keyboards to make it consistent with IME VKs.


BUG=367947
TEST=
1. in about://flags disable input view flag and enable virtual
keyboard flag
2. click any text input area
3. a 4 rows virtual keyboard should show up and will occupy
about 41 percent of screen
4. enable accessibility virtual keyboard in chrome://settings
5. refocus a text input area
6. a 5 rows virtual keyboard should show up and will occupy
about 41 percent of screen

Review URL: https://codereview.chromium.org/258063006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266986 0039d316-1c4b-4281-b951-d872f2087c98
parent 095e1b67
......@@ -62,13 +62,7 @@ var KEY_ASPECT_RATIO_LANDSCAPE = 1.46;
* The ratio between the height and width of the compact keyboard.
* @type {number}
*/
var DEFAULT_KEYBOARD_ASPECT_RATIO = 0.3;
/**
* The ratio between the height and width of the a11y keyboard.
* @type {number}
*/
var DEFAULT_A11Y_KEYBOARD_ASPECT_RATIO = 0.41;
var DEFAULT_KEYBOARD_ASPECT_RATIO = 0.41;
/**
* The default weight of a key.
......
......@@ -205,14 +205,9 @@
* @return {Array.<String, number>} The bounds of the keyboard container.
*/
function getKeyboardBounds_() {
var keyboard = $('keyboard');
var ratio = DEFAULT_KEYBOARD_ASPECT_RATIO;
if (keyboard.config && keyboard.config.a11ymode) {
ratio = DEFAULT_A11Y_KEYBOARD_ASPECT_RATIO;
}
return {
"width": screen.width,
"height": screen.height * ratio
"height": screen.height * DEFAULT_KEYBOARD_ASPECT_RATIO
};
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment