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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm

Issue 2557343002: Revert of Add a dead zone when dragging tabs horizontally on Mac (Closed)
Patch Set: Created 4 years 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/ui/cocoa/tabs/tab_strip_drag_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 074476a276614c9312140774a33caf325561f25b..3d168310cbb5820ab90d3ccf9d4b9e060d6e76ba 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
@@ -17,7 +17,6 @@
#include "ui/base/cocoa/cocoa_base_utils.h"
#include "ui/gfx/mac/scoped_cocoa_disable_screen_updates.h"
-const CGFloat kHorizontalTearDistance = 10.0; // Using the same value as Views.
const CGFloat kTearDistance = 36.0;
const NSTimeInterval kTearDuration = 0.333;
@@ -172,17 +171,9 @@
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) > kHorizontalTearDistance) {
- outOfTabHorizontalDeadZone_ = YES;
- }
- if (outOfTabHorizontalDeadZone_) {
- [sourceController_ insertPlaceholderForTab:[draggedTab_ tabView]
- frame:NSOffsetRect(sourceTabFrame_,
- offset, 0)];
- }
+ [sourceController_ insertPlaceholderForTab:[draggedTab_ tabView]
+ frame:NSOffsetRect(sourceTabFrame_,
+ offset, 0)];
// Check that we haven't pulled the tab too far to start a drag. This
// can include either pulling it too far down, or off the side of the tab
// strip that would cause it to no longer be fully visible.
@@ -412,7 +403,6 @@
- (void)endDrag:(NSEvent*)event {
// Cancel any delayed -continueDrag: requests that may still be pending.
[NSObject cancelPreviousPerformRequestsWithTarget:self];
- outOfTabHorizontalDeadZone_ = NO;
// Special-case this to keep the logic below simpler.
if (moveWindowOnDrag_) {
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698