Commit 6fbe13e2 authored by bshe@chromium.org's avatar bshe@chromium.org

Fix white virtual keyboard at login screen


BUG=367788

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266734 0039d316-1c4b-4281-b951-d872f2087c98
parent 44a212e7
......@@ -316,9 +316,8 @@ void KeyboardController::OnWindowHierarchyChanged(
}
void KeyboardController::Reload() {
// Makes sure the keyboard window is initialized.
proxy_->GetKeyboardWindow();
proxy_->ReloadKeyboardIfNeeded();
if (proxy_->HasKeyboardWindow())
proxy_->ReloadKeyboardIfNeeded();
}
void KeyboardController::OnTextInputStateChanged(
......
......@@ -56,7 +56,8 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
return container_.get() != NULL;
}
// Reloads the content of the keyboard.
// Reloads the content of the keyboard. No-op if the keyboard content is not
// loaded yet.
void Reload();
// Hides virtual keyboard and notifies observer bounds change.
......
......@@ -50,6 +50,10 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
virtual void MoveContents(content::WebContents* source,
const gfx::Rect& pos) OVERRIDE {
aura::Window* keyboard = proxy_->GetKeyboardWindow();
// keyboard window must have been added to keyboard container window at this
// point. Otherwise, wrong keyboard bounds is used and may cause problem as
// described in crbug.com/367788.
DCHECK(keyboard->parent());
gfx::Rect bounds = keyboard->bounds();
int new_height = pos.height();
bounds.set_y(bounds.y() + bounds.height() - new_height);
......
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