Commit Graph

255 Commits

Author SHA1 Message Date
Sylvestre Ledru
774f1a4b2b Bug 1585058 - Typo in identifier causing the test to return always the same value r=tnguyen
Differential Revision: https://phabricator.services.mozilla.com/D47638
2019-10-01 08:02:56 +00:00
Thomas Nguyen
8e749464d6 Bug 1576347 - Correct referrerInfo when saving media and add a test of "Go To Download Page" button r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D43749
2019-08-30 18:38:38 +00:00
Thomas Nguyen
ee02fbe71a Bug 1554947 - Update saveURL to use referrerInfo class instead of referrer and referrerr policy r=Gijs,snorp
Differential Revision: https://phabricator.services.mozilla.com/D33939
2019-07-16 17:59:28 +00:00
Jonathan Kingston
32524b62e2 Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504
2019-07-08 16:37:45 +00:00
Victor Porof
3ca308bcdc Bug 1561435 - Format toolkit/content/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36053
2019-07-05 11:14:49 +02:00
Boris Zbarsky
95de682140 Bug 1557793 part 2. Stop using [array] in nsIStringBundle. r=Pike
Differential Revision: https://phabricator.services.mozilla.com/D34196
2019-06-11 15:51:51 +00:00
Ian Moody
a9b23fdc9b Bug 1544284 - toolkit/ manual ESLint no-throw-literal fixes. r=Standard8
Includes an otherwise-automated change to test_jsctypes.js that required an
expectation change in test_ctypes.xul.

Differential Revision: https://phabricator.services.mozilla.com/D27449
2019-04-16 19:30:27 +00:00
Ian Moody
414220d39d Bug 1544284 - toolkit/ automated ESLint no-throw-literal fixes. r=Standard8
Result of running:
$ mach eslint -funix toolkit/ | sed -Ee 's/:.+//' - | xargs sed -E \
    -e 's/throw ((["`])[^"]+\2);/throw new Error(\1);/g' \
    -e 's/throw ((["`])[^"]+\2 \+ [^ ";]+);/throw new Error(\1);/g' \
    -e 's/throw \(/throw new Error(/g' -i

...and then reverting a couple of places where comments were touched,
as well as changes to toolkit/components/ctypes/tests/unit/test_jsctypes.js
that required expectation changes to
toolkit/components/ctypes/tests/chrome/test_ctypes.xul

Differential Revision: https://phabricator.services.mozilla.com/D27448
2019-04-16 19:30:27 +00:00
Jonathan Kingston
1d7c7a19d3 Bug 1525319 - Changing js to remove context from onStartRequest and onStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20771
2019-02-27 23:41:54 +00:00
Dorel Luca
2dfae9a24a Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston
ba03516b3f Bug 1525319 - Changing js to remove context from onStartRequest and onStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20771
2019-02-25 00:07:42 +00:00
Myk Melez
5ecc2c1225 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
2019-01-30 17:26:25 +00:00
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
Gijs Kruitbosch
bc430fee66 Bug 1502448 - work around principal issues with pdfjs and saving local files, r=jkt,jaws
Differential Revision: https://phabricator.services.mozilla.com/D15568
2019-01-07 16:59:26 +00:00
Emilio Cobos Álvarez
dc336a73ba 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
Emilio Cobos Álvarez
e461afa617 Bug 1516853 - Merge nsIDocument and nsDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D15498
2018-12-31 14:10:19 +00:00
Hrushikesh Bodas
61892a6174 Bug 1509469 Remove unused ContentAreaUtils.ioService r=dao
Differential Revision: https://phabricator.services.mozilla.com/D13614
2018-12-01 15:05:59 +00:00
Kris Maglione
1d772219be Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270
2018-08-24 16:22:40 -07:00
Mark Banner
462116b7f9 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
2018-08-31 05:59:17 +00:00
Boris Zbarsky
63fdd7cf04 Bug 1446940 part 1. Stop getting docshells from windows via getInterface in toolkit. r=gijs
The change to test_hiddenPrivateWindow.xul is to make sure we pass windows, not
docshells, to an API that expects windows.
2018-08-01 13:07:09 -04:00
Boris Zbarsky
1b419c917c Bug 1476145 part 6. Stop using getInterface(nsIDOMWindowUtils) in toolkit. r=mossop
This is not quite a mechanical change, because some places have a .top or
whatnot snuck in there, so please review carefully!
2018-07-24 19:47:42 -04:00
Gijs Kruitbosch
567d31a745 Bug 1469916, r=ckerschb,jkt 2018-06-22 15:41:39 +01:00
Gijs Kruitbosch
435b8f162d Backed out changeset be11a3290029 (bug 1469916) for test orange involving Not enough arguments [nsIWebBrowserPersist.saveURI] 2018-07-03 15:45:13 +01:00
Gijs Kruitbosch
2cd42146aa Bug 1469916, r=ckerschb,jkt 2018-06-22 15:41:39 +01:00
Boris Zbarsky
0e3408903e Bug 1460735 part 1. Remove use of nsIDOMDocument in JS. r=qdot
There are some places where we have a thing which may not even be a node, and
we end up hardcoding the value of DOCUMENT_NODE there, because
"foo.nodeType == foo.DOCUMENT_NODE" will test true if foo is not a node: both
sides will be undefined.
2018-05-29 13:39:00 -04:00
Kris Maglione
582a21b473 Bug 1456035: Part 5 - Convert manual QueryInterface to ChromeUtils.generateQI. r=mccr8
Manually-implemented QueryInterface functions don't benefit from the
MozQueryInterface optimizaions, and a lot of them are in hot code, and
implement a large number of interfaces.

MozReview-Commit-ID: 8OzglraowZt
2018-04-23 12:58:34 -07:00
Nika Layzell
f614b85fbe Bug 1443379 - Stop pretending cacheKey can be anything other than uint32_t, r=smaug 2018-04-10 17:49:46 -04:00
Jonathan Kingston
01b84d1382 Bug 1374741 - Within devtools/ make openUILinkIn() provide the correct triggeringPrincipal. r=jryans
MozReview-Commit-ID: KecQcZWeU6a
2018-02-21 16:01:03 +00:00
Paolo Amadini
2d0d64e7b6 Bug 1363061 - Rename toolkit/components/jsdownloads to toolkit/components/downloads. r=mak
MozReview-Commit-ID: GuWeax0ubv3
2018-03-06 17:40:59 +00:00
Florian Quèze
f6add2cafd Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Valentin Gosu
4cf154a8b5 Bug 1433958 - Change code that sets nsIURI.filePath to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: GYHpakKPEbe
2018-02-26 20:43:45 +01:00
Gijs Kruitbosch
b34b68c23a Bug 1436559 - stop doing busy-work in setOverLink and make textToSubURI available on Services.jsm, r=florian
MozReview-Commit-ID: F63kE4GE67B
2018-02-07 22:07:08 +00:00
Cosmin Sabou
26073c5b2c Backed out changeset 46c758115832 (bug 1436559) for ESlint failure on /browser/components/search/test/browser_426329.js on a CLOSED TREE 2018-02-08 20:37:13 +02:00
Gijs Kruitbosch
7b292fc484 Bug 1436559 - stop doing busy-work in setOverLink and make textToSubURI available on Services.jsm, r=florian
MozReview-Commit-ID: F63kE4GE67B
2018-02-07 22:07:08 +00:00
Andrew McCreight
272cee1e65 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
2018-02-06 09:36:57 -08:00
Florian Quèze
c5f15a4700 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
0bb74efdf1 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
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d 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
fd67f090b2 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
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb 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
683a97d172 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
2018-01-29 15:20:18 -08:00
Mark Banner
83ff8c966a Bug 1431021 - Remove unused isContentFrame from contentAreaUtils.js. r=florian
MozReview-Commit-ID: GE8b3YPR0ZO
2018-01-17 09:13:43 +00:00
Paolo Amadini
229d74d19f Bug 1413074 - Sanitize the file names of downloads before opening the file picker. r=mak
MozReview-Commit-ID: 90QE4g1P49w
2017-11-06 09:30:33 +00:00
Mark Banner
e47ccbfec3 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo
2017-10-26 11:47:01 +01:00
Dan Banner
5af4450327 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
Paolo Amadini
0d0c9d5f71 Bug 1402279 - Part 2 - Unify the usage of the DownloadPaths module. r=mak,aswan
MozReview-Commit-ID: HEhwkyxtYTP
2017-09-27 12:13:07 +01:00
Sebastian Hengst
3c4ab8939c Backed out changeset 41da9c5daa90 (bug 1402279) 2017-09-26 18:17:51 +02:00
Paolo Amadini
9fb8dd6d05 Bug 1402279 - Part 2 - Unify the usage of the DownloadPaths module. r=mak,aswan
MozReview-Commit-ID: HEhwkyxtYTP
2017-09-26 16:03:24 +01:00
Amy Chung
415338d016 Bug 1360603 - Confirm the Throttleable flag on browser_saveImageURL.js. r=baku 2017-09-24 00:56:04 +08:00
Kris Maglione
be161e68b4 Bug 1391110: Part 4 - Remove unnecessary nsIFrameLoaderOwner QIs. r=smaug
The FrameLoaderOwner interface has been implemented in WebIDL for several
years now, so these QIs are simply unnecessary overhead.

MozReview-Commit-ID: LAzvfm5Qhy0
2017-08-19 13:32:58 -07:00