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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_action_button.mm

Issue 318913002: Fix BrowserActionButton displaying pressed state when mouse is out. There are some special case… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/browser_action_button.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
index c6d78b817191603aca4fdb945c55d5cb298211aa..889f544b5b7c48706534932c076334eee3a3e726 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
@@ -181,9 +181,13 @@ class ExtensionActionIconFactoryBridge
}
- (void)mouseDown:(NSEvent*)theEvent {
- [[self cell] setHighlighted:YES];
- dragCouldStart_ = YES;
- dragStartPoint_ = [theEvent locationInWindow];
+ NSPoint location = [self convertPoint:[theEvent locationInWindow]
+ fromView:nil];
+ if (NSPointInRect(location, [self bounds])) {
+ [[self cell] setHighlighted:YES];
+ dragCouldStart_ = YES;
+ dragStartPoint_ = [theEvent locationInWindow];
+ }
}
- (void)mouseDragged:(NSEvent*)theEvent {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698