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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 17440004: Fix the problem that wrong context menu shows up when right clicking a link on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/tab_contents/render_view_context_menu.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 608688f81e8b17ad7b18ef6d44c961b2968f87d9..1bbee50556c326038b2372a7a342857fa93021b1 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -726,10 +726,12 @@ void RenderViewContextMenu::AppendPanelItems() {
if (params_.is_editable)
AppendEditableItems();
- else if (has_selection)
- AppendCopyItem();
+ // Checking link should take precedence before checking selection since on Mac
+ // right-clicking a link will also make it selected.
else if (params_.unfiltered_link_url.is_valid())
AppendLinkItems();
+ else if (has_selection)
Dmitry Titov 2013/06/19 01:14:41 why have an 'else' here? On normal pages we show b
jianli 2013/06/19 17:08:18 Changed to allow both link and copy.
+ AppendCopyItem();
// Only add extension items from this extension.
int index = 0;
« 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