Commit Graph

79 Commits

Author SHA1 Message Date
Michael Kaply
75cc371860 Bug 1571639 - Don't add distro bookmarks if profile has been reset. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D42944

--HG--
extra : moz-landing-system : lando
2019-08-21 22:18:37 +00:00
Victor Porof
1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00
Kris Maglione
e930b89c34 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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Kris Maglione
2fe0de01dc Bug 1519596: Part 1 - Remove several unnecessary/unused ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16377

--HG--
extra : rebase_source : 6c4311387d25de425806aeb6c4691e12c9fcb855
2019-01-11 16:59:23 -08:00
Hector Zhao
b73c2c6e9b Bug 1513162 - Use guid with known prefix for bookmarks from distribution.ini. r=mak,mkaply
Also stop setting keyword with distribution.ini.

Differential Revision: https://phabricator.services.mozilla.com/D15489

--HG--
extra : moz-landing-system : lando
2019-01-10 20:54:53 +00:00
Marco Bonardo
856e00c5d0 Bug 1498493 - Fix misuse of livemarks in distribution.js. r=Gijs
Removes the addLivemark call from distribution.js, instead creates a bookmark pointing to the site uri.
Note, bookmarks in distribution are not tested, as such this one doesn't have a test as well.
Fixes a possible intermittent failure in test_distribution.js.
Removes a livemarks test that was no more run.

Differential Revision: https://phabricator.services.mozilla.com/D8523

--HG--
extra : moz-landing-system : lando
2018-10-12 10:05:34 +00:00
Zibi Braniecki
83ea94f5ba Bug 1491394 - Update callsites to use new mozILocaleService API. r=jfkthame
Depends on D5924

Differential Revision: https://phabricator.services.mozilla.com/D6339

--HG--
extra : moz-landing-system : lando
2018-09-21 15:30:37 +00:00
Kris Maglione
1c20e8cbbb Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270

--HG--
extra : rebase_source : 2adadcc8e51a7bce1da02f4bee1333b77bfa9944
extra : histedit_source : 9df920fd186f8c96a5d8b9cbff53ea9529f26ee0
2018-08-24 16:22:40 -07:00
Mark Banner
691543ee89 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

Differential Revision: https://phabricator.services.mozilla.com/D4439

--HG--
extra : moz-landing-system : lando
2018-08-31 05:59:17 +00:00
Brian Grinstead
96dc530924 Bug 1476333 - Refer to AppConstants.BROWSER_CHROME_URL to get the browser URL from the frontend;r=Gijs
Before this change, we accessed the browser URL in the following ways:

- "chrome://browser/content/browser.xul"
- "chrome://browser/content/" (which redirects to chrome://browser/content/browser.xul)
- Services.prefs.getCharPref("browser.chromeURL") which returns "chrome://browser/content/"
- getBrowserURL() from utilityOverlay.js

MozReview-Commit-ID: I5vtRke1x9t

--HG--
extra : rebase_source : c525350a1954740873e85b045cbb14a8b43aa89d
2018-07-24 08:12:50 -07:00
Brian Grinstead
8ceaae11ca Bug 1476030 - Part 1 - Expose xulStore through Services;r=Gijs
This lets us use Services.xulStore instead of requiring
Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);

MozReview-Commit-ID: 2eXifCPhlGs

--HG--
extra : rebase_source : c65b9395cc192d05d1a348cfbf92f7f59d41dc8f
2018-07-18 09:43:38 -07:00
Michael Kaply
ebfd1754d0 Bug 947838 - Don't reload distro prefs, just load at the same time as customizations. r=florian
MozReview-Commit-ID: DPaE92V2xKg

--HG--
extra : rebase_source : 44779cb8a8f9cfd2f18f8dec715e4bfe7c8bd5d3
2018-07-05 16:02:00 -05:00
Mark Banner
1808cc5dec Bug 1467996 - Remove all the code adding a description annotation. r=mak,lina
MozReview-Commit-ID: CRBSxJtJELp

Differential Revision: https://phabricator.services.mozilla.com/D1748
2018-06-26 12:33:45 +00:00
Michael Kaply
8e30040533 Bug 1450270 - Special case general.useragent.locale in distributions. r=gandalf
MozReview-Commit-ID: Js9UxBCxht3

--HG--
extra : rebase_source : 538f96d9d3c07c95aa03062916bdc9098dcdb9c9
2018-03-30 10:37:27 -05:00
Florian Quèze
682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Kris Maglione
918ed6c474 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 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
6476f95b13 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb 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
c276bb9375 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

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Mark Banner
42cb2dc6a3 Bug 1230373 - Enable mozilla/use-services for browser/components/ r=mossop
MozReview-Commit-ID: 9m9iss3jUJJ

--HG--
extra : rebase_source : e6a6f9dec168ab1d0e0343236db65f3dd1b44aeb
2017-10-11 15:43:51 +01:00
Dan Banner
7caa92d5d8 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Felipe Gomes
8fdbde86fe Bug 1389344 - Avoid checking for distribution.ini existence on every startup. r=mkaply
We can do this check only once after an update, and cache the value until the next app update.

MozReview-Commit-ID: 1yxiKnHIAi2
2017-09-19 14:41:06 -03:00
Rajesh Kathiriya
48e6bc2124 Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8
MozReview-Commit-ID: FadrI2li43G

--HG--
extra : rebase_source : b455e846ab79c8141150517e67e542e3e06d630e
2017-07-25 23:45:41 +05:30
Marco Castelluccio
0abc80eebf Bug 1357517 - Remove or delay Preferences.jsm usage from some browser/components/* files. r=Gijs
--HG--
extra : rebase_source : 8ae926bfde827b9a5323d6fb96dc231d429ab9b0
2017-07-31 13:25:41 +02:00
Florian Quèze
5e3539e504 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Zibi Braniecki
a1a4f0b7c9 Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
most of the callsites that are looking for the first of the requested locales.

In most cases, I'm just matching the behavior of the code with reusing
LocaleService API instead of direct manipulation on the prefs.
That includes how I handle error case scenarios.

In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
the custom one from the file since the ones in LocaleService are just
more correct and unified accross the whole platform.

In case of FallbackEncoding I have to turn it into a nsIObserver to listen
to intl:requested-locales-changed.

MozReview-Commit-ID: 7rOr2CovLK

--HG--
extra : rebase_source : 883a91b249b6953b7872bfb9a8851e8be7257c7b
2017-03-11 18:43:11 -08:00
Sebastian Hengst
7b30105d39 Backed out changeset 60d72c2dd49d (bug 1346616) for eslint failure in DirectoryLinksProvider.jsm. r=backout on a CLOSED TREE 2017-04-18 00:48:16 +02:00
Zibi Braniecki
cce53c69bc Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
most of the callsites that are looking for the first of the requested locales.

In most cases, I'm just matching the behavior of the code with reusing
LocaleService API instead of direct manipulation on the prefs.
That includes how I handle error case scenarios.

In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
the custom one from the file since the ones in LocaleService are just
more correct and unified accross the whole platform.

In case of FallbackEncoding I have to turn it into a nsIObserver to listen
to intl:requested-locales-changed.

MozReview-Commit-ID: 7rOr2CovLK

--HG--
extra : rebase_source : 2f166cf1746f389a035f7cf557edcadeacb10fa0
2017-03-11 18:43:11 -08:00
Florian Queze
f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Sebastian Hengst
738d097aae Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze
3c564a2b02 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Quèze
cd762cc83c Bug 1344711 - script-generated patch to remove try blocks around get*Pref calls, r=jaws.
--HG--
extra : rebase_source : c6e20e6e79b0ca5de751c52712d96cbea9432d26
2017-03-07 15:29:48 +01:00
Michael Kaply
ea4b127f8c Bug 1324031 - LocalizablePrefs not handling falsey correctly. r=mixedpuppy
MozReview-Commit-ID: 4GcjZTgoJ2F

--HG--
extra : rebase_source : dc5e6e070abf92a2ac9b093a76894e175c226ed2
2017-01-10 15:20:18 -06:00
Florian Quèze
028a82f682 Bug 1329182 - remove trailing newURI null parameters in browser/, r=jaws. 2017-01-09 20:27:25 +01:00
Jared Wein
9141469edf Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit. r=MattN
MozReview-Commit-ID: FuVu8skcqOe

--HG--
extra : rebase_source : 8ab34c4e46a7c3075b459bf44786ec184d10d203
2016-12-30 21:47:25 -05:00
Mark Banner
a41b5adcb0 Bug 1314918 - Fix most of the remaining no-unused-vars issues for local scope in browser/. r=mossop
MozReview-Commit-ID: LdoXLniNeT7

--HG--
extra : rebase_source : d2418b8cfab0a399d0dfb5a96ea50c62fac63e70
2016-11-03 11:51:48 +00:00
Michael Kaply
6e3181bbec Bug 1313427 - menu bar is controlled with autohide, not collapsed. r=mixedpuppy
MozReview-Commit-ID: 7ZYJP2ALixJ

--HG--
extra : rebase_source : c0a9c38b55110336e92b482c2b527279bf47eea9
2016-10-31 11:31:58 -05:00
Jared Wein
fd84c776c7 Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh
MozReview-Commit-ID: EMjJ3yWt9Wt

--HG--
extra : rebase_source : 2b8327e5a7cf0bfd190d696ad5fe475f13faa3cc
2016-08-04 03:28:58 -04:00
Michael Kaply
472f566af8 Bug 1254268 - Distribution should use default prefs, regression from 1252466; r=mconnor 2016-03-08 09:39:45 -06:00
Michael Kaply
94377b6e83 Bug 782924 - Allow locale specific preferences in distribution.ini; r=mixedpuppy 2016-03-02 15:04:38 -06:00
Michael Kaply
fc12ac3982 Bug 1252466 - Switch distribution.js to use Preferences.jsm; r=mixedpuppy 2016-03-01 10:58:04 -06:00
Michael Kaply
69571aa045 Bug 1251729 - Don't use eval for distribution.js; r=mixedpuppy 2016-02-29 10:47:01 -06:00
Michael Kaply
ecb44c4c0c Bug 1249742 - Don't set prefs at all if overridden by lang or locale; r=mixedpuppy 2016-02-26 14:47:53 -06:00
Michael Kaply
459b5b8e45 Bug 1239949 - Add a pref for showing bookmarks toolbar and menubar; r=mixedpuppy
MozReview-Commit-ID: KqCSjlhWAOo

--HG--
extra : rebase_source : 5a25d574ea29b5f4949301ea8fcb20da8fc8cb59
2016-02-24 09:47:52 -06:00
Michael Kaply
ea9d3ac61a Bug 1249630 - Add language support to distribution.js; r=mixedpuppy 2016-02-19 10:59:15 -06:00
Hector Zhao
024dad17ee Bug 1220547 - Setting favicon and keyword for a bookmark in distribution.ini. r=mak
--HG--
extra : transplant_source : %CE%D0%B3J%92%A0%82%3E%F9%F5Ns%2A%9Aim%10%AE%E4%E2
2015-10-30 11:22:29 +08:00
Carsten "Tomcat" Book
08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00