Commit Graph
39 Commits
Author SHA1 Message Date
Alexandre Poirot 383a8cddbe Bug 1566421 - Ensure that actions.updateRequest resolves only once the action is processed. r=nchevobbe
The code callng action.updateRequest, in FirefoxDataProvider, expects the updateRequest action
to be processed once the returned promise is resolved. Otherwise it may spawn
duplicated requestData requests.

Differential Revision: https://phabricator.services.mozilla.com/D39153
2019-07-29 09:18:14 +00:00
Alexandre Poirot 3f55d2085a Bug 1568203 - Removed unused requestEvaluation's frame argument. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D39052
2019-07-24 08:35:48 +00:00
Bogdan Tara 3423c8474d Backed out 2 changesets (bug 1568203, bug 1568185) for ES lint failure on eval-with-debugger.js CLOSED TREE
Backed out changeset adc394f833f9 (bug 1568203)
Backed out changeset 46c3a1fdc706 (bug 1568185)
2019-07-24 11:24:51 +03:00
Alexandre Poirot f345168351 Bug 1568203 - Removed unused requestEvaluation's frame argument. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D39052
2019-07-24 07:48:01 +00:00
yulia 7eba825d59 Bug 1559819 - rename threadClient to threadFront; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D32848
2019-07-11 09:45:32 +00:00
Victor Porof b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
Nicolas Chevobbe 3bae049ef3 Bug 1562839 - Put editor mode behind a pref. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D36582
2019-07-03 11:14:22 +00:00
Nicolas Chevobbe fe0b8a4221 Bug 1358983 - Fix zombie highlighters. r=miker.
Due to how highlighters work, it requires the inspector to be initialized.
It can happen than the user will mouseenter/mouseout on an element that
calls highlight/unhighlight very quickly.
Since the hightlight can take some time, it might happen that the unhighlight
call is handled first, before the highlight call, meaning that we now have an
highlighter displayed, even though the user isn't hovering anything that
should cause this anymore.

This patch introduces a new toolbox function called `getHighlighter` that
returns an object with a `highlight and a `unhighlight` function.
We keep a reference to any possible pending `highlight` call so we can wait
for it to be done in `unhighlight`, before destroying it.

The console makes use of the new helper function, and a test is added to ensure
we don't have zombie highlighters anymore.

Differential Revision: https://phabricator.services.mozilla.com/D34562
2019-06-21 22:15:57 +00:00
Nicolas Chevobbe d368aec537 Bug 1544864 - Enable Show Content Messages in browser console. r=bgrins.
This patch removes the preference we were using to
display the checkbox in the Browser Console; it's now
always displayed there.

We flip the pref to show content messages ini tests that need them.

Differential Revision: https://phabricator.services.mozilla.com/D34996
2019-06-15 08:07:17 +00:00
Dorel Luca b118cbc638 Backed out changeset 6fb248823c0d (bug 1544864) for DevTools failures in devtools/client/webconsole/test/mochitest/browser_console_clear_cache.js. CLOSED TREE 2019-06-14 20:57:29 +03:00
Nicolas Chevobbe 9e09b2b0a5 Bug 1544864 - Enable Show Content Messages in browser console. r=bgrins.
This patch removes the preference we were using to
display the checkbox in the Browser Console; it's now
always displayed there.

Differential Revision: https://phabricator.services.mozilla.com/D34996
2019-06-14 13:40:32 +00:00
Nicolas Chevobbe 1ddd423224 Bug 1525618 - Add an option in the settings panel to toggle warning groups. r=Honza.
We also listen for the warningGroup preference change to
toggle warningGroups in the console output.
If warningGroups were disabled, we need to loop through
the state messages to create warningGroups when needed.
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D32716
2019-06-03 15:10:45 +00:00
Nicolas Chevobbe f0451e393d Bug 1552434 - Move timestamp preference change handler. r=rcaliman.
We move the observer declaration closest to where the store is created
so we can dispatched action more easily.
We put all the observers in a Map so we can remove them easily when
destroying the console panel.

Differential Revision: https://phabricator.services.mozilla.com/D31591
2019-06-03 15:10:14 +00:00
yulia 3fa3fe5250 Bug 1042642 - Use EventEmitter instead of EventSource for the threadClient; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D29373
2019-05-30 08:37:55 +00:00
Sebastian Hengst b4e7ef2b7e Backed out changeset e20df5f95e44 (bug 1552434) for devtools failures in devtools/client/framework/test/browser_toolbox_options.js CLOSED TREE 2019-05-22 23:35:43 +02:00
Nicolas Chevobbe 2eac491962 Bug 1552434 - Move timestamp preference change handler from webconsole-ui to App component. r=rcaliman.
It makes more sense to declare the preference changes in the root
React component, as other components (aboutdebugging, netmonitor, ...)
already do it.
Since we don't want to unmount the App component (which means we
won't fire any componentWillUnmount), we're turning the observer
into a weak referenced one so we don't leak.

Differential Revision: https://phabricator.services.mozilla.com/D31591
2019-05-22 15:30:28 +00:00
Aaditya Arora c1987d8aea Bug 1533277 - Use SearchBox component in console filter bar. r=ntim.
The code is adapted to work with the SearchBox, which means
we can get rid of an event listener in webconsole-ui.js.
Also, we take this as an opportunity to remove the element
refs as they were only used in tests, where we can more easily
use query selectors to get those elements.
Some changes were needed in SearchBox's `onChange` function since
`setState` is asynchronous.

Differential Revision: https://phabricator.services.mozilla.com/D31762
2019-05-21 12:20:50 +00:00
Christoph Walcher 27e4395f18 Bug 1530138 - Added resend option in WebConsole r=nchevobbe,Honza
Added resend option in WebConsole

Differential Revision: https://phabricator.services.mozilla.com/D30779
2019-05-14 12:47:08 +00:00
Julian Descottes f842eea3df Bug 1543940 - menu.popup() should take a document argument instead of toolbox r=ochameau
Depends on D27693

Menu::popup and popupAtZoom are expecting a toolbox argument as last argument.
However, half of the callsites do not have access to the toolbox and just pass
a { doc } object. This is misleading when trying to work on menu.js because you
cannot rely on toolbox APIs.

Differential Revision: https://phabricator.services.mozilla.com/D28036
2019-05-08 21:35:36 +00:00
Andreea Pavel 368a7a0194 Backed out 5 changesets (bug 1543940) for failing browser_menu_api.js on a CLOSED TREE
Backed out changeset aaa0f827616a (bug 1543940)
Backed out changeset 590b72185b69 (bug 1543940)
Backed out changeset 42e2136f684f (bug 1543940)
Backed out changeset a66967f17042 (bug 1543940)
Backed out changeset b1e6e932873c (bug 1543940)
2019-05-08 20:49:43 +03:00
Julian Descottes d9b007903b Bug 1543940 - menu.popup() should take a document argument instead of toolbox r=ochameau
Depends on D27693

Menu::popup and popupAtZoom are expecting a toolbox argument as last argument.
However, half of the callsites do not have access to the toolbox and just pass
a { doc } object. This is misleading when trying to work on menu.js because you
cannot rely on toolbox APIs.

Differential Revision: https://phabricator.services.mozilla.com/D28036
2019-05-08 15:13:40 +00:00
Razvan Caliman 4c1405c671 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
2019-05-03 13:01:27 +00:00
Brian Hackett 08eb9946a6 Bug 1538781 - Use the right thread for console evaluations when paused in a worker thread's frame, r=nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D27625
2019-04-15 13:27:53 -10:00
Nicolas Chevobbe b4d4f3592b Bug 1260877 - Display a Show content messages checkbox in Browser Console. r=bgrins.
A preference is added to enable this feature, another one
to store the last value of the checkbox.
When unchecked, the console hides all the messages that
don't originate from a chrome contect, via the `chromeContext`
property on the message.

Since we already have a test to check that content messages are
displayed in the console output, we use it to assert the
effects of the "Show content messages" checkbox.

Differential Revision: https://phabricator.services.mozilla.com/D26337
2019-04-16 09:09:01 +00:00
Razvan Maries d16edcade6 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 cc148bf0fe Bug 1260877 - Display a Show content messages checkbox in Browser Console. r=bgrins.
A preference is added to enable this feature, another one
to store the last value of the checkbox.
When unchecked, the console hides all the messages that
don't originate from a chrome contect, via the `chromeContext`
property on the message.

Since we already have a test to check that content messages are
displayed in the console output, we use it to assert the
effects of the "Show content messages" checkbox.

Differential Revision: https://phabricator.services.mozilla.com/D26337
2019-04-16 05:32:49 +00:00
Mellina Yonashiro b253301825 Bug 1532295 - Webconsole's onViewSourceInDebugger doesn't pass column number to debugger panel when opening a source. .
Pass on column from props.onViewSourceInDebugger (///devtools/client/shared/components/reps/reps.js:6844//) to
//devtools/client/webconsole/webconsole-wrapper.js:267// as **frame.column**

Differential Revision: https://phabricator.services.mozilla.com/D22372
2019-03-28 13:52:28 +00:00
Dhruvi Butti 9eeb24c9d7 Bug 1512400 - Make console autocomplete optional. r=nchevobbe.
Add a preference to make the console input autocomplete automatic.
If set to false, the autocomplete popup will only appear on Ctrl+Space.
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D24705
2019-03-26 07:13:15 +00:00
Brian Hackett 1ac9b8ac92 Bug 1530133 Part 2 - Allow clearing console messages by their logpoint ID, r=nchevobbe. 2019-02-23 16:19:17 -10:00
fanny f824037386 Bug 1457111 - Implement copy link adress option. r=nchevobbe
Before this change, when we tried to select a URL to copy,
the label "Copy Message" or "Copy Object" was displayed which
does not represent the context. You can now detect if a link exists
and the label is "Copy link address"

Differential Revision: https://phabricator.services.mozilla.com/D21136
2019-03-04 10:36:11 +00:00
Aaditya Arora a1c4e7f1bb Bug 1530612 - Pass CSS warning column through viewSouceInStyleEditor; r=nchevobbe.
Pass CSS warning column location through viewSourceInStyleEditor
so clicking on CSS warnings in console jumps to the right location in style editor

Differential Revision: https://phabricator.services.mozilla.com/D21682
2019-03-01 16:43:02 +00:00
Nicolas Chevobbe 8a8d018dff Bug 1463128 - Expose setInputValue and getInputValue at hud level; r=Honza.
Now that the JsTerm is a React component, we shouldn't
let external consumers have to get the instance in order
to perform some actions on the console input.
We start with the most used actions, setInputValue and getInputValue,
and might extend that in the future.

Differential Revision: https://phabricator.services.mozilla.com/D20685
2019-02-27 10:09:35 +00:00
Nicolas Chevobbe bacd3fb7b8 Bug 1463128 - Rename WebConsoleUI.owner into WebConsoleUI.hud; r=bgrins.
Renaming this property makes it easier to grasp what
it represents (instead of the vague `owner` term).

Differential Revision: https://phabricator.services.mozilla.com/D20678
2019-02-27 10:04:53 +00:00
Gurzau Raul 3ee8fd7ce9 Backed out 5 changesets (bug 1463128) for failing at webconsole/autocomplete.js on a CLOSED TREE.
Backed out changeset 31a85e2ed53e (bug 1463128)
Backed out changeset fcd93f64c934 (bug 1463128)
Backed out changeset ae460b3a30c2 (bug 1463128)
Backed out changeset 97a1eeb8db65 (bug 1463128)
Backed out changeset c504e9730eac (bug 1463128)
2019-02-27 00:19:15 +02:00
Nicolas Chevobbe 6ac4e9955c Bug 1463128 - Expose setInputValue and getInputValue at hud level; r=Honza.
Now that the JsTerm is a React component, we shouldn't
let external consumers have to get the instance in order
to perform some actions on the console input.
We start with the most used actions, setInputValue and getInputValue,
and might extend that in the future.

Differential Revision: https://phabricator.services.mozilla.com/D20685
2019-02-26 14:42:13 +00:00
Nicolas Chevobbe 725deeee35 Bug 1463128 - Rename WebConsoleUI.owner into WebConsoleUI.hud; r=bgrins.
Renaming this property makes it easier to grasp what
it represents (instead of the vague `owner` term).

Differential Revision: https://phabricator.services.mozilla.com/D20678
2019-02-26 14:39:03 +00:00
Brian Hackett fa5e9ef447 Bug 1447244 Part 7 - Devtools client changes for script source IDs, r=lsmyth. 2019-01-16 12:01:33 -10:00
Nicolas Chevobbe c3ec87944a Bug 1527834 - Rename WebConsoleWrapper:hud to WebConsoleWrapper:webConsoleUI; r=bgrins.
This better reflects what the property is (i.e. a
WebConsoleUI instance), and avoid confusion with
the panel's hud (created in webconsole.js).
We take that as an opportunity to clean things up
a bit (e.g. don't access the webConsoleUI through
JsTerm).

Differential Revision: https://phabricator.services.mozilla.com/D19783
2019-02-15 08:17:43 +00:00
Nicolas Chevobbe 8f4e7fdfd0 Bug 1526247 - Rename webconsole-output-wrapper; r=bgrins.
This file used to only manage the output, but
this is not true anymore, and the name could
be misleading.
We take this as an opportunity to cleanup
some property names and CSS classes.

Differential Revision: https://phabricator.services.mozilla.com/D19135
2019-02-11 06:42:28 +00:00