Commit graph

64 commits

Author SHA1 Message Date
Tomislav Jovanovic
7246699e3e Bug 1359704 - "page" context items should not appear in "tab" context r=mixedpuppy
MozReview-Commit-ID: 9Lz8ZzzbNhq

--HG--
extra : rebase_source : 8e66c4cfcccde065bbad74efeb5c3d549d23e2ec
2017-04-27 15:59:32 +02:00
Mark Banner
f10153a407 Bug 1358213 - Give WebExtension created menuitems in the context menu an ID. r=kmag
This matches the rest of the context menu and is better for unit tests.

MozReview-Commit-ID: 509HH4wnClN

--HG--
extra : rebase_source : 61456ee75f75baefd38fd9dd53e9cce9b7e3fefa
2017-04-20 20:48:16 +01:00
Kris Maglione
b13ea15e1c Bug 1317697: Remove things from ExtensionUtils that don't belong there. r=mixedpuppy
MozReview-Commit-ID: CTX0TckLqoV

--HG--
extra : rebase_source : ebea9b6f0f17a29d331851a08e025cbd04f4d02b
extra : absorb_source : 70b120f39e9307c4b2ef66d8e776e8b832b4aab8
2017-04-07 13:39:06 -07:00
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze
95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Kris Maglione
307bb6e57e Bug 1355120: Get rid of top-level window ID tracking. r=aswan
MozReview-Commit-ID: y7DzMxXBot

--HG--
extra : rebase_source : 0c68bc16eaa016bc7d0e228a95e10d9348dda59f
2017-04-12 14:12:22 -07:00
kernp25
656efd183a Bug 1339416 - contextMenus.OnClickData should have the frameId. r=mixedpuppy 2017-04-04 12:00:16 +02:00
Kris Maglione
e6d84db845 Bug 1350522: Part 4 - Convert browser APIs to lazy loading. r=aswan
MozReview-Commit-ID: BQoWF9nHOuF

--HG--
rename : browser/components/extensions/ext-desktop-runtime.js => browser/components/extensions/ext-browser.js
extra : source : 7fd4ade8811856e835506310a57725dbd355c786
extra : histedit_source : c1775902971f858bfaa386977ca8d579c0ce3c61%2C489e3ed33d4c1bb47c3afbe30849b42e83771f48
2017-04-02 11:59:55 -07:00
Shane Caraveo
c0ced9c42f Bug 1318791 support internal commands to open actions from context menus, r=kmag
MozReview-Commit-ID: 8haLmxc81BM

--HG--
extra : rebase_source : 5cab59045ef8df4ebf5beb7db1a8f9edb584c28c
2017-03-22 10:25:25 -07:00
Shane Caraveo
eefe88f8e9 Bug 1339440 use frameUrl to match context menus on frames r=kmag
MozReview-Commit-ID: LIlAZIP4HNx

--HG--
extra : rebase_source : 2272774352a8d1cfaf9a6b209891c9bfd94fff19
2017-03-16 15:02:28 -07:00
Phil Ringnalda
3a274bd10f Backed out changeset 075395ba45fe (bug 1339440) for browser_ext_contextMenus_chrome.js failures
CLOSED TREE
2017-03-15 18:32:50 -07:00
Shane Caraveo
caabad8144 Bug 1339440 use frameUrl to match context menus on frames r=kmag
MozReview-Commit-ID: LIlAZIP4HNx

--HG--
extra : rebase_source : 2c66049fa29bbd7e64eae485a26f764ef0041903
2017-03-15 15:58:53 -07:00
Kris Maglione
3fe8cbd2c9 Bug 1260548: Part 1 - Factor out the common functionality of the tabs API. r=aswan
MozReview-Commit-ID: AS7asn6nXzr

--HG--
extra : rebase_source : f81a28a979b6d1a76534343bed2029456cc6a2c7
2017-01-30 22:44:16 -08:00
Tomislav Jovanovic
f56c9857a4 Bug 1302742 - Add keyboard modifiers to contextMenus ClickInfo r=aswan
MozReview-Commit-ID: K4YnQdH5uOO

--HG--
extra : rebase_source : 68a01fef150987cf2d15a4f63e7693ee50707af7
2017-01-27 21:10:58 +01:00
Andrew Swan
322ee1283f Bug 1203330 Part 2 Convert EventManager uses to SingletonEventManager r=kmag
MozReview-Commit-ID: A12TPwAYzTS

--HG--
extra : rebase_source : 10526ee923dc1eed24bac3c9b9c80c54b8e174e9
2017-01-26 11:27:03 -08:00
Phil Ringnalda
9447dfdbd4 Backed out 3 changesets (bug 1203330) for failures in test_delay_update_webextension.js
CLOSED TREE

Backed out changeset 2d42350d209a (bug 1203330)
Backed out changeset 3a12c51c3eca (bug 1203330)
Backed out changeset 31fac390e15d (bug 1203330)
2017-01-26 19:13:11 -08:00
Andrew Swan
2dde6b8e9b Bug 1203330 Part 2 Convert EventManager uses to SingletonEventManager r=kmag
MozReview-Commit-ID: A12TPwAYzTS

--HG--
extra : rebase_source : 3e034fba247132c3b7a92ce8f4656136c2313a20
2017-01-26 11:27:03 -08:00
Luca Greco
60d15646a3 Bug 1324429 - Context menu items without contexts should inherit it from their parent. r=kmag
MozReview-Commit-ID: 9BKDdFZ6Hdd

--HG--
extra : rebase_source : 79d6fdc46caa0599160e2f797e103c0bf179c3e1
2016-12-21 16:44:30 -05:00
Florian Quèze
028a82f682 Bug 1329182 - remove trailing newURI null parameters in browser/, r=jaws. 2017-01-09 20:27:25 +01:00
Tomislav Jovanovic
689c8eff70 Bug 1316020 - Add separator before extension items in context menus r=kmag
MozReview-Commit-ID: LNQTZtNQgLN

--HG--
extra : rebase_source : 324262ce73f33206de5b15af9087a8e10c7ffe66
2016-12-06 01:29:09 +01:00
Tomislav Jovanovic
6db67b4e57 Bug 1316020 - Implement tab context for browser.contextMenus r=kmag
MozReview-Commit-ID: LNQTZtNQgLN

--HG--
rename : browser/components/extensions/test/browser/browser_ext_contextMenus_actionMenus.js => browser/components/extensions/test/browser/browser_ext_contextMenus_chrome.js
extra : rebase_source : 09094a700a5a7a1cc2d95ebea4fd6ddadf7928f2
2016-11-21 23:29:42 +01:00
Tomislav Jovanovic
92b6927b24 bug 1253418 - implement contextMenu page_action and browser_action contexts r=kmag
MozReview-Commit-ID: Ftp77zmxo4B

--HG--
extra : rebase_source : ed46fe948f0898e13dcc551721d56c5151a4bc4c
2016-11-09 21:03:33 +01:00
srivatsav
fdf44d1e9c Bug 1312466: Added a password context to contextMenus API. r=kmag
MozReview-Commit-ID: DzLX4JQTfRS

--HG--
extra : amend_source : 40ad422e18e3a8bb465dbf5d2143c712f1b15801
2016-11-22 16:57:43 +05:30
djmdev
f08897dbcb Bug 1274860 - Modify getContexts function so that page context is applied properly. r=kmag
--HG--
extra : rebase_source : 62f9766eafa3a8a1e3b0b1f3bc95c22904ec6047
2016-11-11 17:49:44 +05:30
Kris Maglione
aa7573eedb Bug 1315872: Refactor tests that check for promise rejection to use assertRejects. r=aswan
MozReview-Commit-ID: 1fBE7B2OdH7

--HG--
extra : rebase_source : bd9e12c0ef3f0735e7587fe5db19cc10cd5a47e5
extra : histedit_source : aa50834f1c2594e28eae83fded023df284d3d3c0
2016-11-07 22:04:49 -08:00
Rob Wu
0c66504d77 Bug 1287007 - Fix "onclick" in contextMenus, to child. r=billm
Main thing: Making contextMenus implementation webext-oop compatible.

Preparation:

- Add getParentEvent to ChildAPIManager to allow use of remote events.
- Introduce `addon_parent_only` to "allowedContexts" to only generate a
  schema API in the main process.
- Do not fill in `null` for missing keys if the schema declares a key as
  `"optional": "omit-key-if-missing"`. This is needed for the second
  point in the next list.

Drive-by fixes:

- Ensure that the "onclick" handler is erased when a context closes.
- Do not clear the "onclick" handler in `contextMenus.update` if the
  onclick key has been omitted (parity with Chrome).
- Remove some unnecessary `Promise.resolve()`
- Add extensive set of tests that check the behavior of the contextMenus
  APIs with regards to the onclick attribute in various scenarios.

MozReview-Commit-ID: A5f3AUQzU8T

--HG--
extra : rebase_source : 0464a1aa2387343a6f1d0fcd8fbabfdd1a68b1bb
2016-09-12 18:26:03 -07:00
Tomislav Jovanovic
6c44e70416 bug 1274809 - Add missing properties to OnClicked data, r=aswan
MozReview-Commit-ID: 4BodpIuKCz2

--HG--
extra : rebase_source : 981fe298e821c872898f503707ccd59fcb85b869
2016-09-21 02:12:11 +02:00
Rob Wu
be3652cd57 Bug 1287010 - Make environment of Context explicit. r=billm
- Add `envType` to BaseContext.
 - Pass an explicit envType to all `registerSchemaAPI` invocations.
 - The factories passed to `registerSchemaAPI` will be split up later, so
   that content scripts (`content_child`) and addon pages can share
   common implementations.
 - The factories that implement the addon API will also be split up,
   to separate code running in the main process (`addon_parent`) from
   code running in a child process (`addon_child`).
 - Remove the use of a hardcoded list of `namespaces` from ProxyContext.
   Now `envType` is used to specify whether an API should be activated.

MozReview-Commit-ID: Jiff8HIwG92

--HG--
extra : rebase_source : 946a3c0009a4e3223c2d10044b3099a94c845394
2016-08-16 15:51:50 -07:00
Rob Wu
bacc209644 Bug 1295082 - Put Extension in BaseContext r=kmag
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.

And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.

MozReview-Commit-ID: BgsGGCPQxJR

--HG--
extra : rebase_source : 7aa9fb7a53e057e8d3d8c477bd6821f8344c571a
2016-08-15 01:04:58 -07:00
Sebastian Hengst
2164cd95c8 Backed out changeset 0ce1cc39aa3d (bug 1295082) for timing out in test_ext_schemas_api_injection.js. r=backout 2016-08-18 16:47:09 +02:00
Rob Wu
dfc11d6f00 Bug 1295082 - Put Extension in BaseContext r=kmag
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.

And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.

MozReview-Commit-ID: BgsGGCPQxJR

--HG--
extra : rebase_source : 9a85d95f0c147198938b86c57127f6e7403fd53c
2016-08-15 01:04:58 -07:00
Rob Wu
ed596b32d9 Bug 1275126 - Implement targetUrlPattern for link contexts. r=kmag
MozReview-Commit-ID: EzqX8YbeQqI

--HG--
extra : transplant_source : %11%87%12%B3%C5a%C5%93c%05%16%04%D9g%D9%CD%B6%8AH%7B
2016-07-27 18:23:24 -07:00
Matthew Wein
7ea866f07e Bug 1275116 - Fix {document|target}UrlPatterns by passing in the correct arguments to SingleMatchPattern.match. r=kmag
MozReview-Commit-ID: LLNu7jNfUZq


G: changed browser/components/extensions/test/browser/head.js

--HG--
extra : transplant_source : %88%06%94%11%B5l%3B%9F%26%9CjGL%A3%F3%11%7F%40%D4Q
2016-07-14 14:41:03 -07:00
Pushpankar
c6670d980f Bug 1286854 - Replace ownerDocument.defaultView with ownerGlobal in browser/. r=dao
--HG--
extra : rebase_source : 72d50e73baf595840a2aade57ae782e4c40d4c27
2016-07-16 10:20:04 +02:00
Kris Maglione
63c5aef93a Bug 1272222: Use larger icons for browser actions in the menu panel. r=Gijs
MozReview-Commit-ID: 26lmlcrngPk

--HG--
extra : rebase_source : b9d6bfb7669d3cb826ccaa6728e153ad3e3b2b8b
2016-07-13 15:16:00 -07:00
Matthew Wein
930e6de010 Bug 1246044 - Part 2 - Fix issue where context menu items show up after extension is uninstalled. r=kmag
MozReview-Commit-ID: 9eGwSkY8PWo

--HG--
extra : rebase_source : 378af343cc7eb5363b90532ab423fe11e0d0a535
2016-07-05 17:11:21 -07:00
Matthew Wein
8b6e105036 Bug 1284265 - Fix regression caused by bug 1270742 which moved IconDetails into ExtensionUtils.jsm r=kmag
Postmortem: The context menu script, ext-contextMenus.js, uses IconDetails to show the extension icon next to the top level menu item. Originally, IconDetails lived in ext-utils.js because it was only used by Desktop.  However, in order to make it usable by Fennec for the PageActions API, it was moved into the shared ExtensionUtils.jsm.  Since none of the unit tests for ext-contextMenus.js covered the use of IconDetails, when it was moved it broke this part of the code. Switching it to use the version in ExtensionUtils.jsm fixes the issue. Lesson learned: Don't leave anything untested.

MozReview-Commit-ID: I6bFQnKvoMh

--HG--
extra : transplant_source : %140%8As%BC%86%17%0A%FE%85%F2%97P%19i%D8%84%AD%87%ED
2016-07-05 16:17:52 -07:00
Kris Maglione
a1dac7caad Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS

--HG--
extra : source : a00cf073f5c00380d4e42b13bc0cd3146b708845
extra : amend_source : d74ef90e88acbe62e33af3b5b9cf870d5c0a9d3e
2016-06-09 17:44:47 -07:00
Sebastian Hengst
f8035f62a8 Backed out changeset a00cf073f5c0 (bug 1279392) for failing mochitest test_ext_contentscript_create_iframe.html at least on Linux x64 opt. r=backout 2016-06-14 13:37:52 +02:00
Kris Maglione
b465305345 Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS

--HG--
extra : rebase_source : cba877c0ef400917b0b7e5913895e64ebefb34b9
extra : amend_source : 6e943015e3e00854c431cbd653994a6734e66ce4
2016-06-09 17:44:47 -07:00
Bob Silverberg
632b11bf2f Bug 1274877 - contextMenus API starts logging errors after removing an item, r=kmag
MozReview-Commit-ID: 86bxjxEQaQX
2016-06-07 15:26:08 -04:00
jdinartejesus
d7b2387a81 Bug 1250685 - Fix extension context menu for images. r=kmag 2016-04-11 00:40:50 +02:00
Matthew Wein
e1cc040df8 Bug 1250631 - Implement chrome.contextMenus.onClicked. r=kmag
MozReview-Commit-ID: Ic7opjJtmRB

--HG--
extra : transplant_source : %BF%F9%92%ABd%AA%E6%A6%AA%26%2B%CA%C1%23%FCl%2B%03%D8%B5
2016-03-23 02:39:10 -07:00
Matthew Wein
94fc7c715c Bug 1215375 - Add support for checkboxes, radio groups, and icons. r=kmag 2016-03-02 15:10:01 -08:00
Kris Maglione
ba2e5f60f4 Bug 1248855 - [webext] Add "object-curly-spacing" ESLint rule and auto-fix errors. r=billm
MozReview-Commit-ID: BAZ2rRl7eSM
2016-02-16 20:10:00 -08:00
Kris Maglione
a3bb54ada2 Bug 1234020: Part 2i - [webext] Return promises from the contextMenus API. r=rpl
--HG--
extra : commitid : 2Ki745t8xRB
extra : rebase_source : 5fe21e317050f7b7109cd555cbbd05ed2e9883f5
2016-02-01 18:14:55 -08:00
Kris Maglione
cf89a22459 Bug 1211366: Follow-up: Fix ESLint errors. r=trivial
--HG--
extra : commitid : CkUBR1wpIeR
extra : rebase_source : 67d877bd2a379412b357f98227b8bc47fd068595
2016-01-05 14:10:58 -08:00
Gabor Krizsanits
f77ea57991 Bug 1235376 - Handling %s in contextMenus. r=kmaglione 2016-01-04 16:54:59 +01:00
Gabor Krizsanits
99d250bd13 Bug 1211366 - parentId validation in contextMenus. r=kmaglione 2016-01-04 16:54:59 +01:00