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

Unified Diff: ui/keyboard/keyboard_controller_proxy.cc

Issue 617013002: Remove redundant SetBounds calls to the keyboard window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 2 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
« no previous file with comments | « 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_controller_proxy.cc
diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc
index 1b3e86a27dd58b68164a4c3b8aae61e1129de1f4..cd98f9a290ec26c6c1097fa631b85dc61ebc4f29 100644
--- a/ui/keyboard/keyboard_controller_proxy.cc
+++ b/ui/keyboard/keyboard_controller_proxy.cc
@@ -60,7 +60,11 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
int new_height = pos.height();
bounds.set_y(bounds.y() + bounds.height() - new_height);
bounds.set_height(new_height);
- keyboard->SetBounds(bounds);
+ // Keyboard bounds should only be reset when it actually changes. Otherwise
+ // it interrupts the initial animation of showing the keyboard. Described in
+ // crbug.com/356753.
+ if (bounds != keyboard->bounds())
+ keyboard->SetBounds(bounds);
}
// Overridden from content::WebContentsDelegate:
« no previous file with comments | « ui/keyboard/keyboard_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698