Commit Graph

15 Commits

Author SHA1 Message Date
Rob Wu
02cec6c6cb Bug 1494957 - Stop throwing outside of contextmenu events r=mixedpuppy
Stop checking whether `browser.menus.overrideContext` is called during
a `contextmenu` event, because the implementation cannot rely on
`window.event` due to bug 1493869.
Because of the removed check, `overrideContext` does not throw any more
when called outside of a "contextmenu" event. An extra check was added
to make sure that this does not impact menus of non-extension documents.

The new implementation has the following other effects:
- overrideContext can be called from shadow DOM (+tests).
- overrideContext can be called for context menu in a different
  (same-origin) document (e.g. a menu in a blank child frame).

Differential Revision: https://phabricator.services.mozilla.com/D7249
2018-10-01 15:43:54 +00:00
Rob Wu
836fd50f9c Bug 1280347 - Remove <all_urls> requirement for the "tab" context r=mixedpuppy
See https://bugzilla.mozilla.org/show_bug.cgi?id=1280347#c28

Differential Revision: https://phabricator.services.mozilla.com/D6831
2018-09-27 15:32:14 +00:00
Rob Wu
124ccb5eab Bug 1280347 - Support changing context type to tab and bookmark r=mixedpuppy
This allows extensions to include tab/bookmark menu items from other
extensions. Built-in menu items from the browser are *not* added.

Depends on D6623

Differential Revision: https://phabricator.services.mozilla.com/D6624
2018-09-27 08:21:05 +00:00
Rob Wu
f05b3204a5 Bug 1367160 - Allow extensions to hide default menu items r=mixedpuppy
The new method allows extensions to modify menu items in their own
moz-extension:-pages, with the following features:

- All matching extension items are shown in the root menu (instead of
  being moved into a submenu), above other menu items, if any.
- The icons for these menu items are customizable.
- Optionally, the default menu items (including those from other
  extensions) can be hidden.

Depends on D6621

Differential Revision: https://phabricator.services.mozilla.com/D6622
2018-09-25 16:41:47 +00:00
Rob Wu
62eed67e94 Bug 1454627 - Run "onclick" event of menu with user input r=mixedpuppy
MozReview-Commit-ID: r1URJfOKUB
2018-07-27 19:06:00 +02:00
Bogdan Tara
feafe17abc Backed out 3 changesets (bug 1454627) for test-oop-extensions/browser_ext_user_events.js failures
Backed out changeset 38d9cbe6e3d2 (bug 1454627)
Backed out changeset 44b38de7dc3d (bug 1454627)
Backed out changeset 22de883763ac (bug 1454627)
2018-08-01 00:36:28 +03:00
Rob Wu
751fcead2b Bug 1454627 - Run "onclick" event of menu with user input r=mixedpuppy
MozReview-Commit-ID: r1URJfOKUB
2018-07-27 19:06:00 +02:00
Coroiu Cristina
d92d7acb5a Backed out 2 changesets (bug 1454627) for frequently failing browser-chrome at browser/components/extensions/test/browser/test-oop-extensions/browser_ext_user_events.js
Backed out changeset 3285f664c261 (bug 1454627)
Backed out changeset 9661870b7453 (bug 1454627)
2018-07-31 03:49:03 +03:00
Rob Wu
af9c99b63b Bug 1454627 - Run "onclick" event of menu with user input r=mixedpuppy
MozReview-Commit-ID: r1URJfOKUB
2018-07-27 19:06:00 +02:00
Rob Wu
3aaa36a5d2 Bug 1366702 - Invoke menus.create callback if error occurs + tests r=mixedpuppy
MozReview-Commit-ID: 6TuxyXVtWrI
2018-07-20 19:59:55 +02:00
Kris Maglione
bb663b9c15 Bug 1471102: Move more code out of ExtensionUtils.jsm. r=aswan
MozReview-Commit-ID: Fqlv5BRuuW8
2018-06-25 19:30:21 -07:00
Andrew Swan
dfdaca71bf Bug 1450388 Part 1 Refactor EventManager r=kmag
As we add more behaviors to EventManager, the signature of the constructor
is going to get really clumsy.  Head that off by converting it to take a
general parameters object.

This introduces a compatibility problem for existing webextension experiments,
put in a backward-compatibility shim for now.

MozReview-Commit-ID: 72QDfiwRm5j
2018-03-14 14:52:44 -07:00
Kris Maglione
12808f301b Bug 1372406: Stop misusing import-globals-from in extension API scripts. r=aswan
MozReview-Commit-ID: FTkcmuguOwq
2018-03-25 21:20:17 -07:00
Margareta Eliza Balazs
6f3465c977 Backed out changeset 6af40fb76692 (bug 1372406) for Doc lint failure in builds/worker/checkouts/gecko/docs-out/html/main/_staging/python/mach.commands.rst on a CLOSED TREE 2018-03-28 07:26:10 +03:00
Kris Maglione
908b434d49 Bug 1372406: Stop misusing import-globals-from in extension API scripts. r=aswan
MozReview-Commit-ID: FTkcmuguOwq
2018-03-25 21:20:17 -07:00