Граф коммитов

852 Коммитов

Автор SHA1 Сообщение Дата
Myk Melez 25349d2601 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +00: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
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Kris Maglione 6fb571f4fb Bug 1356412: Part 2 - Remove script loader path mangling from DOM code. r=bz
As in part 1, this no longer serves any purpose.

This patch also removes the otherwise unused WrappersEnabled() method, which
was similarly only useful before we had compartment-based security isolation.
Its functionality is now handled by compartment flags.

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

--HG--
extra : rebase_source : e4c85eda6cdf430844dea828e2eee3a083f2616d
2018-11-02 16:15:26 -07:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +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 c6885f5391 Bug 1488445 - Remove and replace obsolete ESLint rules. r=mossop
This removes a number of references to rules that are now deprecated or removed from ESLint.

- no-native-reassign is replaced with no-global-assign
- no-spaced-func is replaced with func-call-spacing (where enabled)

Depends on D4944

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

--HG--
extra : moz-landing-system : lando
2018-09-04 18:08:43 +00:00
Kris Maglione b72957664f Bug 1486182: Follow-up: Fix ESLint error. r=eslint-fix,test-only
--HG--
extra : rebase_source : df6cfdcd41ec22079340a1f52ae7792df09384ca
2018-08-28 14:06:05 -07:00
Boris Zbarsky dbd89b9ce3 Bug 1479544. Remove nsIXULChromeRegistry::ReloadChrome. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D2699
2018-08-03 15:14:43 +00:00
Brendan Dahl 133e16ecf4 Bug 1449791 - Remove platform support of overlays. r=bz
The following was removed:
- the main meat of the overlays and interface in XULDocument
- all overlay observers and forward references
- the notion of a master document
- XUL overlay provider
- manifest parsing of overlay attribute
- references to "overlay" atom
- restrictions on persistence (only need because of overlays)
- unused code that the above referenced

I also attempted to update comments that referenced overlays, but there is still
some work to be done here.


MozReview-Commit-ID: 8lrirzcgSuJ

--HG--
extra : rebase_source : 25b4e1d3fb2af6f02d894887271fd345c9c2083b
2018-03-28 18:20:04 -07:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Brendan Dahl 7c6e7fdabc Bug 1450753 - Remove XUL style overlays. r=Nika
Style overlays are no longer used outside of tests.

MozReview-Commit-ID: 798Id5JITAm

--HG--
extra : rebase_source : edfbfc973f865d72bbc019a26519436157476793
2018-06-06 15:15:25 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Boris Zbarsky ed3c958547 Bug 1463889 part 1. Switch nsPIDOMWindowOuter::GetFrames to returning an nsDOMWindowList. r=qdot 2018-05-24 23:32:19 -04:00
Adrian Wielgosik c501e3beb0 Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle

--HG--
extra : rebase_source : a48b7c72a0f7ede38c91149a04d5de53987736f1
2018-05-11 19:46:15 +02:00
Valentin Gosu bd4365d7e7 Bug 1448058 - Remove nsIMutable from URI implementations r=mayhemer
* Also removes NS_TryToMakeImmutable, NS_TryToSetImmutable, URIIsImmutable
* NS_EnsureSafeToReturn, nsINetUtil.toImmutableURI

MozReview-Commit-ID: 5eFtFm2CQt7

--HG--
extra : rebase_source : 1f3d23ec646883e76844d42113bc1c71c01a1ad7
2018-05-09 18:21:24 +02:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Emilio Cobos Álvarez c556ec7ad0 Bug 1457920: Remove ServoStyleSheet usage. r=xidorn
MozReview-Commit-ID: LIBkovuQ6MB
2018-05-02 04:13:26 +02:00
Emilio Cobos Álvarez bf64474d79 Bug 1457920: Remove StyleSheet::AsServo. r=xidorn
MozReview-Commit-ID: IkkJvUFHykk
2018-05-02 04:13:21 +02:00
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Brendan Dahl 45606c3a4e Bug 1448162 - Remove all XUL overlay tests. r=Gijs
MozReview-Commit-ID: 1hSLa2goMLt

--HG--
extra : rebase_source : 643a82bfab12f2534ad39ca9f95f5e0c0afcbd1a
2018-03-22 16:21:26 -07:00
Xidorn Quan 4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +11:00
Andrea Marchesini 5784769019 Bug 1443079 - nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug 2018-03-13 06:40:38 +01:00
Valentin Gosu 7bd0336d01 Bug 1433958 - Change code that sets nsIURI.pathQueryRef to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: HVyZ3E1XuLN

--HG--
extra : rebase_source : fd122b3122e0f3eb371d429bd86ad35d09dcfbf6
2018-02-26 20:43:45 +01:00
Masatoshi Kimura ec550d5f9a Bug 1428258 - Stop using GetNativePath in chrome/. r=mayhemer
MozReview-Commit-ID: EhsuLxIA1zj

--HG--
extra : rebase_source : cc38d57f5b7eb987e08bf2e96a4c7a1a160bb0e1
extra : intermediate-source : c559b7c9edd7dccbd3320062f7d052d3a2224924
extra : source : 3002b644030043b101113be9ae1cbb2ade951f09
2017-12-17 23:56:09 +09:00
Zibi Braniecki 5849ff1145 Bug 1431260 - Migrate LocaleService::AvailableLocales from ChromeRegistry to multilocale.txt. r=jfkthame
MozReview-Commit-ID: 6S4VaAvDako

--HG--
extra : rebase_source : ea6ae09971a7cbf617081836079cb875ffe4cb18
2018-02-13 23:41:39 -08:00
Valentin Gosu 55a7a824c6 Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer
We instead add a templated method NS_MutatorMethod that returns a std::function<nsresult(nsIURIMutator*)> which Apply then calls with mMutator as an argument.
The function returned by NS_MutatorMethod performs a QueryInterface, then calls the passed method with arguments on the result.

MozReview-Commit-ID: Jjqp7gGLG1D

--HG--
extra : rebase_source : f2a17aee7bb66a7ba8652817d43b9aa7ec7ef710
2018-02-21 01:00:54 +01:00
nbeleuzu@mozilla.com 01eef6aff1 Backed out changeset c9dcce0a1068 (bug 1435671) for build bustages on nsIURIMutator.h. CLOSED TREE 2018-02-21 00:06:46 +02:00
Valentin Gosu f1850e9354 Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer
We instead add a templated method NS_MutatorMethod that returns a std::function<nsresult(nsIURIMutator*)> which Apply then calls with mMutator as an argument.
The function returned by NS_MutatorMethod performs a QueryInterface, then calls the passed method with arguments on the result.

MozReview-Commit-ID: Jjqp7gGLG1D

--HG--
extra : rebase_source : 592d13349a8c4627c7ce3146ec592f577b39f3cc
2018-02-20 22:39:40 +01:00
Jared Wein c8d331f4c9 Bug 1436575 - Autofix errors from no-compare-against-boolean-literal. r=standard8
MozReview-Commit-ID: 66sXxnOWDgw

--HG--
extra : rebase_source : a0bf26e37a03a1e77476bdeedfc1af3ebec32f2a
2018-02-08 12:57:31 -05:00
Mark Banner 606beee3f2 Bug 1230369 - Manually fix some remaining instances of Ci/Cc/Cu definitions and switch Components.* to using the shorthand in some places. r=florian
MozReview-Commit-ID: 9SmoR9RlvZE

--HG--
extra : rebase_source : 054e14150921615ed67415ddb91b45169cc868d4
2018-02-07 09:24:15 +00: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
Gijs Kruitbosch 714c763d13 Bug 1432870, r=bz
--HG--
extra : rebase_source : 0719a9b6d5833e73c7f23f923359674e40cd310e
2018-01-30 12:07:08 +00: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
Valentin Gosu b53812bfed Bug 1432187 - Change code to use nsIStandardURLMutator.{init,setDefaultPort} r=mayhemer
MozReview-Commit-ID: K2Uy9ET3Ay6

--HG--
extra : rebase_source : fb5e19bc7b71a6f0264471bf8f07febf1bc55900
2018-01-24 20:33:02 +01:00
Valentin Gosu f943b98a02 Bug 1426501 - Change JS code to use nsIURIMutator instead of the nsIURI.spec setter r=mayhemer
MozReview-Commit-ID: FI6WrsQT2ke

--HG--
extra : rebase_source : 2b286c47c19ebd112a0c47fbe0a4c23bdb04755f
2018-01-08 15:20:29 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Emilio Cobos Álvarez aff5090202 Bug 1425769: Base class for ShadowRoot and Document to manage style state. r=smaug
This also removes some confusing comments around nsIDocument regarding some kind
of "special" stylesheets, which don't seem to exist anymore, and consolidates
StyleSheetList so that we only have one implementation.

I think that fixes a potential leak on the shadow root code (even though the API
is v0 only), given the pointer from the ShadowRootStyleSheetList to the
ShadowRoot wasn't being CCd.

Also, more stuff could be renamed, methods removed, etc, feel free to suggest
more cleanup, I've done mostly the minimal.

Next steps are moving the stylesets there and stop using the proto binding sheet
list / resources.

MozReview-Commit-ID: D9hnDgPQAS5
2017-12-19 11:09:59 +01:00
Dorel Luca e968e809aa Backed out changeset 13faabcf8e96 (bug 1425769) for Linux bustage on build/src/dom/base/nsLineBreaker.h 2017-12-19 11:07:44 +02:00
Emilio Cobos Álvarez 5ae586e759 Bug 1425769: Base class for ShadowRoot and Document to manage style state. r=smaug
This also removes some confusing comments around nsIDocument regarding some kind
of "special" stylesheets, which don't seem to exist anymore, and consolidates
StyleSheetList so that we only have one implementation.

I think that fixes a potential leak on the shadow root code (even though the API
is v0 only), given the pointer from the ShadowRootStyleSheetList to the
ShadowRoot wasn't being CCd.

Also, more stuff could be renamed, methods removed, etc, feel free to suggest
more cleanup, I've done mostly the minimal.

Next steps are moving the stylesets there and stop using the proto binding sheet
list / resources.

MozReview-Commit-ID: D9hnDgPQAS5

--HG--
extra : rebase_source : 0597917521894288c6b749e5d3ac6ac3b7db44a0
2017-12-17 22:29:10 +01:00