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

102 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Chevobbe 8879b749c1 Bug 1536523 - Support performance.getEntries result in console.table. r=Honza.
PerformanceEntry values are put in the `getterValue` property in
the descriptor, so whenever we want to display a table we need
to check if the value could be in there.
This highlighted an issue in the console layout when there is a
large number of cells, which we fix in this patch.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 09:56:40 +00:00
Raymond Liu 152a169cac Bug 1214556 - Add open url MenuItem for links in Web Console. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D54418

--HG--
extra : moz-landing-system : lando
2019-11-26 09:04:29 +00:00
Nicolas Chevobbe ed982614a2 Bug 1326182 - Send all the console.table items in the console message. r=Honza.
This allows us to not have to reach for the server
again from the client to get all the data we need
to render the table.

We still need to keep the old function to handle
connections to older servers. We'll use Bug 1597955
in Firefox 74 to clean the bits we don't need anymore.

A test is added to ensure the bug is fixed and we don't
regress; stubs are updated.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 09:48:58 +00:00
Nicolas Chevobbe 3e23452e6d Bug 1597295 - Allow to pass a pathPrefix property to the WebConsole ObjectInspector util. r=jlast.
This will allow us to not have 2 object inspectors
with the same name, which was causing an issue
when putting an object in the sidebar (the object
in the sidebar and the one in the output would share
the same key in the objectInspector key, meaning that
expanding/collapsing nodes on one of them would also
do it on the other one).
A test needed to be modified where we were relying on
this behaviour.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 18:05:42 +00:00
Nicolas Chevobbe 790f56fb4a Bug 1595594 - Add support for typed arrays to console.table. r=Honza.
In order to render a table, we first check that console.table is
called with data that can be displayed in a table. Until now, we
were missing all the typed arrays.
This revealed some smaller issues:
- BigInt64Array were not marked as typed arrays on the server.
- Generating the repeatId for a message containing BigInts would
  throw because BigInts can't be serialized.

We add test cases for all the typed array, and we take this opportunity
to add a test case to ensure object insides table cells can be expanded.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 13:37:07 +00:00
Jason Laster 58def33d5e Bug 1594979 - Logpoints fail to log with `frame is null`. r=bhackett
Differential Revision: https://phabricator.services.mozilla.com/D52310

--HG--
extra : moz-landing-system : lando
2019-11-08 16:49:11 +00:00
Julian Descottes 222bc5ccde Bug 1593921 - Use eslint-disable-next-line to disable complexity checks in DevTools r=pbro
Using next-line is less error prone for refactorings than wrapping methods with enable/disable blocks.

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

--HG--
extra : moz-landing-system : lando
2019-11-05 14:29:04 +00:00
Mihai Alexandru Michis 30c8de3920 Backed out changeset ca55fba5a3a3 (bug 1592144) for causing node devtools failures. CLOSED TREE 2019-10-29 16:19:31 +02:00
David Walsh 50a693991f Bug 1592144 - Only set frame logpoint if frame exists r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D50875

--HG--
extra : moz-landing-system : lando
2019-10-29 07:48:23 +00:00
Nicolas Chevobbe d76b60f122 Bug 1519103 - Remove Scratchpad panel. r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D50583

--HG--
extra : moz-landing-system : lando
2019-10-27 09:05:58 +00:00
wartmanm ada58cbb70 Bug 1433373 - Use source mapping for console jump to definition button r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D38096

--HG--
extra : moz-landing-system : lando
2019-10-07 08:40:04 +00:00
Jason Laster 15cc722a58 Bug 1582870 - Reduxify console actions. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D46674

--HG--
extra : moz-landing-system : lando
2019-10-02 22:50:25 +00:00
Nicolas Chevobbe 99a12bc622 Bug 1584973 - Always lazy load Reps bundle. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D47729

--HG--
extra : moz-landing-system : lando
2019-10-02 08:05:57 +00:00
Oana Pop Rus 781a9a9348 Backed out 2 changesets (bug 1584973) for devtools node failure on a CLOSED TREE
Backed out changeset c06273b25769 (bug 1584973)
Backed out changeset e63ea229519d (bug 1584973)
2019-10-02 02:30:42 +03:00
Nicolas Chevobbe 54186249e9 Bug 1584973 - Always lazy load Reps bundle. r=Honza.
Depends on D47728

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

--HG--
extra : moz-landing-system : lando
2019-10-01 09:36:51 +00:00
Emilio Cobos Álvarez 8349d49124 Bug 1581472 - Only treat CSS parser errors as CSS errors. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D45986

--HG--
extra : moz-landing-system : lando
2019-09-16 10:12:47 +00:00
Jason Laster 7e368acde2 Bug 1580064 - Replace ObjectInspector symbol with better delimeter. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D45286

--HG--
extra : moz-landing-system : lando
2019-09-10 22:47:42 +00:00
Nicolas Chevobbe 37211d770b Bug 1578389 - Fix propTypes error in console. r=Honza.
Fix 2 proptype errors: one in App.js, and the
other one in the renderStacktrace function,
that is called by Error rep.

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

--HG--
extra : moz-landing-system : lando
2019-09-03 13:55:45 +00:00
Gabriel Luong 006d44d6b7 Bug 1568157 - Part 3: Replace `toolbox.highlighter` with the contextual HighlighterFront. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D40316

--HG--
extra : moz-landing-system : lando
2019-08-27 19:13:45 +00:00
Nicolas Chevobbe 7f5a19c884 Bug 1576085 - Don't allow evaluation results to be repeated. r=Honza.
With top-level await, we can now have multiple
evaluation results next to each others. Which
means that if they had the same repeatId, we
would only print the first result.
We fix that by not allowing evaluation results to
be repeated.
A mochitest is added to ensure the patch properly
fixes the issue.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 11:18:50 +00:00
Nicolas Chevobbe 925311bc77 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300

--HG--
extra : moz-landing-system : lando
2019-08-19 12:48:16 +00:00
Gijs Kruitbosch a829e24657 Bug 1571342 - unify save paths for console and netmonitor and fix the latter to not do docshell loads, r=Honza,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D41858

--HG--
extra : moz-landing-system : lando
2019-08-16 11:13:24 +00:00
chujun 84121a15d7 Bug 1557138 Clicking logpoint location in console opens the logpoint editing panel in debugger r=nchevobbe,jlast
I pass `frame.origin` in `viewSourceInDebugger`. When `reason` is logpoint, run `openConditionalPanel`.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 16:10:50 +00:00
Nicolas Chevobbe e9634ef8c8 Bug 1441711 - Create multiple proxies when in Fission Browser Console. r=ochameau.
When opening the Browser Console, if the browser toolbox fission pref
is enabled, we create a WebConsoleConnectionProxy for each process.
This allow us to not start the ContentProcessMessages listener (that
uses ContentProcessMessagesForward), but directly connect to the content
process, to get fully inspectable console message, from the Browser Console.

We keep the this.proxy reference in WebConsoleUI to represent the "main" target
proxy, and we add an `additionalProxies` property that represent proxies
for other targets we connect to (e.g. content process targets).
We then have a function to list all the proxies we're handling, in order to
be able to do tasks on all of them (e.g. clearing cache, network message, ...)

We also take this as an opportunity to add a `evaluateJSAsync` at the
WebConsoleUI level so callsites don't retrieve the proxy.webConsoleClient
themselves.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 13:23:03 +00:00
Nicolas Chevobbe 734f57b508 Bug 1567174 - Move expression evaluation to a proper Redux action. r=jdescottes.
The goal is to not directly use the panel.hud.ui.proxy reference
directly from the JsTerm, so we're in better shape when Fission
comes.
It's also a nice refactor to make the JSTerm component more
React-like.
As a nice benefit, we can handle telemetry and history persistence
from their middleware.
As the `requestEvaluation` method is removed from the JSTerm, some
callsites needed to be updated to still work.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 11:49:21 +00:00
Ciure Andrei 7348fe95a3 Backed out 2 changesets (bug 1568143, bug 1567174) for causing browser_ext_addon_debugging_netmonitor.js to perma fail CLOSED TREE
Backed out changeset a8faaa1c722e (bug 1568143)
Backed out changeset 5dddaeb1e952 (bug 1567174)
2019-08-02 00:50:34 +03:00
Nicolas Chevobbe 2bba275315 Bug 1567174 - Move expression evaluation to a proper Redux action. r=jdescottes.
The goal is to not directly use the panel.hud.ui.proxy reference
directly from the JsTerm, so we're in better shape when Fission
comes.
It's also a nice refactor to make the JSTerm component more
React-like.
As a nice benefit, we can handle telemetry and history persistence
from their middleware.
As the `requestEvaluation` method is removed from the JSTerm, some
callsites needed to be updated to still work.

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

--HG--
extra : moz-landing-system : lando
2019-08-01 06:47:41 +00:00
Nicolas Chevobbe 6abf1502fb Bug 1568439 - Move webconsole-l10n to utils/l10n. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D39159

--HG--
rename : devtools/client/webconsole/webconsole-l10n.js => devtools/client/webconsole/utils/l10n.js
extra : moz-landing-system : lando
2019-07-24 11:11:34 +00:00
Nicolas Chevobbe d551082a54 Bug 1567167 - Remove copyObject function from JSTerm. r=jdescottes.
The function is only called from the context-menu,
where we already have all the references we need.
So we can move the function code directly in the
menu item callback.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 08:28:24 +00:00
Nicolas Chevobbe 73adf5f4f8 Bug 1554877 - Make JsTerm editor resizable. r=Honza.
We add a GridElementWidthResizer to handle the editor width.
The width is then persisted in a pref.
A test is added to ensure this works as expected.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 05:51:44 +00:00
yulia cc00bf541b Bug 1559819 - rename threadClient to threadFront; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D32848

--HG--
rename : devtools/client/debugger/src/actions/tests/helpers/threadClient.js => devtools/client/debugger/src/actions/tests/helpers/threadFront.js
rename : devtools/shared/client/thread-client.js => devtools/shared/fronts/thread.js
extra : moz-landing-system : lando
2019-07-11 09:45:32 +00:00
Victor Porof f6db0ee557 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 60e4496cf9699dc59f2f4738cb60f87cbdb01e67
2019-07-05 11:24:38 +02: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
chujun c7b8502fb8 Bug 1536854 - Log errors from logpoint as actual errors in the console r=davidwalsh,nchevobbe
If logpoint throws, set `level` to "error".
Add tests to ensure the correct level is set.

Demo function: https://luxuriant-system.glitch.me/
Add some logpoints. The first two statements are invalid. The third one is valid.
{F1311386}

In console:
{F1311387}

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

--HG--
extra : moz-landing-system : lando
2019-06-12 12:10:35 +00:00
Nicolas Chevobbe 63f04fee2d Bug 1545888 - Use template-styled message with placeholders as warning group labels. r=Honza.
This allows to have more meaningful warning group messages, i.e.
"Content Blocking" is turned into something like "The resource at
'<URL>' was blocked because content blocking is enabled".

This is done by parsing the message of the first warning to put
in the group, and replacing the URL with a generic placeholder.

We take this as an opportunity to decouple content blocked messages
and storage access blocked ones, as they have slightly different
meanings and consequences.

Tests are updated to match the new labels, and a new test is
added to make sure that we can have multiple warning group in a
single "page navigation" session.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 13:47:37 +00:00
Julian Descottes c356104909 Bug 1553214 - add fallback value for pageError.cssSelectors r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D33069

--HG--
extra : moz-landing-system : lando
2019-05-31 08:11:13 +00:00
Patrick Brosset a365f19d19 Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes
We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:06:16 +00:00
Mihai Alexandru Michis 2ae5a4bb01 Backed out changeset 0f9626b48a66 (bug 1553451) for linting failures. CLOSED TREE 2019-05-23 10:58:22 +03:00
Patrick Brosset 28f446d619 Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes
We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 07:07:49 +00:00
Christoph Walcher d396718f90 Bug 1530138 - Added resend option in WebConsole r=nchevobbe,Honza
Added resend option in WebConsole

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

--HG--
extra : moz-landing-system : lando
2019-05-14 12:47:08 +00:00
Brian Hackett 42e04a6b23 Bug 1230194 Part 2 - Show stack for console evaluations that throw something, r=nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D27827

--HG--
extra : rebase_source : 78bedd752592f1c8b6940b356c1ad43d9f1b6590
2019-04-16 11:51:52 -10:00
Razvan Caliman d0f3354428 Bug 1093953 - (Part 1) Make CSS warnings expandable to show affected DOM elements. r=Honza
This patch builds on [Bug 1537876](https://bugzilla.mozilla.org/show_bug.cgi?id=1537876) which associates CSS selectors with error messages where applicable.

This patch introduces a new React component, `CSSWarning`, for messages of type CSS. It forks the`PageError` component which was shared for `LOG` messages of type `JAVASCRIPT` and type `CSS`.

The `CSSWarning` component is expandable when the message has an associated CSS selector. When expanded, it runs a `document.querySelectorAll()` command to list all elements matching the selector. Clicking on any of the elements in the result jumps to the Inspector and select the corresponding node in the markup view.

Not all errors have associated CSS selectors. Not all selectors match elements. The errors/warnings are a result of the CSS Parser; there is no guarantee that the CSS rule is used anywhere on the document. The query may return an empty `NodeList`.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 13:01:27 +00:00
Nicolas Chevobbe d1db0f1589 Bug 1260877 - Add a `chromeContext` property to ConsoleMessage. r=bgrins.
This property was already in console api message packet,
and this patch also adds it to pageError packets (retrieving
it from nsIScriptError.isFromChromeContext).

Stubs are updated to include the new property.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 09:08:34 +00:00
Razvan Maries 37613b6718 Backed out 3 changesets (bug 1260877) for perma dt fails on devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_page_error.js. CLOSED TREE
Backed out changeset 10fd2d1f0fa2 (bug 1260877)
Backed out changeset e4f28c656165 (bug 1260877)
Backed out changeset 17059c813d40 (bug 1260877)
2019-04-16 10:09:37 +03:00
Nicolas Chevobbe fa11ea4fc4 Bug 1260877 - Add a `chromeContext` property to ConsoleMessage. r=bgrins.
This property was already in console api message packet,
and this patch also adds it to pageError packets (retrieving
it from nsIScriptError.isFromChromeContext).

Stubs are updated to include the new property.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 05:32:34 +00:00
Nicolas Chevobbe 77d707b079 Bug 1524276 - Group content blocking messages. r=bgrins,Honza.
If there's at least 2 content blocking messages displayed
for a given page navigation, we display a warning group
containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
Two mochitest are added to make sure this works as expected,
one for generic warningGroup features (expanding, group per
navigation session, …), and another one specifically for
content blocking warning group, where we check that every
type of content blocking message can be grouped.

The grouping won't occur unless the groupWarnings preferences
is on.

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

--HG--
extra : moz-landing-system : lando
2019-03-30 11:09:21 +00:00
Nicolas Chevobbe 7b6e74c208 Bug 1524276 - Add WarningGroup message component. r=bgrins.
This component will be used to render warning groups messages.
We also add a `inWarningGroup` prop to the `Message` component
so warnings that will be displayed in such warningGroup can
be styled differently (no warning icon, a different color for
the indent).
Add some utils functions and constants to check if a message
should be a warning group.

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

--HG--
extra : moz-landing-system : lando
2019-03-30 11:08:56 +00:00
Nicolas Chevobbe 4a7ea2cf9d Bug 1524276 - Expose `category` and `innerWindowID` properties in ConsoleMessage. r=bgrins.
This will be used to group similar messages together.
Stubs are updated.

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

--HG--
extra : moz-landing-system : lando
2019-03-30 11:07:56 +00:00
Daniel Varga baeeb7c24b Backed out 4 changesets (bug 1524276) for mochitest-devtools at devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js. On a CLOSED TREE
Backed out changeset 78fb95dc20e3 (bug 1524276)
Backed out changeset 30570673a894 (bug 1524276)
Backed out changeset 9476f9253c9c (bug 1524276)
Backed out changeset 6f1c417146be (bug 1524276)
2019-03-29 17:48:19 +02:00
Nicolas Chevobbe d45c05f470 Bug 1524276 - Group content blocking messages. r=bgrins,Honza.
If there's at least 2 content blocking messages displayed
for a given page navigation, we display a warning group
containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
Two mochitest are added to make sure this works as expected,
one for generic warningGroup features (expanding, group per
navigation session, …), and another one specifically for
content blocking warning group, where we check that every
type of content blocking message can be grouped.

The grouping won't occur unless the groupWarnings preferences
is on.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 14:19:50 +00:00