summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 01:34:25 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 01:34:25 +0000
commit64ec639d3feceeb6735831ed8eff34ebb07a8d1d (patch)
tree103e7f1c4e1b21c56dc1d98f7369fa4348e38024
parentd38c3a28213b3a2bc62df703c231eebf0bb5dbf4 (diff)
downloadchromium_src-64ec639d3feceeb6735831ed8eff34ebb07a8d1d.zip
chromium_src-64ec639d3feceeb6735831ed8eff34ebb07a8d1d.tar.gz
chromium_src-64ec639d3feceeb6735831ed8eff34ebb07a8d1d.tar.bz2
Don't create new tabs for middle clicks on bookmark items when the user releases off the item.
BUG=14518 TEST=see bug Review URL: http://codereview.chromium.org/155902 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21254 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc
index 4c94148..c8f9cc6 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk.cc
@@ -558,6 +558,12 @@ gboolean BookmarkBarGtk::OnButtonReleased(GtkWidget* sender,
return FALSE;
}
+ // Don't take any action if the user releases outside the button.
+ if (event->x < 0 || event->y < 0 || event->x >= sender->allocation.width ||
+ event->y >= sender->allocation.height) {
+ return FALSE;
+ }
+
const BookmarkNode* node = bar->GetNodeForToolButton(sender);
DCHECK(node);
DCHECK(bar->page_navigator_);