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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_view.mm

Issue 882193003: Mac: Fix for janky tab dragging/reordering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ValidationMessageBubble
Patch Set: Fix for rsesek Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/sdk_forward_declarations.h" 9 #include "base/mac/sdk_forward_declarations.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return YES; 129 return YES;
130 } 130 }
131 131
132 - (void)mouseEntered:(NSEvent*)theEvent { 132 - (void)mouseEntered:(NSEvent*)theEvent {
133 isMouseInside_ = YES; 133 isMouseInside_ = YES;
134 [self resetLastGlowUpdateTime]; 134 [self resetLastGlowUpdateTime];
135 [self adjustGlowValue]; 135 [self adjustGlowValue];
136 } 136 }
137 137
138 - (void)mouseMoved:(NSEvent*)theEvent { 138 - (void)mouseMoved:(NSEvent*)theEvent {
139 hoverPoint_ = [self convertPoint:[theEvent locationInWindow] 139 if (state_ == NSOffState) {
140 fromView:nil]; 140 hoverPoint_ = [self convertPoint:[theEvent locationInWindow] fromView:nil];
141 [self setNeedsDisplay:YES]; 141 [self setNeedsDisplay:YES];
142 }
142 } 143 }
143 144
144 - (void)mouseExited:(NSEvent*)theEvent { 145 - (void)mouseExited:(NSEvent*)theEvent {
145 isMouseInside_ = NO; 146 isMouseInside_ = NO;
146 hoverHoldEndTime_ = 147 hoverHoldEndTime_ =
147 [NSDate timeIntervalSinceReferenceDate] + kHoverHoldDuration; 148 [NSDate timeIntervalSinceReferenceDate] + kHoverHoldDuration;
148 [self resetLastGlowUpdateTime]; 149 [self resetLastGlowUpdateTime];
149 [self adjustGlowValue]; 150 [self adjustGlowValue];
150 } 151 }
151 152
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 CGFloat middleWidth = tabWidth - leftWidth - rightWidth; 787 CGFloat middleWidth = tabWidth - leftWidth - rightWidth;
787 NSRect middleRect = NSMakeRect(leftWidth, 0, middleWidth, kFillHeight); 788 NSRect middleRect = NSMakeRect(leftWidth, 0, middleWidth, kFillHeight);
788 [[NSColor whiteColor] setFill]; 789 [[NSColor whiteColor] setFill];
789 NSRectFill(middleRect); 790 NSRectFill(middleRect);
790 791
791 maskCache_.reset(CGBitmapContextCreateImage(maskContext)); 792 maskCache_.reset(CGBitmapContextCreateImage(maskContext));
792 return maskCache_; 793 return maskCache_;
793 } 794 }
794 795
795 @end // @implementation TabView(Private) 796 @end // @implementation TabView(Private)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698