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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 405253003: Make RendererExited reset the InputRouter after destroying the window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android test failure. Created 6 years, 5 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 24c6a21925f2820016ebc0081653bdad43bd4cab..89c2697ad6f4dc52f56205715d49f65780048fa1 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1194,10 +1194,6 @@ void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
waiting_for_screen_rects_ack_ = false;
- // Reset to ensure that input routing works with a new renderer.
- input_router_.reset(new InputRouterImpl(
- process_, this, this, routing_id_, GetInputRouterConfigForPlatform()));
-
// Must reset these to ensure that keyboard events work with a new renderer.
suppress_next_char_events_ = false;
@@ -1216,6 +1212,13 @@ void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
view_ = NULL; // The View should be deleted by RenderProcessGone.
}
+ // Reconstruct the input router to ensure that it has fresh state for a new
+ // renderer. Otherwise it may be stuck waiting for the old renderer to ack an
+ // event. (In particular, the above call to view_->RenderProcessGone will
+ // destroy the aura window, which may dispatch a synthetic mouse move.)
+ input_router_.reset(new InputRouterImpl(
+ process_, this, this, routing_id_, GetInputRouterConfigForPlatform()));
+
synthetic_gesture_controller_.reset();
}
« no previous file with comments | « content/browser/renderer_host/input/input_router_impl.h ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698