Chromium Code Reviews| Index: ui/keyboard/keyboard_controller.cc |
| diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc |
| index 1be0200b898f84923265c89bc6b2d92363b0e60f..a1b7c2c85c4247f07760e32a66297fead9c78c68 100644 |
| --- a/ui/keyboard/keyboard_controller.cc |
| +++ b/ui/keyboard/keyboard_controller.cc |
| @@ -271,18 +271,14 @@ void KeyboardController::NotifyKeyboardBoundsChanging( |
| // window is created while the keyboard is visible. |
| scoped_ptr<content::RenderWidgetHostIterator> widgets( |
| content::RenderWidgetHost::GetRenderWidgetHosts()); |
| - aura::Window* keyboard_window = proxy_->GetKeyboardWindow(); |
| - aura::Window* root_window = keyboard_window->GetRootWindow(); |
| + aura::Window* root_window = proxy_->GetKeyboardWindow()->GetRootWindow(); |
| while (content::RenderWidgetHost* widget = widgets->GetNextHost()) { |
| content::RenderWidgetHostView* view = widget->GetView(); |
| // Can be NULL, e.g. if the RenderWidget is being destroyed or |
| // the render process crashed. |
| if (view) { |
| aura::Window* window = view->GetNativeView(); |
| - // If virtual keyboard failed to load, a widget that displays error |
| - // message will be created and adds as a child of the virtual keyboard |
| - // window. We want to avoid add BoundsChangedObserver to that window. |
| - if (!keyboard_window->Contains(window) && |
| + if (proxy_->ShouldWindowOverscroll(window) && |
| window->GetRootWindow() == root_window) { |
|
oshima
2015/09/23 19:57:27
looks like this check is a dup?
bshe
2015/09/24 11:56:15
I think this check preventing overscoll on windows
oshima
2015/09/24 17:28:07
Yeah,that sounds better because it's checking agai
bshe
2015/09/28 14:42:40
Done.
|
| gfx::Rect window_bounds = window->GetBoundsInScreen(); |
| gfx::Rect intersect = gfx::IntersectRects(window_bounds, |
| @@ -476,7 +472,7 @@ bool KeyboardController::ShouldEnableInsets(aura::Window* window) { |
| void KeyboardController::UpdateWindowInsets(aura::Window* window) { |
| aura::Window* keyboard_window = proxy_->GetKeyboardWindow(); |
| - if (window == keyboard_window) |
| + if (!proxy_->ShouldWindowOverscroll(window)) |
| return; |
| scoped_ptr<content::RenderWidgetHostIterator> widgets( |