Commit 776fa7c1 authored by estade@chromium.org's avatar estade@chromium.org

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
parent 42fdf611
...@@ -227,16 +227,16 @@ class RenderWidgetHostViewGtkWidget { ...@@ -227,16 +227,16 @@ class RenderWidgetHostViewGtkWidget {
int x = 0; int x = 0;
int y = 0; int y = 0;
gtk_widget_get_pointer(widget, &x, &y); 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 // close. We do this so a hung renderer doesn't prevent us from
// releasing the x pointer grab. // releasing the x pointer grab.
bool click_in_popup = x >= 0 && y >= 0 && x < widget->allocation.width && bool click_in_popup = x >= 0 && y >= 0 && x < widget->allocation.width &&
y < widget->allocation.height; y < widget->allocation.height;
// We can get mouse ups from outside the render view during drags even if // Only Shutdown on mouse downs. Mouse ups can occur outside the render
// we are not a popup, so only Shutdown if we are a popup (and // view if the user drags for DnD or while using the scrollbar on a select
// host_view->parent_ is not null). // dropdown. Don't shutdown if we are not a popup.
if (!host_view->parent_ && host_view->is_popup_first_mouse_release_ && if (event->type != GDK_BUTTON_RELEASE && host_view->parent_ &&
!click_in_popup) { !host_view->is_popup_first_mouse_release_ && !click_in_popup) {
host_view->host_->Shutdown(); host_view->host_->Shutdown();
return FALSE; return FALSE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment