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

143 Коммитов

Автор SHA1 Сообщение Дата
Alexandre Poirot c57a4aea23 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

--HG--
extra : moz-landing-system : lando
2019-07-11 17:08:20 +00:00
Jonathan Kingston 31441f82ea Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504

--HG--
extra : moz-landing-system : lando
2019-07-08 16:37:45 +00:00
Victor Porof b8157dfaaf Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

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

--HG--
extra : source : 4722b924e08478f5337ab509718bd66906bf472f
extra : amend_source : a5baa1aab21639fdba44537e3a10b179b0073cb4
2019-07-05 11:29:32 +02:00
Razvan Caliman 0bde9bbef6 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

--HG--
extra : moz-landing-system : lando
2019-07-04 17:30:00 +00:00
Jefry Lagrange bd7874038e 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

--HG--
extra : moz-landing-system : lando
2019-06-28 08:28:53 +00:00
Ehsan Akhgari b3c4267b3c 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

--HG--
extra : moz-landing-system : lando
2019-06-12 09:07:33 +00:00
yulia 29a61755bc Bug 1042642 - use EventEmitter instead of eventSource on the DebuggerClient; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D29371

--HG--
extra : moz-landing-system : lando
2019-05-29 15:51:28 +00:00
Daisuke Akatsuka 0a497fb56e Bug 1114929: Add a test for multiline comment. r=pbro
Depends on D24118

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

--HG--
extra : moz-landing-system : lando
2019-03-21 09:18:31 +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
Alexandre Poirot a75ca7eaa0 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

--HG--
extra : moz-landing-system : lando
2019-01-21 11:04:08 +00:00
Alexandre Poirot 87bb1e2701 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

--HG--
extra : moz-landing-system : lando
2018-12-18 13:35:42 +00:00
yulia 1cd5e24aeb 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

--HG--
extra : moz-landing-system : lando
2018-12-14 17:34:53 +00:00
Logan Smyth b03057f1e8 Bug 1513655 - Remove source-map module and usage from the debugger server. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D14296

--HG--
extra : moz-landing-system : lando
2018-12-14 19:49:08 +00:00
Cosmin Sabou f292d9f90e 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 432ea8fcdc Bug 1513655 - Remove source-map module and usage from the debugger server. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D14296

--HG--
extra : moz-landing-system : lando
2018-12-14 19:09:15 +00:00
Julian Descottes ff4d366afa Bug 1497457 - Allow to remove one time listeners on event-source;r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D11992

--HG--
extra : moz-landing-system : lando
2018-11-27 10:13:47 +00:00
Daniel Varga 2be7e87387 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)

--HG--
extra : amend_source : cc8af90091ef2da669704e6a56a893bd5c72e136
2018-11-27 00:59:34 +02:00
Julian Descottes 5998cb7718 Bug 1497457 - Allow to remove one time listeners on event-source;r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D11992

--HG--
extra : moz-landing-system : lando
2018-11-26 19:53:05 +00:00
Patrick Brosset bb2e382570 Bug 1114932 - Break after commas in CSS selectors r=tromey
Differential Revision: https://phabricator.services.mozilla.com/D9232

--HG--
extra : moz-landing-system : lando
2018-10-22 14:17:27 +00: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
Julien Wajsberg 0e86c07238 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

--HG--
extra : moz-landing-system : lando
2018-10-12 08:39:32 +00:00
Alexandre Poirot 681faed609 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


--HG--
rename : devtools/server/actors/webconsole/listeners.js => devtools/server/actors/webconsole/listeners/console-api.js
2018-08-20 09:06:21 -07:00
Boris Zbarsky 357b6b1348 Bug 1479570. Get Add a getter to get a docshell from nsIWindowlessBrowser. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D2669

--HG--
extra : moz-landing-system : lando
2018-08-03 00:05:07 +00:00
Xidorn Quan 38a8db3cca Bug 1418874 part 3 - Remove CSSLexer and related stuff. r=emilio,tromey
MozReview-Commit-ID: 2DuHpc3HfmB

--HG--
extra : rebase_source : 9718a8fd7350e33c36fc2307caf49241050800c1
2018-06-14 18:12:02 -07:00
J. Ryan Stinnett eaa4969e77 Bug 1172897 - Rename TabActor to BrowsingContextTargetActor. r=ochameau
MozReview-Commit-ID: LPTEx2h4F1o

--HG--
rename : devtools/server/actors/tab.js => devtools/server/actors/targets/browsing-context.js
rename : devtools/shared/specs/tab.js => devtools/shared/specs/targets/browsing-context.js
extra : rebase_source : e62720693ad492cdfb68ab21af1f54d78e85123a
2018-05-25 18:20:28 -05:00
Xidorn Quan dd36c21b65 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

--HG--
extra : rebase_source : f5bbff12a8d17bb242e6815936e2347364302050
2018-05-31 15:54:08 +10:00
Dorel Luca 6780acc0ad 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 11844db553 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

--HG--
extra : rebase_source : 4bf900109e9c8b4536211ace5e9cdf42fa45eb4b
2018-05-31 15:54:08 +10:00
Julian Descottes 7fdc2c153f Bug 1454696 - Fix leftover issues for prefer-const;r=yulia
MozReview-Commit-ID: JwOXoqw2mks

--HG--
extra : rebase_source : a3f07665a42c2779a85b7901a07206266a9d1616
extra : source : ae946f375e0d0f4f0f0fc859c54040fef42cbc2c
2018-06-01 12:19:35 +02:00
Julian Descottes 640fe52298 Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4

--HG--
extra : rebase_source : 65de1b0aba412d9044b5196115f74276caa058f2
2018-06-01 12:36:09 +02:00
yulia 9da92b564a Bug 1382580 - Delete old event emitter; r=nchevobbe
MozReview-Commit-ID: 1g3ax7KP2vf

--HG--
extra : rebase_source : fbcdf4b6ea88c43c40447460238b5fb11f886cd8
2018-05-03 13:01:31 +02:00
Mark Banner f7f93b63da Bug 1456755 - Enable ESLint rule no-undef for devtools/{client/scratchpad/,shared/tests/unit}. r=jdescottes
MozReview-Commit-ID: 1GdQdf1y0gc

--HG--
extra : rebase_source : ce83f4ebc4dd66202651b061bcdaef7e9ca360ba
2018-04-24 21:46:01 +01:00
Alexandre Poirot 9b2fdcf8bb Bug 1453712 - Use a preference to set the testing flag. r=jryans
MozReview-Commit-ID: 1cjSQnXtc4h

--HG--
extra : rebase_source : 55c0c9fa81a8dc17b92cba721dcc5912b07d0fab
2018-04-12 09:22:42 -07:00
J. Ryan Stinnett 23ff4cc75d 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 8922be9c58 Bug 1433175 - enable the use-cc-etc eslint rule, r=Standard8. 2018-02-28 18:51:35 +01:00
Alexandre Poirot ae019f78bc Bug 1440320 - Convert Task.jsm to async/await in devtools/shared. r=jryans
MozReview-Commit-ID: IK8BzlYuOWm

--HG--
extra : rebase_source : f2ac7eee538490a3db18e7290f144037592b3f89
2018-02-22 00:49:06 -08:00
Alexandre Poirot 2d43f710c5 Bug 1440320 - Removed unused methods from async-utils module. r=jryans
MozReview-Commit-ID: 3ixJhRWeRpd

--HG--
extra : rebase_source : 55a274b88d94d6574ab71268ca054ad93561ef7e
2018-02-19 02:29:12 -08:00
Mark Banner 21e6e270a4 Bug 1438489 - Enable ESLint rule mozilla/use-services for devtools/. r=jdescottes
MozReview-Commit-ID: FZscEA6Q3Kb

--HG--
extra : rebase_source : b1b8699288a3595e52bcff3c7684bfe095f41dd1
2018-02-15 12:00:17 +00:00
Alexandre Poirot e563788ea7 Bug 1434374 - Auto-rewrite Cu.import into ChromeUtils.import or require calls. r=jdescottes
MozReview-Commit-ID: 7YyLu5q23Hs

--HG--
extra : rebase_source : bb2805652c85d74a3e888326f4afa4b6857afa64
2018-02-07 01:37:36 -08: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
Cameron McCormack 3f17a89ba7 Bug 1427419 - Part 23: Move inIDOMUtils.getCSSPseudoElementNames to InspectorUtils. r=bz
MozReview-Commit-ID: A6FhXc2mJm1
2018-01-11 12:38:01 +08:00
Cameron McCormack fc4a76fb7f Bug 1427419 - Part 5: Move nsIDOMUtils.getCSSLexer to InspectorUtils. r=bz
MozReview-Commit-ID: 4UGiS3I2V6B
2018-01-11 12:37:59 +08:00
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +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
Patrick Brosset 2036033118 Bug 1419301 - Make HTML comments removal in prettifyCSS faster; r=tromey
MozReview-Commit-ID: LG8GKccRlXr

--HG--
extra : rebase_source : 86eb5612f8264bbe4f765ab5baaea4db8c7a84a3
2017-12-01 16:58:48 +01:00
Julian Descottes 3ec0b0ad0d Bug 1406311 - add unit test to cover sprintfjs;r=bgrins
We would like to optimize sprintfjs for performances.
To avoid regressions, add a basic unit test taken from the original
sprintfjs repository.

MozReview-Commit-ID: IKkDHpYfL4I

--HG--
extra : rebase_source : 39837c4c6039e77c189ce9db2e12d4b7b26171c7
extra : intermediate-source : 10683284fa0d1d7cbe4c10628b7ab90eb034c8de
extra : source : d7028aeaf4fbf8cd06285746269799a7a9cc7af5
2017-10-12 13:08:08 +02:00
Alexandre Poirot 76914dd9bc Bug 1399589 - Register all spec and front modules lazily in specs/index.js. r=jdescottes
MozReview-Commit-ID: 3U2D0PWivm2

--HG--
extra : rebase_source : bb087a66c0d946f684dbfa00e7dc96725d4eee30
2017-10-03 17:56:35 +02:00
Tom Tromey 762c2f58dd Bug 1403610 - update to source-map 0.6.1; r=bgrins
Import the source-map 0.6.1 bundle.

MozReview-Commit-ID: AkVLlBJRD1l

--HG--
extra : rebase_source : 882b2ef4b2c3b2eac8733f408a4ce7a6aaa403d2
2017-09-27 09:39:44 -06:00
Julian Descottes 86f9684361 Bug 1137935 - add support for wildcard event type in devtools event emitter;r=ochameau
This API is only implemented as a temporary measure to ease the migration out of
sdk APIs.

MozReview-Commit-ID: BBlhxclpWqJ

--HG--
extra : rebase_source : 4de2e6ec946634acaf638777aab2589eeb5125a2
2017-08-17 16:42:50 +02:00