summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 00:35:09 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 00:35:09 +0000
commit776fa7c106b2b2d3f06985725681e094cef64514 (patch)
tree9a6f24455f3348112e3009f104fb58b764fe8d3b /chrome/browser/renderer_host
parent42fdf611a80359e16613fa5500bd6eb44956579a (diff)
downloadchromium_src-776fa7c106b2b2d3f06985725681e094cef64514.zip
chromium_src-776fa7c106b2b2d3f06985725681e094cef64514.tar.gz
chromium_src-776fa7c106b2b2d3f06985725681e094cef64514.tar.bz2
Only force-abort popup render views on mousedown.
BUG= http://crbug.com/15976 TEST=see bug Review URL: http://codereview.chromium.org/149209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19998 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index 1da195f..f883b3f 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -227,16 +227,16 @@ class RenderWidgetHostViewGtkWidget {
int x = 0;
int y = 0;
gtk_widget_get_pointer(widget, &x, &y);
- // If the mouse release happens outside our popup, force the popup to
+ // If the mouse event happens outside our popup, force the popup to
// close. We do this so a hung renderer doesn't prevent us from
// releasing the x pointer grab.
bool click_in_popup = x >= 0 && y >= 0 && x < widget->allocation.width &&
y < widget->allocation.height;
- // We can get mouse ups from outside the render view during drags even if
- // we are not a popup, so only Shutdown if we are a popup (and
- // host_view->parent_ is not null).
- if (!host_view->parent_ && host_view->is_popup_first_mouse_release_ &&
- !click_in_popup) {
+ // Only Shutdown on mouse downs. Mouse ups can occur outside the render
+ // view if the user drags for DnD or while using the scrollbar on a select
+ // dropdown. Don't shutdown if we are not a popup.
+ if (event->type != GDK_BUTTON_RELEASE && host_view->parent_ &&
+ !host_view->is_popup_first_mouse_release_ && !click_in_popup) {
host_view->host_->Shutdown();
return FALSE;
}