Commit 99039107 authored by xrenishere@gmail.com's avatar xrenishere@gmail.com

Fix BrowserActionButton displaying pressed state when mouse is

  out.
  There are some special cases that will cause button still can
  receive mouse down event when mouse is out of the button area.
  One is right click out of the button and a contextual menu
  comes out. If double click now, BrowserActionButton can still
  receive the event. Therefore we don't handle it in this case.

  BUG=377676
  R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/318913002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275397 0039d316-1c4b-4281-b951-d872f2087c98
parent ac0514f3
...@@ -181,9 +181,13 @@ class ExtensionActionIconFactoryBridge ...@@ -181,9 +181,13 @@ class ExtensionActionIconFactoryBridge
} }
- (void)mouseDown:(NSEvent*)theEvent { - (void)mouseDown:(NSEvent*)theEvent {
[[self cell] setHighlighted:YES]; NSPoint location = [self convertPoint:[theEvent locationInWindow]
dragCouldStart_ = YES; fromView:nil];
dragStartPoint_ = [theEvent locationInWindow]; if (NSPointInRect(location, [self bounds])) {
[[self cell] setHighlighted:YES];
dragCouldStart_ = YES;
dragStartPoint_ = [theEvent locationInWindow];
}
} }
- (void)mouseDragged:(NSEvent*)theEvent { - (void)mouseDragged:(NSEvent*)theEvent {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment