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

Unified Diff: chrome/browser/cocoa/tab_view.mm

Issue 242139: Mac: Fix crash while dragging a tab alone in a window. (Closed)
Patch Set: Unconditionally clear tab controller's target. Created 11 years, 2 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 | « chrome/browser/cocoa/tab_strip_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_view.mm
diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm
index 4d9bf825de6979fce8f195b8992d4d68d4595a5e..5bb02cde19a7e93ba7bde63cf9117f88e0cebfa9 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 << ".";
}
}
}
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698