Commit Graph
185 Commits
Author SHA1 Message Date
Alexandre Poirot 0ce86f8b2c Bug 1566457 - Remove unused provider logic from Loader.jsm. r=jdescottes
We used to have another provider which would load module via file:// URI,
directly from the disk. But the progress on artifact builds and ./mach build faster
made this obsolete and has been removed a long time ago.
We still have a lot of abstraction to support this non-existent feature.

Differential Revision: https://phabricator.services.mozilla.com/D38284
2019-07-18 12:25:05 +00:00
Alexandre Poirot 4cc4a20117 Bug 1543023 - Use ChromeUtils.import only with one argument in all /devtools/ r=jdescottes
ChromeUtils.import still support a second argument as it used to do
when it was Components.utils.import. But this is deprecated and we should
instead always use the returned value.

Differential Revision: https://phabricator.services.mozilla.com/D37708
2019-07-11 17:08:20 +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 435f7b056d Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35894
2019-07-05 11:29:32 +02:00
Razvan Caliman 3bd92ba2a5 Bug 724505 - Map minified CSS to prettyfied CSS. r=gl
Ensure source links for selectors in the Rules view and warning links in Web Console for minified CSS go to the right location in the Style Editor after applying automatic prettification.

This only works for linked stylesheets. [Bug 1169770](https://bugzilla.mozilla.org/show_bug.cgi?id=1169770) needs to be fixed first before this can work correctly on inline minified stylesheets.

This patch augments the `prettifyCSS()` method to generate the mappings necessary to generate a sourcemap from the original to the prettified source. It uses these mappings to translate the cursor position when invoking the Style Editor to be opened at a specific location.

The mappings from the minified to the prettified source are used only until the stylesheet is changed in the Style Editor. Upon editing the source in the Style Editor, the associated mappings are cleared because it's likely they have been rendered invalid.

The updated stylesheet will already be prettified so it bypasses the `prettifyCSS()` method, thus avoiding the need to re-generate mappings. New CSS warnings will be listed in the Web Console which point to the right location in the edited stylesheet (the old warnings no longer point to the right place, but that's an acceptable side-effect). The Rules view in the Inspector also lists selectors with the new positions within the edited stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D36585
2019-07-04 17:30:00 +00:00
Jefry Lagrange ead0aa8e6c Bug 1517728 - Export Console content to file. .
Add a context menu entry to export the console output to a file.
We group the 2 export entries into a submenu.

Differential Revision: https://phabricator.services.mozilla.com/D22158
2019-06-28 08:28:53 +00:00
Ehsan Akhgari 24fd5a68b2 Bug 1557887 - Part 6: Pass a storage principal to the rest of the call sites for createAboutBlankContentViewer(); r=baku
Differential Revision: https://phabricator.services.mozilla.com/D34460
2019-06-12 09:07:33 +00:00
yulia d6c65c3294 Bug 1042642 - use EventEmitter instead of eventSource on the DebuggerClient; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D29371
2019-05-29 15:51:28 +00:00
Brendan Dahl a0aed74712 Bug 1551320 - Replace all CreateElement calls in XUL documents with CreateXULElement. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D31295
2019-05-20 16:50:28 +00:00
Brian Grinstead 36c26fa2b9 Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 1` argument.

Differential Revision: https://phabricator.services.mozilla.com/D26812
2019-04-15 20:56:58 +00:00
Daisuke Akatsuka c67f6fdbaa Bug 1114929: Add a test for multiline comment. r=pbro
Depends on D24118

Differential Revision: https://phabricator.services.mozilla.com/D24119
2019-03-21 09:18:31 +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
Alexandre Poirot 5cf17eecc4 Bug 1520773 - Prevent infinite loops in DebuggerClient.close. r=yulia
If any callback fired by DebuggerClient.close ends up calling close again, it will introduce an infinite loop.

Depends on D15826

Differential Revision: https://phabricator.services.mozilla.com/D15827
2019-01-21 11:04:08 +00:00
Alexandre Poirot 5647e40cff Bug 1513028 - Throw exception with stack and message when a module doesn't exists. r=jdescottes
loadSubScript throws a string, without any stack/location.
Consider all string exceptions as coming from loadSubScript and re-throw a real error
object, coming with the stack of the require call.
Also handle wrong require path with a more explicit error message.

Differential Revision: https://phabricator.services.mozilla.com/D14139
2018-12-18 13:35:42 +00:00
yulia 7fe9bd2790 Bug 1514197 - add clearEvents method to the event emitter and call from Front.destroy; r=jdescottes
details about what is going on here is in the bug thread

Differential Revision: https://phabricator.services.mozilla.com/D14547
2018-12-14 17:34:53 +00:00
Logan Smyth 21369e75a2 Bug 1513655 - Remove source-map module and usage from the debugger server. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D14296
2018-12-14 19:49:08 +00:00
Cosmin Sabou 29a6a69f29 Backed out changeset 4d61e1b695c9 (bug 1513655) for ESlint failure on devtools/server/actors/thread.js. CLOSED TREE 2018-12-14 21:37:34 +02:00
Logan Smyth 0a7c3e0a7f Bug 1513655 - Remove source-map module and usage from the debugger server. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D14296
2018-12-14 19:09:15 +00:00
Julian Descottes b403932742 Bug 1497457 - Allow to remove one time listeners on event-source;r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D11992
2018-11-27 10:13:47 +00:00
Daniel Varga 2338233c05 Backed out 7 changesets (bug 1497457) for devtools failure at devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_sidebar_usb_runtime_refresh.js on a CLOSED TREE
Backed out changeset d3b46f3a0306 (bug 1497457)
Backed out changeset bd490139b395 (bug 1497457)
Backed out changeset b2830500918c (bug 1497457)
Backed out changeset 9923755ee205 (bug 1497457)
Backed out changeset f2a39a18f2f6 (bug 1497457)
Backed out changeset 95365a2d7470 (bug 1497457)
Backed out changeset 0e93acc09952 (bug 1497457)
2018-11-27 00:59:34 +02:00
Julian Descottes 0ebb724e56 Bug 1497457 - Allow to remove one time listeners on event-source;r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D11992
2018-11-26 19:53:05 +00:00
Patrick Brosset 62e82d2f1c Bug 1114932 - Break after commas in CSS selectors r=tromey
Differential Revision: https://phabricator.services.mozilla.com/D9232
2018-10-22 14:17:27 +00:00
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Julien Wajsberg c9366bea3e Bug 1498331 - Supports the case where EventEmitter.off is called with more than 3 arguments r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D8445
2018-10-12 08:39:32 +00:00
Alexandre Poirot d161ff0db3 Bug 1482070 - Move ConsoleAPIListener to its own file. r=Honza
Summary: Depends On D3598

Reviewers: Honza!

Tags: #secure-revision

Bug #: 1482070

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

MozReview-Commit-ID: k3KVzlmXOR
2018-08-20 09:06:21 -07:00
Boris Zbarsky 2ffdfa654d Bug 1479570. Get Add a getter to get a docshell from nsIWindowlessBrowser. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D2669
2018-08-03 00:05:07 +00:00
Julian Descottes 5661629b9a Bug 1078374 - Return empty string in getPath/Selector methods for nodes outside document;r=bgrins
MozReview-Commit-ID: 5hxtjz23vXh
2018-06-23 08:29:16 +02:00
Xidorn Quan af94e0fd7e Bug 1418874 part 3 - Remove CSSLexer and related stuff. r=emilio,tromey
MozReview-Commit-ID: 2DuHpc3HfmB
2018-06-14 18:12:02 -07:00
J. Ryan Stinnett c6fd8c950e Bug 1172897 - Rename TabActor to BrowsingContextTargetActor. r=ochameau
MozReview-Commit-ID: LPTEx2h4F1o
2018-05-25 18:20:28 -05:00
Xidorn Quan b04a3337ef Bug 1465628 part 4 - Update test to check more stuff. r=tromey
This change adds a preferences check based on the change before.

It also removes the skipping of "all" because we generate subproperties
of "all" shorthand in a platform-neutral way. That list shouldn't be
affected by any preference.

MozReview-Commit-ID: LJyxGXJxvfW
2018-05-31 15:54:08 +10:00
Dorel Luca 98ba7a517a Backed out 4 changesets (bug 1465628) for Eslint failure. CLOSED TREE
Backed out changeset 04f276eb2f0e (bug 1465628)
Backed out changeset e9cdff122793 (bug 1465628)
Backed out changeset 6832baa28e3f (bug 1465628)
Backed out changeset e5ac0c7a9fb4 (bug 1465628)
2018-06-05 04:00:30 +03:00
Xidorn Quan 891e9f395b Bug 1465628 part 4 - Update test to check more stuff. r=tromey
This change adds a preferences check based on the change before.

It also removes the skipping of "all" because we generate subproperties
of "all" shorthand in a platform-neutral way. That list shouldn't be
affected by any preference.

MozReview-Commit-ID: LJyxGXJxvfW
2018-05-31 15:54:08 +10:00
Julian Descottes 9456167901 Bug 1454696 - Fix leftover issues for prefer-const;r=yulia
MozReview-Commit-ID: JwOXoqw2mks
2018-06-01 12:19:35 +02:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Michael Ratcliffe a4ac391ae6 Bug 1098374 - Telemetry: Stop all monkey patching in devtools telemetry tests r=yulia
Changes and notes:
  - Created `devtools/client/shared/test/telemetry-test-helpers.js`, which
    contains test helpers to aid in creating and running telemetry tests.
  - Removed any telemetry monkeypatching as it is not dependable and no longer
    needed (there is some left in GCLI but the test is now disabled because
    we are removing GCLI soon anyhow).
  - Because `telemetry-test-helpers.js` is imported by `shared-head.js` I
    have had to make it available everywhere that shared-head.js is used.
  - All telemetry tests have been rewritten to use the new helper.
  - shared-head.js cannot be imported by tests inside
    `devtools/client/performance/test/` because perf have custom `once` and
    `waitFor` implementations that act differently from the ones inside
    `shared-head.js`. This means I had to import the telemetry helpers into
    `devtools/client/performance/test/head.js`
  - Created `devtools/client/shared/test/browser_telemetry_misc.js` to be sure
    to catch `DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER` (we catch a few
    others to be thorough).
  - Disabled `browser_inspector_menu-02-copy-items.js`, which was failing to
    test some expired scalars. I also corrected the way the scalars are logged
    because it was completely wrong.

MozReview-Commit-ID: JjQEGM6hT61
2018-05-01 18:06:14 +01:00
yulia 683eaa4c02 Bug 1382580 - Delete old event emitter; r=nchevobbe
MozReview-Commit-ID: 1g3ax7KP2vf
2018-05-03 13:01:31 +02:00
Mark Banner e348b47c4e Bug 1456755 - Enable ESLint rule no-undef for devtools/{client/scratchpad/,shared/tests/unit}. r=jdescottes
MozReview-Commit-ID: 1GdQdf1y0gc
2018-04-24 21:46:01 +01:00
Kris Maglione 31b62bd68b Bug 1453881: Part 1a - Automatically write add_task(function*) to add_task(async function) r=ochameau
This was done using the script at:

https://bitbucket.org/kmaglione/m-c-rewrites/src/bc5629735d8c7e4150f376d4a906e7c7c23132ba/processors/add-task-async.jsm?at=default&fileviewer=file-view-default

MozReview-Commit-ID: KxuS9Cen87
2018-04-12 21:10:04 -07:00
Alexandre Poirot d10cea6483 Bug 1453712 - Use a preference to set the testing flag. r=jryans
MozReview-Commit-ID: 1cjSQnXtc4h
2018-04-12 09:22:42 -07:00
shindli 0d3a6e02cc Merge inbound to mozilla-central. a=merge 2018-04-12 02:45:34 +03:00
Trisha d88222118a Bug 1444445 - Remove unsafeSetInnerHTML in browser_l10n_localizeMarkup.js. r=johannh
MozReview-Commit-ID: 1eaABunZe0B
2018-04-06 19:44:57 +08:00
Johann Hofmann dce039f52a Bug 1453279 - Include client/shared/test/shared-head.js in devtools/shared tests. r=jdescottes
MozReview-Commit-ID: LrVCfDb3xwh
2018-04-11 12:58:44 +02:00
J. Ryan Stinnett 8d1c817851 Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
Florian Quèze 753d731eec Bug 1433175 - enable the use-cc-etc eslint rule, r=Standard8. 2018-02-28 18:51:35 +01:00
Alexandre Poirot c693997506 Bug 1440320 - Convert Task.jsm to async/await in devtools/shared. r=jryans
MozReview-Commit-ID: IK8BzlYuOWm
2018-02-22 00:49:06 -08:00
Alexandre Poirot 2d2e6dbc3e Bug 1440320 - Removed unused methods from async-utils module. r=jryans
MozReview-Commit-ID: 3ixJhRWeRpd
2018-02-19 02:29:12 -08:00
Mark Banner 972759b0d6 Bug 1438489 - Enable ESLint rule mozilla/use-services for devtools/. r=jdescottes
MozReview-Commit-ID: FZscEA6Q3Kb
2018-02-15 12:00:17 +00:00
Alexandre Poirot 13e5d4f0f5 Bug 1434374 - Auto-rewrite Cu.import into ChromeUtils.import or require calls. r=jdescottes
MozReview-Commit-ID: 7YyLu5q23Hs
2018-02-07 01:37:36 -08: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