diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 00:29:04 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 00:29:04 +0000 |
commit | b1a26cc8d92111b85944d01626dacab269011669 (patch) | |
tree | c382b7658c9e76ec98ea78e85814da0f1f68cdc3 /chrome/browser/cocoa/tab_view.mm | |
parent | 20ede07176ece47e95efa8f355ee68a61166b68c (diff) | |
download | chromium_src-b1a26cc8d92111b85944d01626dacab269011669.zip chromium_src-b1a26cc8d92111b85944d01626dacab269011669.tar.gz chromium_src-b1a26cc8d92111b85944d01626dacab269011669.tar.bz2 |
Mac: Fix crash while dragging a tab alone in a window.
Specifically, the crash could be repro'ed as follows (it also occurred under other circumstances as well): Have a window with one or more tabs in it. Create a new window with a single tab. Drag the tab in the new window, and while dragging right-click (and release).
This patch also prevents right-clicks while dragging from stopping the drag.
BUG=23591
TEST=See above.
Review URL: http://codereview.chromium.org/242139
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_view.mm')
-rw-r--r-- | chrome/browser/cocoa/tab_view.mm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm index 596bfe9..fd6a2a4 100644 --- a/chrome/browser/cocoa/tab_view.mm +++ b/chrome/browser/cocoa/tab_view.mm @@ -253,7 +253,7 @@ static const CGFloat kRapidCloseDist = 2.5; NSEventType type = [theEvent type]; if (type == NSLeftMouseDragged) { [self mouseDragged:theEvent]; - } else { // Mouse Up + } else if (type == NSLeftMouseUp) { NSPoint upLocation = [theEvent locationInWindow]; CGFloat dx = upLocation.x - downLocation.x; CGFloat dy = upLocation.y - downLocation.y; @@ -274,6 +274,12 @@ static const CGFloat kRapidCloseDist = 2.5; [self mouseUp:theEvent]; break; + } else { + // TODO(viettrungluu): [crbug.com/23830] We can receive right-mouse-ups + // (and maybe even others?) for reasons I don't understand. So we + // explicitly check for both events we're expecting, and log others. We + // should figure out what's going on. + LOG(WARNING) << "Spurious event received of type " << type << "."; } } } |