Commit 456413f7 authored by rsadam@chromium.org's avatar rsadam@chromium.org

Keyboard height ratio for a11y keyboard.


BUG=338456

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248562 0039d316-1c4b-4281-b951-d872f2087c98
parent 1d88929e
......@@ -36,9 +36,16 @@ const int kAnimationDurationMs = 200;
// hide animation finishes.
const float kAnimationStartOrAfterHideOpacity = 0.2f;
float GetKeyboardHeightRatio(){
if (keyboard::IsKeyboardUsabilityExperimentEnabled()) {
return 1.0f;
} else if (keyboard::GetAccessibilityKeyboardEnabled()) {
return 0.4f;
}
return 0.3f;
}
gfx::Rect KeyboardBoundsFromWindowBounds(const gfx::Rect& window_bounds) {
const float kKeyboardHeightRatio =
keyboard::IsKeyboardUsabilityExperimentEnabled() ? 1.0f : 0.3f;
const float kKeyboardHeightRatio = GetKeyboardHeightRatio();
return gfx::Rect(
window_bounds.x(),
window_bounds.y() + window_bounds.height() * (1 - kKeyboardHeightRatio),
......
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