Commit Graph

33 Commits

Author SHA1 Message Date
Rob Wu
81c67108a1 Bug 1215376 - Add menus.refresh to update menus r=mixedpuppy
Together with the previous patches that introduced menus.onShown,
this enabled extensions to update/remove menu items after a menu
has been shown.

At this point, it is not yet possible to add a menu item if an
extension has not shown a menu item before; this can be added later.

MozReview-Commit-ID: E0JrE9gd4gS
2017-09-13 03:14:00 +02:00
Rob Wu
9dbb913876 Bug 1215376 - Refactor gMenuBuilder.build r=mixedpuppy
Splot gMenuBuilder.build in three separate functions because the
individual functionality is needed later.

This is just moving some code around, nothing interesting to see.

MozReview-Commit-ID: Lo6QmLQBtO5
2017-09-12 02:34:41 +02:00
Rob Wu
b73320a628 Bug 1215376 - Ensure that menu elements have a unique ID r=mixedpuppy
Previously, there was no guarantee for the uniqueness of the ID.
Now the ID is unique, and always set.

See https://bugzil.la/1358213#c6 and #c7 for examples of collisions.

MozReview-Commit-ID: 7CHP6tWFDUg
2017-09-11 01:01:41 +02:00
Rob Wu
1100f72997 Bug 1215376 - Add onShown and onHidden to contextMenus/menus API r=mixedpuppy
This commit adds the bare minimum to support the onShown and onHidden
methods in the contextMenus and menus API (plus tests).

The onShown event data may be extended in a separate commit, to make it
easier to see how the additional properties are reflected in the tests.

MozReview-Commit-ID: 20VJS2YLhTN
2017-09-10 01:38:45 +02:00
Lukas Jung
c0171af084 Bug 1370228 - "Context menu title with placeholder always shows ellipsis" [r=mixedpuppy] 2017-12-21 08:33:00 +02:00
Kris Maglione
c8ea1d4273 Bug 1421459: Update to ESLint 4 "indent" rule. r=aswan
MozReview-Commit-ID: LxLDWlsIlSk
2017-11-28 14:13:59 -08:00
Tim Nguyen
58e5afb568 Bug 1370499 - Support WebExtensions bookmark context menus. r=mixedpuppy
MozReview-Commit-ID: AkYxeGHlDvi
2017-11-20 23:01:02 +00:00
Tomislav Jovanovic
de15b36683 Bug 1409433 - Handle contextmenu clicks in non-tab content r=aswan
MozReview-Commit-ID: BSTb0ATBfbh
2017-11-01 23:00:33 +01:00
Mark Banner
e47ccbfec3 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo
2017-10-26 11:47:01 +01:00
Carsten "Tomcat" Book
b83067d218 merge mozilla-inbound to mozilla-central a=merge 2017-08-08 13:18:14 +02:00
Kris Maglione
5b5382fb8b Bug 1387907: Part 3 - Merge ext-browser.js and ext-utils.js. r=mixedpuppy
MozReview-Commit-ID: CmOax5b5Gki
2017-08-06 18:20:25 -07:00
Tomislav Jovanovic
80c37829b7 Bug 1370716 - Only try to add _action menus if extension has permission r=mixedpuppy
MozReview-Commit-ID: KpT1RH30NMh
2017-08-06 23:27:10 +02:00
Tomislav Jovanovic
52b73d0b6a Bug 1385528 - Fix tools_menu in newly opened windows r=kmag
MozReview-Commit-ID: B9gTIzYDVdk
2017-07-29 20:51:47 +02:00
Tomislav Jovanovic
6b6b1d4751 Bug 1268020 - Implement "tools_menu" context r=kmag
MozReview-Commit-ID: KPUsBbqyQTC
2017-06-28 16:19:24 -07:00
Kris Maglione
497bcba4b3 Bug 1382501: Don't use NetUtil to parse URIs. r=trivial
MozReview-Commit-ID: BepyXBOOuv2
2017-07-19 18:26:41 -07:00
Swapnesh Kumar Sahoo
644cd8eb67 Bug 1321544 - Support icons for context menu items; r=zombie
MozReview-Commit-ID: HLaL8h0WK2c
2017-07-11 22:27:20 +05:30
Wes Kocher
b987e71f1d Backed out changeset c3f7c2d4303f (bug 1321544) for frequent failures in browser_ext_contextMenus_icons.js a=backout 2017-06-30 11:36:34 -07:00
Shane Caraveo
c674d4fe17 Bug 1338898 fix 150 char limit for context menu text selection, r=aswan,mattw
MozReview-Commit-ID: IqECfaFSbGZ
2017-06-29 15:11:29 -07:00
Swapnesh Kumar Sahoo
49cab8bdb0 Bug 1321544 - Support icons for context menu items; r=mixedpuppy,zombie
MozReview-Commit-ID: 2caNYYCQ7C7
2017-06-15 01:32:00 +05:30
Andrew Swan
3358f38632 Bug 1369577 Part 2 Propagate isHandlingUserInput for browserAction, pageAction, and menus r=kmag
The implementations of browserAction, pageAction, and menu onClick
handlers now stash the current <browser> until we get a reply from
the extension process indicating that the handler has finished running.
We also have to take care to keep that <browser> around even if the
permissions api has to be loaded asynchronously.

MozReview-Commit-ID: BYJaiwdj40u
2017-06-15 12:48:40 -07:00
Andrew Swan
3d501bbfd5 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Sebastian Hengst
8642712c2a Backed out changeset 26fd6d0a1254 (bug 1369577) for failing xpcshell's test_ext_simple.js and test_ext_startup_cache.js on Android. r=backout 2017-06-30 01:01:13 +02:00
Sebastian Hengst
c48d1b793d Backed out changeset dfb376de5c23 (bug 1369577) 2017-06-30 00:59:59 +02:00
Andrew Swan
e77019e2bd Bug 1369577 Part 2 Propagate isHandlingUserInput for browserAction, pageAction, and menus r=kmag
The implementations of browserAction, pageAction, and menu onClick
handlers now stash the current <browser> until we get a reply from
the extension process indicating that the handler has finished running.
We also have to take care to keep that <browser> around even if the
permissions api has to be loaded asynchronously.

MozReview-Commit-ID: BYJaiwdj40u
2017-06-15 12:48:40 -07:00
Andrew Swan
c140bd9d12 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Bob Silverberg
0ae12dfd8e Bug 1374237 - Part 3: Declare all top-level functions in browser API files files via const., r=mixedpuppy
Also changed some function names to attempt to guarantee uniqueness across API files.

MozReview-Commit-ID: FU5JU1lRHzn
2017-06-21 16:13:00 -04:00
Thomas Wisniewski
c914dbf768 Bug 1343236 - Add support for linkText to contextMenus.OnClickData. r=mixedpuppy
MozReview-Commit-ID: B0s5sPztciH
2017-06-20 17:38:18 -04:00
Tomislav Jovanovic
8542af1e2d Bug 1333403 - Part 3: Fix using browser.menus from multiple contexts r=kmag
MozReview-Commit-ID: XlP72cr0VT
2017-04-25 23:51:26 +02:00
Tomislav Jovanovic
a00ccaaac6 Bug 1333403 - Part 2: Implement browser.menus as alias for contextMenus r=kmag
MozReview-Commit-ID: JPaKsOyavDb
2017-06-10 16:43:20 +02:00
Sebastian Hengst
4bc880baf0 Backed out changeset cfc47df74537 (bug 1333403) 2017-06-10 16:06:44 +02:00
Sebastian Hengst
0fcb1d642b Backed out changeset d842c744941e (bug 1333403) 2017-06-10 16:06:12 +02:00
Tomislav Jovanovic
d65d26e7e6 Bug 1333403 - Part 3: Fix using browser.menus from multiple contexts r=kmag
MozReview-Commit-ID: XlP72cr0VT
2017-04-25 23:51:26 +02:00
Tomislav Jovanovic
82cdece9f1 Bug 1333403 - Part 2: Implement browser.menus as alias for contextMenus r=kmag
MozReview-Commit-ID: JPaKsOyavDb
2017-06-06 23:25:06 +02:00