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

Unified Diff: ui/keyboard/keyboard_layout_manager.cc

Issue 487253003: Keep virtual keyboard visibility the same after enable an IME in a different extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reviews Created 6 years, 4 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_controller.cc ('K') | « ui/keyboard/keyboard_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_layout_manager.cc
diff --git a/ui/keyboard/keyboard_layout_manager.cc b/ui/keyboard/keyboard_layout_manager.cc
index d7faf0fa7ab27cf20608019ccb880abe80b4e215..02b532a9187923882312c340264bdcbb813c3d5d 100644
--- a/ui/keyboard/keyboard_layout_manager.cc
+++ b/ui/keyboard/keyboard_layout_manager.cc
@@ -49,13 +49,13 @@ void KeyboardLayoutManager::SetChildBounds(aura::Window* child,
gfx::Rect old_bounds = child->bounds();
SetChildBoundsDirect(child, requested_bounds);
- if (old_bounds.height() == 0 && child->bounds().height() != 0) {
- // The window height is set to 0 initially. If the height of |old_bounds| is
- // 0 and the new bounds is not 0, it probably means window.resizeTo is
- // called to set the window height. We should try to show keyboard again in
- // case the show keyboard request is called before the height is set.
+ if (old_bounds.height() == 0 && child->bounds().height() != 0 &&
+ controller_->show_on_resize()) {
+ // The window height is set to 0 initially or before switch to an IME in a
+ // different extension. Virtual keyboard window may wait for this bounds
+ // change to correctly animate in.
controller_->ShowKeyboard(false);
- } else {
+ } else if (controller_->keyboard_visible()) {
controller_->NotifyKeyboardBoundsChanging(requested_bounds);
}
}
« ui/keyboard/keyboard_controller.cc ('K') | « ui/keyboard/keyboard_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698