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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm

Issue 581053002: Bookmark context menu should appear over the bookmark folder menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « 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/bookmarks/bookmark_bar_folder_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
index 6154cb8069d2e45dd2e819831930db031dd51ee2..2eb0880c5f79ed46df5d53ad068412a2a6691471 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
@@ -1334,10 +1334,15 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
if ([folderController_ parentButton] == sender)
return;
- [self performSelector:@selector(openBookmarkFolderFromButtonAndCloseOldOne:)
- withObject:sender
- afterDelay:bookmarks::kHoverOpenDelay
- inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]];
+ // If right click was done immediately on entering a button, then open the
+ // folder without delay so that context menu appears over the folder menu.
+ if ([event type] == NSRightMouseDown)
+ [self openBookmarkFolderFromButtonAndCloseOldOne:sender];
+ else
+ [self performSelector:@selector(openBookmarkFolderFromButtonAndCloseOldOne:)
+ withObject:sender
+ afterDelay:bookmarks::kHoverOpenDelay
+ inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]];
}
// Called from the BookmarkButton
« 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