diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 17:16:27 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 17:16:27 +0000 |
commit | dd067b1840b48d4aa6bca759bc881894502eb958 (patch) | |
tree | 13b555d07fc2a7671ffb9b8418cb247e499e2c43 /chrome/browser/cocoa/bookmark_bar_controller.mm | |
parent | 0d666cb49322bdd09aa8779108ccf1034944bd71 (diff) | |
download | chromium_src-dd067b1840b48d4aa6bca759bc881894502eb958.zip chromium_src-dd067b1840b48d4aa6bca759bc881894502eb958.tar.gz chromium_src-dd067b1840b48d4aa6bca759bc881894502eb958.tar.bz2 |
Mac: Clicking a bookmark bar folder should close its menu if it's open.
The code for that was already there, but it didn't fire, because clicking on a bookmark button dismissed the bookmark folder controller.
BUG=36487
TEST=click bookmark bar folder twice. first click should open menu, second should close.
Review URL: http://codereview.chromium.org/870006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_controller.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm index 1663ebb..06c4fe0 100644 --- a/chrome/browser/cocoa/bookmark_bar_controller.mm +++ b/chrome/browser/cocoa/bookmark_bar_controller.mm @@ -494,16 +494,16 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12; case NSRightMouseDown: // If a click in my window and NOT in the bookmark bar, // then is a click outside. - if ((eventWindow == myWindow) && - ([[eventWindow contentView] - hitTest:[event locationInWindow]] != [self view])) { + if (eventWindow == myWindow && + ![[[eventWindow contentView] hitTest:[event locationInWindow]] + isDescendantOf:[self view]]) { return YES; } // If a click in a bookmark bar folder window and that isn't // one of my bookmark bar folders, YES is click outside. - if (([eventWindow isKindOfClass:[BookmarkBarFolderWindow - class]]) && - ([eventWindow parentWindow] != myWindow)) { + if ([eventWindow isKindOfClass:[BookmarkBarFolderWindow + class]] && + [eventWindow parentWindow] != myWindow) { return YES; } break; |