Chromium Code Reviews| Index: ui/keyboard/content/keyboard_ui_content.cc |
| diff --git a/ui/keyboard/content/keyboard_ui_content.cc b/ui/keyboard/content/keyboard_ui_content.cc |
| index cd6a2ab3a753c11ec8bfc8623193d8aea9913324..e609e58c2673097f223bdec9beb204d649638b33 100644 |
| --- a/ui/keyboard/content/keyboard_ui_content.cc |
| +++ b/ui/keyboard/content/keyboard_ui_content.cc |
| @@ -161,6 +161,12 @@ void KeyboardUIContent::LoadSystemKeyboard() { |
| } |
| void KeyboardUIContent::UpdateInsetsForWindow(aura::Window* window) { |
| + // Added while we determine if RenderWidgetHostViewChildFrame can be |
| + // changed to always return a non-null value: https://crbug.com/644726 . |
| + // If we cannot guarantee a non-null value, then this may need to stay. |
| + if (!window) |
| + return; |
|
Charlie Reis
2016/09/07 20:27:16
I think we probably shouldn't include this change.
wjmaclean
2016/09/07 20:40:57
Done.
|
| + |
| aura::Window* keyboard_container = |
| keyboard_controller()->GetContainerWindow(); |
| if (!ShouldWindowOverscroll(window)) |
| @@ -238,6 +244,12 @@ void KeyboardUIContent::InitInsets(const gfx::Rect& new_bounds) { |
| // the render process crashed. |
| if (view) { |
| aura::Window* window = view->GetNativeView(); |
| + // Added while we determine if RenderWidgetHostViewChildFrame can be |
| + // changed to always return a non-null value: https://crbug.com/644726 . |
| + // If we cannot guarantee a non-null value, then this may need to stay. |
| + if (!window) |
| + return; |
|
Charlie Reis
2016/09/07 20:27:16
This needs to be a continue and not an early retur
wjmaclean
2016/09/07 20:40:57
Ooops, I saw the enclosing if() but missed the whi
|
| + |
| if (ShouldWindowOverscroll(window)) { |
| gfx::Rect window_bounds = window->GetBoundsInScreen(); |
| gfx::Rect intersect = gfx::IntersectRects(window_bounds, |