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

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

Issue 195043: Start a drag if the tab is dragged off the sides of the window.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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') | chrome/browser/cocoa/tab_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_view.mm
===================================================================
--- chrome/browser/cocoa/tab_view.mm (revision 25753)
+++ chrome/browser/cocoa/tab_view.mm (working copy)
@@ -267,9 +267,12 @@
frame:NSOffsetRect(sourceTabFrame_,
offset, 0)
yStretchiness:stretchiness];
-
+ // 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.
+ BOOL stillVisible = [sourceController_ isTabFullyVisible:self];
CGFloat tearForce = fabs(thisPoint.y - dragOrigin_.y);
- if (tearForce > kTearDistance) {
+ if (tearForce > kTearDistance || !stillVisible) {
draggingWithinTabStrip_ = NO;
// When you finally leave the strip, we treat that as the origin.
dragOrigin_.x = thisPoint.x;
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller.mm ('k') | chrome/browser/cocoa/tab_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698