Commit Graph

46 Commits

Author SHA1 Message Date
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Gijs Kruitbosch
d59dbba7eb Bug 1345081 - update use of spellchecker 'editable' flags, r=zombie
MozReview-Commit-ID: Hxgc0UuIOPj
2018-01-12 18:51:41 +00:00
Andreea Pavel
27898fe230 Backed out changeset 5421387a997d (bug 1345081)for failing browser chrome browser/components/extensions/test/browser/browser_ext_menus_events.js on a CLOSED TREE 2018-01-26 17:23:27 +02:00
Gijs Kruitbosch
8f3cf68607 Bug 1345081 - update use of spellchecker 'editable' flags, r=zombie
MozReview-Commit-ID: Hxgc0UuIOPj
2018-01-12 18:51:41 +00:00
Rob Wu
d07a37a836 Bug 1215376 - fix linting and test issues from rebase r=mixedpuppy
- Work-around in browser_ext_menus_events.js for bug 1428213
- Fix indentation issues (eslint)
- Hide the "pageUrl" property for bookmark menu events
  (fixes test failure in test_bookmark_contextmenu).

MozReview-Commit-ID: 4YHJci0J7Rh
2018-01-05 01:13:04 +01:00
Rob Wu
7411473343 Bug 1215376 - Fire menus.onShown for every menu r=mixedpuppy
This commit lifts the restriction that onShown is only fired for
extensions with a visible menu item.

MozReview-Commit-ID: Ao4MgBoRWLR
2017-09-14 18:28:36 +02:00
Rob Wu
979499e4bc Bug 1215376 - refactor: re-use onShown event generator for onClicked r=mixedpuppy
The logic in onClicked had some flaws:
- editable can be undefined instead of a boolean.
- linkText, linkUrl is set in non-link contexts.
- srcUrl is set even in non-media contexts.

This change does not add new tests, because test coverage for the
event data generator is provided by:
browser/components/extensions/test/browser/browser_ext_menus_events.js

There is one observable change here.
Previously, linkUrl and linkText would also be set for non-link context
if the selected text contained a URL. When this happens, then
nsContextMenu.js sets onPlainTextLink=true.
With this refactor, linkText and linkUrl are only set if the context is
"link" (onLink=true).

MozReview-Commit-ID: 2xf1F41bn0U
2017-09-14 16:41:14 +02:00
Rob Wu
e5749a5a53 Bug 1215376 - Add more contextual information to onShown r=mixedpuppy
- Adds most of the OnClickData properties to the onShown event parameter
  (except for menu-specific properties such as parentMenuId / checked).
- Add tests to verify the values of these properties.

MozReview-Commit-ID: 7705sJyAOIJ
2017-09-14 16:37:57 +02:00
Rob Wu
fa82f4d484 Bug 1215376 - Always use old contextData upon refresh r=mixedpuppy
MozReview-Commit-ID: K1wfFCYpMqB
2017-09-14 02:11:29 +02:00
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