Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 174878 Context Menus Extensions are not ordered by their name
Starred by 16 users Reported by beaufort...@gmail.com, Feb 7, 2013 Back to list
Status: Verified
Owner: ----
Closed: Jul 2013
Cc: yoz@chromium.org
Components:
OS: Chrome
Pri: 2
Type: Bug


Sign in to add a comment
UserAgent: Mozilla/5.0 (X11; CrOS x86_64 3658.0.0) AppleWebKit/537.30 (KHTML, like Gecko) Chrome/26.0.1403.0 Safari/537.30

Steps to reproduce the problem:
1. Install a non-i18n Context Menu Extension whose name is "aaa" 
2. Install a i18n Context Menu Extension whose name is "bbb" 
3. Install a non-i18n Context Menu Extension whose name is "cccc" 
4. Right click 

What is the expected behavior?
Context Menus Extensions order is:
-aaa
-bbb
-ccc

What went wrong?
Context Menus Extensions order is:
-aaa
-ccc
-bbb

Did this work before? N/A 

Chrome version: 26.0.1403.0  Channel: dev
OS Version: 3658.0.0

There is already a TODO in the code related to that issue:
https://code.google.com/p/chromium/codesearch#chrome/src/chrome/browser/tab_contents/render_view_context_menu.cc&q=render_view_context_menu.cc&sq=package:chrome&type=cs&l=379
 
ケンジこんにちは

May I grab the code of Chromium, apply a patch and submit it for a review?


Comment 3 by beaufort...@gmail.com, Feb 12, 2013
It would be good to change the title of this issue since this is NOT what is happening really. 
It is not related at all with i18n.

Context Menus Extensions ARE ordered by their name.

The real problem is that these Context Menus Extensions can define a title for their Context Menus different than their names. It means for instance that for:

- Extension "aaa" -> Context Menu "aaa"
- Extension "bbb" -> Context Menu "ddd"
- Extension "ccc" -> Context Menu "ccc"

Context Menu will look like this:
- "aaa"
- "ddd"
- "ccc"

Whereas it should look like (at least for me):
- "aaa"
- "ccc"
- "ddd"


If Google Chrome Team sees this like I do, I'd like to take some time to submit a patch for this.

Comment 4 Deleted
Comment 5 by beaufort...@gmail.com, Feb 12, 2013
Moreover, in Chromium 26.0.1410.0 (Developer Build 181841), if a Context Menu Extension has multiples Context Sub Menus, those are not sorted alphabetically but in the order of creation.

See screenshot below.
It might be necessary to open a separate bug for it.

I'm waiting for someone to take a look at this issue
bug.png
164 KB View Download
Comment 6 by yoz@chromium.org, Feb 13, 2013
Cc: yoz@chromium.org
Status: Available
It makes sense to sort top-level items by name, but an extension has full control over how it creates its context menu subitems (some of which can be separators). It doesn't make sense to automatically sort them.
Comment 7 by beaufort...@gmail.com, Feb 13, 2013
I'll submit a patch and will assign yoz@ as a reviewer.
Is that ok?
Comment 8 by yoz@chromium.org, Feb 13, 2013
Yes.
Project Member Comment 9 by bugdroid1@chromium.org, Mar 10, 2013
Labels: -Area-UI -Feature-Extensions Cr-Platform-Extensions Cr-UI
Project Member Comment 10 by bugdroid1@chromium.org, Jun 12, 2013
------------------------------------------------------------------------
r205793 | beaufort.francois@gmail.com | 2013-06-12T15:31:35.055165Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/multi4/manifest.json?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single1/background.js?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/multi5/manifest.json?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single2/background.js?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single3/background.js?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level?r1=205793&r2=205792&pathrev=205793
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/extension_context_menu_browsertest.cc?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single1?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single2?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single3?r1=205793&r2=205792&pathrev=205793
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/context_menu_matcher.cc?r1=205793&r2=205792&pathrev=205793
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/context_menu_matcher.h?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/multi4/background.js?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/multi5/background.js?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/multi4?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/multi5?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single1/manifest.json?r1=205793&r2=205792&pathrev=205793
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/render_view_context_menu.cc?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single2/manifest.json?r1=205793&r2=205792&pathrev=205793
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/context_menus/top_level/single3/manifest.json?r1=205793&r2=205792&pathrev=205793

Fix top-level context menus sorting by name

BUG= 174878 
TEST=

Review URL: https://chromiumcodereview.appspot.com/12299013
------------------------------------------------------------------------
Comment 11 by dhni...@gmail.com, Jul 10, 2013
Status: Fixed
Status: Verified
Verified.
Chrome 29.0.1547.22
Sign in to add a comment