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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 149209: Only force-abort popup render views on mousedown.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: expanded comment Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_gtk.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_gtk.cc (revision 19956)
+++ chrome/browser/renderer_host/render_widget_host_view_gtk.cc (working copy)
@@ -227,16 +227,16 @@
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698