Chromium Code Reviews| Index: chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm |
| index 3d168310cbb5820ab90d3ccf9d4b9e060d6e76ba..7fef8ad35fb6ea13a0b7af1092b1c05469910489 100644 |
| --- a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm |
| +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm |
| @@ -171,6 +171,12 @@ static BOOL PointIsInsideView(NSPoint screenPoint, NSView* view) { |
| if (draggingWithinTabStrip_) { |
| NSPoint thisPoint = [NSEvent mouseLocation]; |
| CGFloat offset = thisPoint.x - dragOrigin_.x; |
| + // Only begin dragging the tab horizontally if it's torn out of its dead |
| + // zone. |
| + if (!outOfTabHorizontalDeadZone_ && fabs(offset) > kTearDistance) { |
|
Avi (use Gerrit)
2016/11/30 00:01:22
Do we want kTearDistance? That's 36 pixels, and wh
erikchen
2016/11/30 15:05:16
Agreed that this should be significantly smaller.
njagsarran
2016/11/30 17:44:49
Looks like Views uses 10, what do you guys think o
njagsarran
2016/11/30 20:26:32
Done.
|
| + outOfTabHorizontalDeadZone_ = YES; |
| + } |
| + if (outOfTabHorizontalDeadZone_) |
|
Avi (use Gerrit)
2016/11/30 00:01:22
You'd need to adjust the indentation here with a n
njagsarran
2016/11/30 20:26:32
Done.
|
| [sourceController_ insertPlaceholderForTab:[draggedTab_ tabView] |
| frame:NSOffsetRect(sourceTabFrame_, |
| offset, 0)]; |
| @@ -429,6 +435,7 @@ static BOOL PointIsInsideView(NSPoint screenPoint, NSView* view) { |
| TabWindowController* dropController = sourceController_; |
| [dropController moveTabViews:@[ [dropController activeTabView] ] |
| fromController:nil]; |
| + outOfTabHorizontalDeadZone_ = NO; |
|
erikchen
2016/11/30 15:05:16
presumably we always want to reset this when the d
njagsarran
2016/11/30 20:26:32
Done.
|
| } |
| } else if (targetController_) { |
| // Move between windows. If |targetController_| is nil, we're not dropping |