Commit Graph

24 Commits

Author SHA1 Message Date
Kris Maglione
856fa07b17 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750
2019-01-17 10:18:31 -08:00
Rob Wu
4b28cecd93 Bug 1518598 - Return early if popup has already been closed r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D16033
2019-01-15 18:50:49 +00:00
Shane Caraveo
31fa1190d3 Bug 1516655 fix widget.node checks in browserAction code, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D15475
2019-01-07 19:38:49 +00:00
Shane Caraveo
a23b989875 Bug 1345474 - support showInPrivateBrowsing in browserAction, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D11670
2018-12-10 21:32:04 +00:00
Nicklas Boman
beca7e6615 Bug 1370224 - Fallback to extension icon for browser/page action r=mstriemer,mixedpuppy 2018-11-04 20:03:15 +01:00
Luca Greco
2f770d260e Bug 1489315 - Move ExtensionTelemetry into its own JSM module. r=mixedpuppy
This patch moves the ExtensionTelemetry helpers (added into ExtensionUtils.jsm by Bug 1483002)
into a new ExtensionTelemetry.jsm and makes the ExtensionTelemetry a lazy getter on every one
of the JSM and API modules that are going to use it, so that we don't have to load these helpers
until they are actually used and we can reduce their impact on the base content memory usage.

Differential Revision: https://phabricator.services.mozilla.com/D5266
2018-09-07 16:27:44 +00:00
Luca Greco
444c28eb82 Bug 1483002 - Added WEBEXT probes keyed by addon id. r=janerik,mixedpuppy
This patch contains a set of changes needed to add WEBEXT telemetry probes keyed by addon id.

The telemetry probes keyed by addon id has been added as separate telemetry histograms
named after the related generic WEBEXT probe with the additional "_BY_ADDONID" suffix.

A set of small helper methods have been defined in a new ExtensionTelemetry object, exported
by the ExtensionUtils.jsm.

Differential Revision: https://phabricator.services.mozilla.com/D4437
2018-09-05 20:16:35 +00:00
Oriol Brufau
1f2b53400e Bug 1483684 - Fix browserAction ignoring tab-specific or window-specific popups and showing global one instead. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D3465
2018-08-16 13:14:44 +00:00
Brian Grinstead
c8b3483e82 Bug 1479538 - Rewrite non-test callers of document.createElementNS(XUL_NS, ...) to use document.createXULElement(...);r=paolo
Differential Revision: https://phabricator.services.mozilla.com/D3275
2018-08-14 16:22:44 +00:00
Oriol Brufau
9c26397c74 Bug 1474110 - Choose browserAction text color among white and black, maximizing contrast r=mixedpuppy
MozReview-Commit-ID: CykmiUc0BsO
2018-07-08 02:15:27 +02:00
Oriol Brufau
2c930a2906 Bug 1476818 - Choose right add-on icon size for browserAction in the Overflow Menu r=mixedpuppy
MozReview-Commit-ID: J8J4g1jYPfQ
2018-07-19 01:39:42 +02:00
Oriol Brufau
4b3c1bd63a Bug 1475714 - Remove webextension code for legacy 18x18 icons r=mixedpuppy
MozReview-Commit-ID: CNU1c7IA3Hn
2018-07-15 18:00:26 +02:00
Oriol Brufau
18bcbbf61f Bug 1424620 - Add setBadgeTextColor and getBadgeTextColor methods to browserAction r=mixedpuppy
MozReview-Commit-ID: ALYerCv3YJ7
2018-07-05 19:37:08 +02:00
Kris Maglione
0847e8227e Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8
MozReview-Commit-ID: 9APGewiDDYB
2018-05-25 17:02:29 -07:00
Shane Caraveo
7c4e7aca47 Bug 1404724 - remove browser_style warning, fix default values, r=aswan
MozReview-Commit-ID: Akdhrm4leIQ
2018-05-29 16:55:43 -04:00
Oriol Brufau
7282a2a9b7 Bug 1451176 - Preserve tab-specific data when tab is moved to another window r=mixedpuppy
MozReview-Commit-ID: 80h4U7G3gmb
2018-04-04 16:04:11 +02:00
Oriol Brufau
a6446f33a9 Bug 1457474 - Add 'Manage Extension' in browserAction context menu r=Gijs,mixedpuppy
MozReview-Commit-ID: 3iA7fCeXLVs
2018-05-14 22:23:21 +02:00
Oriol Brufau
757d3e78ea Bug 1463012 - Use Node.contains instead of isAncestorOrSelf r=mixedpuppy
MozReview-Commit-ID: 9lxgl5bupBF
2018-05-15 13:33:14 +02:00
Oriol Brufau
23a600b8f4 Bug 1419893 - Add windowId parameter in browserAction methods r=mixedpuppy
MozReview-Commit-ID: FFb4I1wmTH
2018-04-06 23:18:44 +02:00
Sam Foster
de7fca41ea Bug 1457389 - Check if extension is in the overflow menu when setting fixedWidth on the popup. r=rpl
MozReview-Commit-ID: 3NqnOMpu18M
2018-04-30 09:56:27 -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