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

20386 Коммитов

Автор SHA1 Сообщение Дата
Tetsuharu Ohzeki f6fa9f6c18 Bug 1508688 - Add `UNSAFE_` prefix to React deprecated lifecycle methods in devtools/client/inspector/. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149480
2022-06-16 10:03:10 +00:00
Tetsuharu Ohzeki 4af14e7f3f Bug 1508688 - Add `UNSAFE_` prefix to React deprecated lifecycle methods in devtools/client/framework/. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149479
2022-06-16 10:03:09 +00:00
Tetsuharu Ohzeki 0a05c81cf4 Bug 1508688 - Add `UNSAFE_` prefix to React deprecated lifecycle methods in devtools/client/debugger/. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149478
2022-06-16 10:03:09 +00:00
Tetsuharu Ohzeki 49983d16b8 Bug 1508688 - Add `UNSAFE_` prefix to React deprecated lifecycle methods in devtools/client/accessibility/. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149477
2022-06-16 10:03:09 +00:00
Tetsuharu Ohzeki 3bad49f709 Bug 1508688 - Add `UNSAFE_` prefix to React deprecated lifecycle methods in devtools/client/aboutdebugging/. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149476
2022-06-16 10:03:08 +00:00
Alexandre Poirot e366854094 Bug 1767708 - [devtools] Fix intermittent with browser_dbg-content-script-sources.js. r=bomsy
The source tree seems to be updated asynchronously after the source selection.

Also, the SourcesTree component wasn't correctly selecting and expanding the tree
when the selected source was immediately selected as it gets created in the source tree.

Differential Revision: https://phabricator.services.mozilla.com/D148838
2022-06-15 17:10:16 +00:00
Alexandre Poirot 716e6a68c2 Bug 1761975 - [devtools] Hide ExtensionContent.jsm when debugging page with WebExt content scripts. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D148837
2022-06-15 17:10:16 +00:00
Nicolas Chevobbe 5309cb5c0d Bug 1773994 - [devtools] Remove unnecessary code for network messages in MESSAGE_OPEN. r=ochameau.
With the changes from Bug 1686440, there's no benefit keeping this code around.

Differential Revision: https://phabricator.services.mozilla.com/D149139
2022-06-15 12:57:08 +00:00
Nicolas Chevobbe 63765889d4 Bug 1773993 - [devtools] Remove unused removeIds variable in addMessage. r=ochameau.
Nothing was added to the array, so we can remove it.

Differential Revision: https://phabricator.services.mozilla.com/D149138
2022-06-15 12:57:08 +00:00
Nicolas Chevobbe 0e20c6b7c9 Bug 1764501 - [devtools] Speedup adding messages out of order. r=ochameau.
In the console we might receive messages that need to be inserted at a specific
position in the output to respect the chronological order.
This is very visible when evaluating an expression in the console while we are
fetching cached messages, or when the expression is logging lots of messages, since
the evaluation result doesn't go through the ResourceCommand itself.
Since we were relying on the order of insertion in `mutableMessagesById` for the
order of messages in the output, we had no choice but clone the Map to insert
the new message at the specific position.
With lots of messages, this can be utterly slow, and is something people are experiencing.

To fix this, we're adding a new state property, `mutableMessagesOrder`, which holds
message ids in the chronological order. It's then used to compute `visibleMessages`.
As we don't have to clone the Map anymore, it makes reordering as fast as looking
for an index in the array and splicing it (which is fast).

We also take this opportunity to switch away from our `findIndex` usage; most often
than not, the messages will be reinserted at the end of the array, so we can loop
through it backward to find the index faster.

We still keep `mutableMessagesById` as a Map so lookup are fast, and we don't have
to deal with impacts we'd have if we'd switch to an object.

The existing node test helper to get a message at a specific index are migrated
to make use of `mutableMessagesOrder`, and a few test cases and assertions are
added to check that the new property is handled correctly.

Differential Revision: https://phabricator.services.mozilla.com/D148658
2022-06-15 12:57:07 +00:00
criss 85072ad6a8 Backed out 2 changesets (bug 1761975, bug 1767708) for causing Xpcshell failures on test_blackboxing-02.js. CLOSED TREE
Backed out changeset d2fc50df9355 (bug 1767708)
Backed out changeset bdb40c0a7307 (bug 1761975)
2022-06-15 15:50:17 +03:00
Alexandre Poirot 638166ba96 Bug 1767708 - [devtools] Fix intermittent with browser_dbg-content-script-sources.js. r=bomsy
The source tree seems to be updated asynchronously after the source selection.

Also, the SourcesTree component wasn't correctly selecting and expanding the tree
when the selected source was immediately selected as it gets created in the source tree.

Differential Revision: https://phabricator.services.mozilla.com/D148838
2022-06-15 10:10:14 +00:00
Alexandre Poirot 54c38d1475 Bug 1761975 - [devtools] Hide ExtensionContent.jsm when debugging page with WebExt content scripts. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D148837
2022-06-15 10:10:13 +00:00
Alexandre Poirot 70ceb24d7e Bug 1676208 - [devtools] Force keepAlive on browser toolbox test server. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D149354
2022-06-15 09:20:06 +00:00
Tooru Fujisawa c1313ef8d6 Bug 1773882 - Part 2: Add more testcase. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149213
2022-06-15 05:36:10 +00:00
Tooru Fujisawa 71da016478 Bug 1773882 - Show getter/setter in array element. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149042
2022-06-15 05:36:10 +00:00
Tooru Fujisawa 371b3c1d97 Bug 1607331 - Part 3: Reject global this usage in JSM. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148551
2022-06-14 21:56:55 +00:00
Luca Greco facdcdeaab Bug 1772905 - Update DevTools DOM panel tests that fails if InstallTrigger is not listed anymore as a window global. r=nchevobbe
These two DevTools DOM panel tests are expecting the elements being inspected to be at a certain row index
which depends (likely due to alphabetic order) that InstallTrigger is listed as a global in the window
being inspected (it doesn't matter what the value is, the failure is triggered because when InstallTrigger
is completely hidden the elements expected by the tests are shift by one row position).

And so these two tests would be currently permafailing when "extensions.InstallTrigger.enabled" is set to `false`
(but they are completely uneffected when "extensions.InstallTriggerImpl.enabled" is set to `false`, because the
InstallTrigger global is still defined, just set to null instead of providing the API defined by the
InstallTriggerImpl interface).

This patch changes name of the global properties to which they are set to "A" and "B", to make sure those properties
 are going to be in rows listed in the DOM panel before the two non-standard globals `InstallTrigger` and `SpecialPowers`
 and so that the visibility of the InstallTrigger global (either disabled or still visible) doesn't affect the test case.

Differential Revision: https://phabricator.services.mozilla.com/D148975
2022-06-14 19:29:06 +00:00
Hubert Boma Manilla 8708b3ac9e Bug 1772363 - [devtools] Ensure actually watching resources before pause/resume UI is updated r=ochameau
Changing the pattern for toggling recording to ensure that pause/resumes actually
start or stops watching resources before the ui states gets updated.

Differential Revision: https://phabricator.services.mozilla.com/D148953
2022-06-14 15:38:07 +00:00
Nicolas Chevobbe e779b145d6 Bug 1774205 - [devtools] Remove unnecessary numFixProps property. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D149255
2022-06-14 15:00:36 +00:00
Hubert Boma Manilla 363afe7760 Bug 1767702 - disable browser_dbg-features-source-tree.js on win10_2004 temporarily r=intermittent-reviewers,MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D149248
2022-06-14 13:10:13 +00:00
Julian Descottes c322679a51 Bug 1753048 - [devtools] Include the fallback window to the docShells array for webextension targets r=ochameau
Depends on D148489

This allows to properly set the cssErrorReportingEnabled flag on its docShell.
While we are not interested in css errors for this fallback window, the windowglobal target actor
will automatically set the flag on new root browsing contexts only if the previous one had the flag
set. This way when we switch to a valid webextension document (eg a popup), the flag will be set
and CSS errors will be reported.

Differential Revision: https://phabricator.services.mozilla.com/D148836
2022-06-14 06:52:49 +00:00
Julian Descottes 7dfa0bab07 Bug 1753048 - [devtools] Append the addonId to the DevTools fallback window URL r=ochameau
This window does not share the regular extension principal so we cannot fetch
the addonId from the principal in the same way as we do for other documents.

Instead we append the addonId to the URL and provide a new helper in browser-context-helpers
to extract the addonId from a browsingContext.
This helper should work transparently from the parent process and the content process, and
should support browsing context for regular extension documents as well as browsing contexts
for fallback windows.

Differential Revision: https://phabricator.services.mozilla.com/D148489
2022-06-14 06:52:49 +00:00
Nicolas Chevobbe bddac8be66 Bug 1773627 - [devtools] Fix mapAwaitExpression on expression with for..of/in loops. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D148920
2022-06-13 10:13:16 +00:00
Nicolas Chevobbe fe472aae2e Bug 1771428 - [devtools] Remove last statement AwaitExpression in mapTopLevelAwait. r=bomsy.
We use to transform expression like `await obj` into
```
(async () => {
  return await obj;
})()
``

So we were basically returning the expression, wrapped in an async iife, adding
a `return` statement before the last statement.
But in the case the last statement is an `AwaitExpression`, we can simply return
the argument, stripping the `await` keyword.
This fixes an issue when awaiting for an object with a `then` getter would execute
the getter twice.
A test case is added in mochitest, and unit test are updated to reflect the new
output.

Differential Revision: https://phabricator.services.mozilla.com/D148806
2022-06-10 15:55:07 +00:00
Michael Ratcliffe 622e16558f Bug 1603831 - Fix cookie sorting by date in storage panel r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D58074
2022-06-09 21:41:50 +00:00
Hubert Boma Manilla c89f87a6d2 Bug 1685949 - [devtools] Fix perma fail on browser_console_context_menu_entries.js r=nchevobbe
Since Network monitoring is switched of by default in the browser console, we need to
switch it on  explicitly for the browser_console_context_menu_entries.js test.

Differential Revision: https://phabricator.services.mozilla.com/D148776
2022-06-09 13:54:14 +00:00
Hubert Boma Manilla 2b8049bcf5 Bug 1772363 - [devtools] Fix intermittent on browser_net_pause.js r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D148674
2022-06-09 09:34:31 +00:00
Julian Descottes 9fe4287523 Bug 1604562 - [devtools] Add mochitest for CORS request issue from DevTools style update r=emilio,nchevobbe
Depends on D148396

Differential Revision: https://phabricator.services.mozilla.com/D148657
2022-06-08 21:36:09 +00:00
Alexandre Poirot 70d1047c51 Bug 1771939 - [devtools] Compute SourceTree data "parts" from sources selectors instead of updateTree layer. r=bomsy
This helps compute it only once per source and help simplify the updateTree layer.
We no longer have to path thread/mainThreadHost everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D147780
2022-06-08 15:27:33 +00:00
Alexandre Poirot 52aed0bdf8 Bug 1771939 - [devtools] Move `formatTree` from production to test helpers. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D147779
2022-06-08 15:27:33 +00:00
Alexandre Poirot ff7508e4e5 Bug 1771939 - [devtools] Only pass source instead of source *and* source.displayURL. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D147778
2022-06-08 15:27:33 +00:00
Alexandre Poirot a8f3a916ec Bug 1771939 - [devtools] Ignore sources early in the selector instead of from updateTree API. r=bomsy
We were using `isInvalidUrl` late in the process of updateTree layer to ignore sources
and prevent displaying them in the SourceTree.
But getDisplayedSources is dedicated to the SourceTree and can eagerly filter out the right sources
right away.
Also getDisplayedSourceIDs is already accepting only source with a URL,
so we don't have to recheck if the source is having a URL.

I extended mochitest test coverage to replace the removed jest tests.

Differential Revision: https://phabricator.services.mozilla.com/D147777
2022-06-08 15:27:32 +00:00
Alexandre Poirot d3c1a381fc Bug 1771939 - [devtools] Compute the displayURL from the selector once. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D147764
2022-06-08 15:27:32 +00:00
Alexandre Poirot 14ffc9fff6 Bug 1771939 - [devtools] Remove unused defaultDomain argument from getURL. r=bomsy
This argument is only used in getDisplayURL.

Differential Revision: https://phabricator.services.mozilla.com/D147763
2022-06-08 15:27:31 +00:00
Alexandre Poirot 4cd02f933c Bug 1771939 - [devtools] Migrate from debuggeeUrl/debuggeeHost to mainThreadHost. r=bomsy
At the end, we weren't using the url but only the host.
And "debuggee" is pretty vague, let's clarify with "main thread".

Differential Revision: https://phabricator.services.mozilla.com/D147762
2022-06-08 15:27:31 +00:00
Alexandre Poirot 39957a91c9 Bug 1771939 - [devtools] Remove unused debuggee classname and debuggeeUrl prop from SourceTreeItem. r=bomsy
The classname looks useless and so is the debugeeUrl prop.

Differential Revision: https://phabricator.services.mozilla.com/D147761
2022-06-08 15:27:31 +00:00
Alexandre Poirot 7e32d7ca8c Bug 1771939 - [devtools] Remove unused sortTree module from debugger. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D147760
2022-06-08 15:27:30 +00:00
Alexandre Poirot 10a5e28c1f Bug 1771939 - [devtools] Remove shown source and show source in tree when source is selected. r=bomsy
Before, only "shown source" would really expand the tree to show the source in tree,
whereas "highlight" would only highlight the folder that is opened
(in case the source isn't visible and folder isn't expanded).

But when we select a new shown source, we also update the selected location,
which also changes the highlight items.

It is significantly clearer to only have "selected source" and have the SourceTree
to automatically expand the tree and show the selected source.

(Also a sneaky call to .reverse() was mutating the `highlightedItems` props...)

Differential Revision: https://phabricator.services.mozilla.com/D147759
2022-06-08 15:27:30 +00:00
Alexandre Poirot a49f0276c4 Bug 1773037 - [devtools] Disable safe mode and session restore in the browser toolbox. r=nchevobbe
The safe mode dialog will be displayed instead of the browser toolbox when the previous browser
toolbox has been closed too brutaly. This happens every now and then.

Also, when you opened a URL from the browser toolbox, this will then trigger a transient
browser window that appears and immediately disappear when opening the browser toolbox
all next time you start it. It might be related to session restore, but it looks like it is not enough
to get rid of this blinking window.

Differential Revision: https://phabricator.services.mozilla.com/D148515
2022-06-08 08:25:27 +00:00
Julian Descottes edc9af2bff Bug 1773203 - [devtools] Improve failure message and documentation for devtools-bundle job r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D148607
2022-06-08 07:47:25 +00:00
colin_czb c3a1dc4ad3 Bug 1765631 - [devtools] Copy Request Headers hardcodes HTTP version r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D147580
2022-06-08 06:34:54 +00:00
Emilio Cobos Álvarez 255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Hubert Boma Manilla 27106e41bc Bug 1771277 - [devtools] Remove the websocket and server sent events prefs r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D147413
2022-06-07 12:18:49 +00:00
Hubert Boma Manilla 8acd16def6 Bug 1764348 - Pause / Resume should toggle listening to network resources r=ochameau
With this patch Pause and Resume, now stop and start listening to network requests.

Differential Revision: https://phabricator.services.mozilla.com/D148488
2022-06-07 12:18:49 +00:00
Julian Descottes d2b00c2027 Bug 1767764 - [devtools] Add logs to browser_layoutHelpers_getBoxQuads2.js r=Honza
Just adding some logs for now to help with the investigation

Differential Revision: https://phabricator.services.mozilla.com/D148401
2022-06-07 07:53:13 +00:00
Hubert Boma Manilla 1ef847a862 Bug 1771659 - [devtools] Fix perma failure in BETA r=ochameau
The multiprocess browser toolbox is on by default in BETA, so we
need to switch it on explicitly for the addon extensions to be listed.

Differential Revision: https://phabricator.services.mozilla.com/D148392
2022-06-07 07:39:42 +00:00
Andrew McCreight be6bd6a9b2 Bug 1772851 - Fix devtools tests to not rely on ambient XUL. r=devtools-reviewers,nchevobbe
Instead, explicitly add permissions for the domain that needs it.

Also browser_bug331772_xul_tooltiptext_in_html.js.

Differential Revision: https://phabricator.services.mozilla.com/D148406
2022-06-06 16:33:35 +00:00
Hubert Boma Manilla 96c5408eef Bug 1764348 - Enable browser console / browser toolbox console users turn on network monitoring manually r=nchevobbe
Highlights
- Network monitoring is turned off by default in browser console/ browser toolbox console on initial load.
- A new "Enable Network Monitoring" setting is added to enable users toggle on an off as they desire.
- The user setting is persisted across toolbox reopens.

Differential Revision: https://phabricator.services.mozilla.com/D145234
2022-06-06 13:56:05 +00:00
Hubert Boma Manilla 463affeaf5 Bug 1764348 - Cleanup hidePersistLogsCheckbox and hideShowContentMessagesCheckbox property r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D145550
2022-06-06 13:56:05 +00:00
Tooru Fujisawa 198cb49870 Bug 1772093 - Part 10: Use plain object for lazy getter in devtools/client/performance-new/symbolication.jsm.js. r=julienw,mstange
Differential Revision: https://phabricator.services.mozilla.com/D147907
2022-06-06 07:09:55 +00:00
Tooru Fujisawa 725309d478 Bug 1772093 - Part 5: Use plain object for lazy getter in devtools/client/styleeditor/. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D147901
2022-06-06 07:09:53 +00:00
Tooru Fujisawa 9f4d6c53aa Bug 1772093 - Part 4: Use plain object for lazy getter in devtools/client/storage/. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D147900
2022-06-06 07:09:53 +00:00
Tooru Fujisawa f28017dac7 Bug 1772093 - Part 3: Use plain object for lazy getter in devtools/client/shared/. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D147899
2022-06-06 07:09:53 +00:00
Tooru Fujisawa 177eb08f33 Bug 1772093 - Part 2: Use plain object for lazy getter in devtools/client/jsonview/. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D147898
2022-06-06 07:09:52 +00:00
Tooru Fujisawa a767536cca Bug 1772093 - Part 1: Use plain object for lazy getter in devtools/client/framework/. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D147897
2022-06-06 07:09:52 +00:00
Tooru Fujisawa 7fe9e3ef7e Bug 1772093 - Part 0: Eagerly import some modules in devtools/. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D148178
2022-06-06 07:09:51 +00:00
Tooru Fujisawa 823c668f50 Bug 1772351 - Part 1: Stop calling ChromeUtils.defineModuleGetter for AppConstants. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D148164
2022-06-06 04:42:08 +00:00
Molnar Sandor 77402a5caa Backed out 15 changesets (bug 1772313, bug 1772351, bug 1772360) for causing xpc failures in telemetry/tests/unit/test_SocketScalars.js CLOSED TREE
Backed out changeset c8b0a2ed239e (bug 1772360)
Backed out changeset 1922adad6abe (bug 1772351)
Backed out changeset 6d3634cce489 (bug 1772351)
Backed out changeset f03968a9d053 (bug 1772351)
Backed out changeset e7a38ef90fe4 (bug 1772351)
Backed out changeset b389e7654771 (bug 1772313)
Backed out changeset 59a33598ff51 (bug 1772313)
Backed out changeset ab60885a8a93 (bug 1772313)
Backed out changeset aad8efac9d05 (bug 1772313)
Backed out changeset 4378e519a8e7 (bug 1772313)
Backed out changeset 302ac54741f8 (bug 1772313)
Backed out changeset 74c59f9fd51c (bug 1772313)
Backed out changeset 575fb877c56c (bug 1772313)
Backed out changeset 2eaa68f10b19 (bug 1772313)
Backed out changeset 4a8b3ba193dc (bug 1772313)
2022-06-06 07:04:25 +03:00
Tooru Fujisawa 5ff7b51845 Bug 1772351 - Part 1: Stop calling ChromeUtils.defineModuleGetter for AppConstants. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D148164
2022-06-06 02:49:12 +00:00
Julian Descottes b4b1231f7f Bug 1772239 - [devtools] Stop reading client preference devtools.browsertoolbox.fission in the devtools server r=ochameau,devtools-backward-compat-reviewers,bomsy
The devtools.browsertoolbox.fission should not be read on the server but should instead be provided to the server by the client.
The breakage can be reproduced if you try to debug a Firefox desktop with devtools.browsertoolbox.fission = false from a Firefox with devtools.browsertoolbox.fission
= true.

Differential Revision: https://phabricator.services.mozilla.com/D148129
2022-06-03 16:51:51 +00:00
Michael Ratcliffe b607b4b44f Bug 1771998 - Eliminate mozilla/reject-osfile eslint warning in PerfTools code r=julienw
Try is green:
https://treeherder.mozilla.org/jobs?repo=try&revision=9fe09c79953c516ffaaca3efada1fbe53cb9c97c

Differential Revision: https://phabricator.services.mozilla.com/D148068
2022-06-03 15:40:58 +00:00
Molnar Sandor 4d1529da83 Bug 1772211 - Fix typo. a=fix. 2022-06-03 12:34:06 +03:00
Michael Ratcliffe 010e0b9179 Bug 1759914 - Clean up downloads after browser_screenshot_button.js r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D148151
2022-06-03 09:14:26 +00:00
Butkovits Atila d03eb2b6c1 Bug 1772211 - disable browser_net_truncate-post-data.js with socket process networking for permanent failures
These started after the changes in bug 1772074.

Differential Revision: https://phabricator.services.mozilla.com/D148069
2022-06-03 08:40:32 +00:00
Michael Ratcliffe 3133e874e5 Bug 1771608 - Eliminate mozilla/reject-osfile eslint warning in devTools code r=devtools-reviewers,perftest-reviewers,jdescottes,sparky
## Removed Some Osfile.jsm and ChromeUtils Dependencies

```diff
-  const { OS } = require("resource://gre/modules/osfile.jsm");

And / Or

-  const ChromeUtils = require("ChromeUtils");
```

- devtools/client/memory/actions/io.js
- devtools/client/memory/utils.js
- devtools/client/netmonitor/src/har/har-menu-utils.js
- devtools/client/responsive/test/browser/browser_screenshot_button.js
- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/client/shared/screenshot.js
- devtools/client/styleeditor/StyleEditorUI.jsm
- devtools/client/styleeditor/StyleSheetEditor.jsm
- devtools/client/webconsole/components/Input/JSTerm.js
- devtools/client/webconsole/test/browser/stub-generator-helpers.js
- devtools/server/actors/heap-snapshot-file.js
- devtools/server/actors/storage.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_01.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_02.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_03.js
- devtools/shared/DevToolsUtils.js
- devtools/shared/heapsnapshot/HeapSnapshotFileUtils.js
- devtools/shared/tests/xpcshell/test_fetch-file.js
- testing/talos/talos/tests/devtools/addon/content/tests/toolbox/screenshot.js

## IOUtils.read()

```diff
-  OS.File.read(path);
+  IOUtils.read(path);
```

- devtools/client/aboutdebugging/test/browser/helper-real-usb.js
- devtools/client/netmonitor/src/har/har-menu-utils.js
- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/client/styleeditor/StyleSheetEditor.jsm
- devtools/client/webconsole/components/Input/JSTerm.js
- devtools/client/webconsole/test/browser/browser_jsterm_file_load_save_keyboard_shortcut.js
- devtools/client/webconsole/test/browser/browser_webconsole_context_menu_export_console_output.js
- devtools/shared/DevToolsUtils.js

## IOUtils.write()

```diff
-  OS.File.writeAtomic(filePath, fileContent);
+  IOUtils.write(filePath, fileContent);
```

- devtools/client/webconsole/test/browser/stub-generator-helpers.js
- devtools/shared/DevToolsUtils.js
- devtools/shared/tests/xpcshell/test_fetch-file.js

## PathUtils.split()

```diff
-  OS.Path.split(path);
+  PathUtils.split(path);
```

- devtools/client/styleeditor/StyleSheetEditor.jsm

## PathUtils.join()

```diff
-  OS.Path.join(path, filename);
+  PathUtils.join(path, filename);
```

NOTE: If `filename` is an absolute path then `OS.Path` will ignore `path` and use `filename` but `PathUtils` will try to concatenate both paths. If filename can be an absolute path we need to use `PathUtils.isAbsolute()` and `PathUtils.joinRelative()` to make our desired behaviour explicit.

- devtools/client/debugger/test/mochitest/browser_dbg-chrome-create.js
- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/client/styleeditor/StyleSheetEditor.jsm
- devtools/shared/heapsnapshot/HeapSnapshotFileUtils.js

## PathUtils.isAbsolute() and PathUtils.joinRelative()

```diff
-  filename = OS.Path.join(path, filename);
+  filename = PathUtils.isAbsolute(filename)
+    ? filename
+    : PathUtils.joinRelative(path, filename);
```

- devtools/client/shared/screenshot.js

## IOUtils.remove()

```diff
-  OS.File.remove(filePath);
+  IOUtils.remove(filePath);
```

- devtools/client/framework/test/browser_toolbox_screenshot_tool.js
- devtools/client/responsive/test/browser/browser_screenshot_button.js
- devtools/client/responsive/test/browser/browser_screenshot_button_warning.js
- devtools/client/shared/test/shared-head.js
- devtools/client/webconsole/test/browser/browser_console_screenshot.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_file.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_fixed_header.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_selector.js
- testing/talos/talos/tests/devtools/addon/content/tests/toolbox/screenshot.js

## PathUtils.toFileURI()

```diff
-  OS.Path.toFileURI(filePath);
+  PathUtils.toFileURI(filePath);
```

- devtools/client/framework/test/browser_toolbox_screenshot_tool.js
- devtools/client/responsive/test/browser/browser_screenshot_button.js
- devtools/client/shared/test/shared-head.js
- devtools/client/webconsole/test/browser/browser_console_screenshot.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_file.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_fixed_header.js
- devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_selector.js

## PathUtils.filename()

```diff
-  OS.Path.basename(path),
+  PathUtils.filename(path),
```

- devtools/client/memory/actions/io.js
- devtools/client/memory/utils.js
- devtools/client/styleeditor/StyleEditorUI.jsm
- devtools/client/styleeditor/StyleSheetEditor.jsm

## IOUtils.copy()

```diff
-  OS.File.copy(path, dest);
+  IOUtils.copy(path, dest);
```

- devtools/client/memory/actions/io.js

## IOUtils.stat()

```diff
-  OS.File.stat(filePath);
+  IOUtils.stat(filePath);
```

The objects that these `stat()` versions return differ from one another. This hasn't made much difference to the codebase but our changed usage is included here for completeness:

```diff
-      this._fileModDate = info.lastModificationDate.getTime();
+      this._fileModDate = info.lastModified;
```

- devtools/client/memory/test/browser/browser_memory_transferHeapSnapshot_e10s_01.js
- devtools/client/memory/test/xpcshell/head.js
- devtools/client/memory/test/xpcshell/test_action-export-snapshot.js
- devtools/client/styleeditor/StyleSheetEditor.jsm
- devtools/server/actors/heap-snapshot-file.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_01.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_02.js
- devtools/server/tests/xpcshell/test_MemoryActor_saveHeapSnapshot_03.js
- devtools/shared/heapsnapshot/HeapSnapshotFileUtils.js

## IOUtils.setPermissions

```diff
-  OS.File.setPermissions(filePath, { unixMode: 0o744 });
+  IOUtils.setPermissions(filePath, 0o744);
```

- devtools/client/shared/remote-debugging/adb/adb-binary.js

## IOUtils.makeDirectory

```diff
-  OS.File.makeDir(path);
+  IOUtils.makeDirectory(path);
```

- devtools/client/shared/remote-debugging/adb/adb-binary.js

## IOUtils.exists

```diff
-  OS.File.exists(path);
+  IOUtils.exists(path);
```

- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/client/shared/screenshot.js
- devtools/client/webconsole/test/browser/browser_jsterm_file_load_save_keyboard_shortcut.js
- devtools/client/webconsole/test/browser/browser_webconsole_context_menu_export_console_output.js

## PathUtils.profileDir, PathUtils.localProfileDir and PathUtils.tempDir

```diff
-    const profileDir = OS.Constants.Path.profileDir;
+    const profileDir = PathUtils.profileDir;
```

We can reduce reliance on `Osfile.jsm` in another bug bug this is a small step in that direction.

- devtools/client/shared/remote-debugging/adb/adb-binary.js
- devtools/server/actors/storage.js
- devtools/shared/heapsnapshot/HeapSnapshotFileUtils.js

## IOUtils.getChildren(storagePath)

`IOUtils` does not have a direct equivalent of `OS.File.DirectoryIterator()` so we need to iterate more explicitely using `IOUtils.getChildren()`.

```diff
- async findStorageTypePaths(storagePath) {
-   const iterator = new OS.File.DirectoryIterator(storagePath);
-   const typePaths = [];
-
-   await iterator.forEach(entry => {
-     if (entry.isDir) {
-       typePaths.push(entry.path);
-     }
-   });
-
-   iterator.close();
-   return typePaths;
- }

+ async findStorageTypePaths(storagePath) {
+   const children = await IOUtils.getChildren(storagePath);
+   const typePaths = [];
+
+   for (const path of children) {
+     const exists = await IOUtils.exists(path);
+     if (!exists) {
+       continue;
+     }
+
+     const stats = await IOUtils.stat(path);
+     if (stats.type === "directory") {
+       typePaths.push(path);
+     }
+   }
+
+   return typePaths;
+ }

```

- devtools/server/actors/storage.js

## Misc

Made `IOUtils` and `PathUtils` available to DevTools modules.

```diff
   HeapSnapshot,
+  IOUtils,
   L10nRegistry,
   Localization,
   NamedNodeMap,
   NodeFilter,
+  PathUtils,
   StructuredCloneHolder,
   TelemetryStopwatch,
```

- devtools/shared/loader/builtin-modules.js

Differential Revision: https://phabricator.services.mozilla.com/D147589
2022-06-02 21:13:56 +00:00
Alexandre Poirot 782ca9d04e Bug 1770527 - [devtools] Fix and ensure that browser toolbox close when closing Firefox. r=jdescottes
Either of the two changes fixes the reported issue.

On the frontend side, we weren't listening to DevToolsClient/connection close.
So that there was no guarantee that the Browser Toolbox would close if the remote connection is lost.
We were actually depending on Launcher.close to be called (it is called correctly)
and complete `dbgProcess.kill()`, which apparently doesn't always work during shutdown.

It looks like `SubProcess.kill` was made slower and didn't always had time to complete
because on the server side, the Parent Process Target actor was trying
to switch from browser.xhtml to chrome://extensions/content/dummy.xhtml.
But this document is being destroyed and the target as well as all children
actors and watchers were still trying to debug stuff and were all throwing.

Correctly destroying the parent process target actor when browser.xhtml is closed
seems to allow SubProcess.kill to complete...
And thanks to client's closed listener, even if we stop killing the process,
the browser toolbox process will close by itself.

Differential Revision: https://phabricator.services.mozilla.com/D148128
2022-06-02 20:26:43 +00:00
Iulian Moraru 43e6873145 Backed out 4 changesets (bug 1764348, bug 1771277) for causing multiple dt failures. CLOSED TREE
Backed out changeset 21c03813c9d0 (bug 1771277)
Backed out changeset 0ee89f81d7da (bug 1764348)
Backed out changeset 47658c248d9e (bug 1764348)
Backed out changeset 712947c3a514 (bug 1764348)
2022-06-02 23:13:28 +03:00
Michael Ratcliffe 8b939608d8 Bug 1771675 - Eliminate jest/expect-expect eslint warning in devTools code r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D147590
2022-06-02 14:38:57 +00:00
Hubert Boma Manilla f1cdd9a344 Bug 1771277 - [devtools] Remove the websocket and server sent events prefs r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D147413
2022-06-02 14:35:25 +00:00
Hubert Boma Manilla 61afb77264 Bug 1764348 - Pause / Resume should toggle listening to network resources r=ochameau
With this patch Pause and Resume, now stop and start listening to network requests

Differential Revision: https://phabricator.services.mozilla.com/D146445
2022-06-02 14:35:24 +00:00
Hubert Boma Manilla 4cf961c731 Bug 1764348 - Enable browser console / browser toolbox console users turn on network monitoring manually r=nchevobbe
Highlights
- Network monitoring is turned off by default in browser console/ browser toolbox console on initial load.
- A new "Enable Network Monitoring" setting is added to enable users toggle on an off as they desire.
- The user setting is persisted across toolbox reopens.

Differential Revision: https://phabricator.services.mozilla.com/D145234
2022-06-02 14:35:24 +00:00
Hubert Boma Manilla cd2e5e5def Bug 1764348 - Cleanup hidePersistLogsCheckbox and hideShowContentMessagesCheckbox property r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D145550
2022-06-02 14:35:24 +00:00
Alexandre Poirot 2c2ef59588 Bug 1771088 - [devtools] Ensure instantiating only one Loader when debugging the system principal. r=jdescottes
We were instantiating one new Loader per DevToolsFrameChild instance.
This patch tries to share this loader with all the instances as well as share it
with the one used to load DevToolsServer when we are running in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D147257
2022-06-01 14:38:36 +00:00
Gabriele Svelto fd3fc54c5d Bug 1771875 - Add BrowserTestUtils.reloadTab() and use it everywhere r=mconley,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D147732
2022-06-01 09:34:05 +00:00
Andreea Pavel 2f656a0bc7 Bug 1767702 - disable browser_dbg-features-source-tree.js on win10_2004 r=intermittent-reviewers,gbrown DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D147455
2022-05-30 17:58:02 +00:00
Tooru Fujisawa 288f7cc11f Bug 1610653 - Part 23: Stop using global this to define variable in devtools/. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D146556
2022-05-30 15:19:43 +00:00
Alexandre Poirot 9d20fea826 Bug 1764179 - [devtools] Ensure that TargetFront is fully initialized when processing resources sent via the Watcher. r=jdescottes
When resources related to a given Target are notified via the Watcher actor,
we have to ensure waiting for the TargetFront to be fully initialized.
That's because code watching for resources expect the target front to be attached
and have its thread front already available.

Differential Revision: https://phabricator.services.mozilla.com/D143408
2022-05-30 11:07:22 +00:00
Michael Ratcliffe 39a7b6d134 Bug 1771387 - Fix DevTools eslint react/prop-types errors batch 4 r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D147467
2022-05-27 16:17:28 +00:00
Michael Ratcliffe c2c0851427 Bug 1771210 - Fix DevTools eslint react/prop-types errors batch 3 r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D147358
2022-05-27 16:16:11 +00:00
Nicolas Chevobbe 61de9e873b Bug 1770572 - [devtools] Fix browser_webconsole_location_styleeditor_link.js intermittent failure. r=jdescottes.
Wait for the cursor to be set.
We take this opportunity to inline the functions that were only called once,
as well as refactor a few things to make the test easier to read.

Differential Revision: https://phabricator.services.mozilla.com/D147259
2022-05-27 05:51:07 +00:00
colin_czb b32bbdb0ff Bug 1354054 - [devtools] Network panel could display request priority r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D144524
2022-05-26 11:40:27 +00:00
Hubert Boma Manilla 4e71c54c7c Bug 1770204 - [devtools] Simplify breakpoint list selectors r=nchevobbe
The selector is already sorting the breakpoints,
so there is no need to re-sort them in the component.

Also Array.sort(stringA-stringB) was misbehaving.

Then I'm using getSourcesMap in order to avoid calling getBreakpointList many times.
Otherwise getSourcesForBreakpoints has to receive the state object
in order to retrieve the source objects.

Differential Revision: https://phabricator.services.mozilla.com/D146426
2022-05-26 01:51:41 +00:00
Alexandre Poirot 0ef5894a15 Bug 1770961 - [devtools] Fix breakableLines selectors to be correctly memoized. r=bomsy
breakableLines wasn't correctly memoized for sources other than the original ones.
This patch at least fix this for regular JS files sources, but the issue still
happens for HTML sources having more than one source actor.

Differential Revision: https://phabricator.services.mozilla.com/D147195
2022-05-25 18:34:18 +00:00
Alexandre Poirot 215ceb2657 Bug 1770959 - [devtools] Use standard URL constructor instead of whatwg-url module. r=nchevobbe
And remove this module which is no longer used.

Differential Revision: https://phabricator.services.mozilla.com/D147194
2022-05-25 16:56:44 +00:00
Michael Ratcliffe 301e954586 Bug 1770257 - Fix DevTools eslint react/prop-types errors batch 1 r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147017
2022-05-25 11:53:29 +00:00
Michael Ratcliffe e32688c098 Bug 1770941 - Fix DevTools eslint react/prop-types errors batch 2 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147184
2022-05-25 09:35:03 +00:00
Tooru Fujisawa d132ced6f5 Bug 1770926 - Reset mixed content protection state after the test in browser_webconsole_block_mixedcontent_securityerrors.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147207
2022-05-25 06:00:33 +00:00
Alexandre Poirot 075deaa670 Bug 1770205 - [devtools] Flag SOURCE resources for inline sources and flag debugger frontend sources for HTML sources. r=nchevobbe
In the frontend we end up having special sources, related to many source actors.
These are the sources for HTML pages, which have one unique source object.
But each inline <script> tag will have its own source actor.
All these sources actors will be bound to this unique source for the HTML page.

Differential Revision: https://phabricator.services.mozilla.com/D144412
2022-05-24 16:07:09 +00:00
Tooru Fujisawa 9e419509c8 Bug 1770956 - Fix comment for findMessagePartByType. r=nchevobbe DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D147193
2022-05-24 15:31:51 +00:00
Julian Descottes 0f4eade0f1 Bug 1770882 - [devtools] Add a tooltip to the throttling menu button to show profile details r=nchevobbe,flod
The characteristics of the throttling profile are not really accessible anywhere.
At least having them in the button title can help.

I started reorganizing throttling profiles as instances of a ThrottlingProfile base class, because
that should be useful when we implement custom profiles

Differential Revision: https://phabricator.services.mozilla.com/D147131
2022-05-24 13:10:01 +00:00
Cosmin Sabou 9b3b068007 Backed out 2 changesets (bug 1770204, bug 1770205) for devtools faolires on browser_dbg-html-breakpoints.js. CLOSED TREE
Backed out changeset ad44d2e50491 (bug 1770205)
Backed out changeset a1459819402b (bug 1770204)
2022-05-24 14:22:55 +03:00
Alexandre Poirot 16b34baf43 Bug 1770205 - [devtools] Flag SOURCE resources for inline sources and flag debugger frontend sources for HTML sources. r=nchevobbe
In the frontend we end up having special sources, related to many source actors.
These are the sources for HTML pages, which have one unique source object.
But each inline <script> tag will have its own source actor.
All these sources actors will be bound to this unique source for the HTML page.

Differential Revision: https://phabricator.services.mozilla.com/D144412
2022-05-24 10:31:25 +00:00
Hubert Boma Manilla 118d06dbf1 Bug 1770204 - [devtools] Simplify breakpoint list selectors r=nchevobbe
The selector is already sorting the breakpoints,
so there is no need to re-sort them in the component.

Also Array.sort(stringA-stringB) was misbehaving.

Then I'm using getSourcesMap in order to avoid calling getBreakpointList many times.
Otherwise getSourcesForBreakpoints has to receive the state object
in order to retrieve the source objects.

Differential Revision: https://phabricator.services.mozilla.com/D146426
2022-05-24 10:31:25 +00:00
Tooru Fujisawa 8dfedc9ddb Bug 1764717 - Part 27: Convert remaining findMessageVirtualized to findMessageVirtualizedById. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147047
2022-05-24 10:06:08 +00:00
Tooru Fujisawa d41ab8c282 Bug 1764717 - Part 26: Remove waitForMessage and waitForMessages. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147046
2022-05-24 10:06:08 +00:00
Tooru Fujisawa 6c60f75a7c Bug 1764717 - Part 25: Change keyboardExecuteAndWaitForMessage to keyboardExecuteAndWaitForMessageByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147045
2022-05-24 10:06:07 +00:00
Tooru Fujisawa 8dd0b19d88 Bug 1764717 - Part 24: Remove executeAndWaitForMessage. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147044
2022-05-24 10:06:07 +00:00
Tooru Fujisawa 76e4652526 Bug 1764717 - Part 23: Use executeAndWaitForMessageByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147043
2022-05-24 10:06:06 +00:00
Tooru Fujisawa 4d0c94f0bd Bug 1764717 - Part 22: Add executeAndWaitForMessageByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147042
2022-05-24 10:06:06 +00:00
Tooru Fujisawa 1f49720f29 Bug 1764717 - Part 21: Use waitForMessageByType and waitForMessagesByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147041
2022-05-24 10:06:06 +00:00
Tooru Fujisawa 28e7c3072f Bug 1764717 - Part 20: Add waitForMessageByType and waitForMessagesByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147040
2022-05-24 10:06:05 +00:00
Tooru Fujisawa f4e0a88160 Bug 1764717 - Part 19: Use findMessageByType and findMessagesByType tests in other directories. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147039
2022-05-24 10:06:05 +00:00
Tooru Fujisawa 4330e3ea2a Bug 1764717 - Part 18: Use findMessagesVirtualizedByType in checkUniqueMessageExists. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147038
2022-05-24 10:06:04 +00:00
Tooru Fujisawa c0b4d71d4f Bug 1764717 - Part 17: Use findMessageVirtualizedByType and findMessagesVirtualizedByType in tests. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147037
2022-05-24 10:06:04 +00:00
Tooru Fujisawa 27de3cf43f Bug 1764717 - Part 16: Add findMessageVirtualizedByType and findMessagesVirtualizedByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147036
2022-05-24 10:06:04 +00:00
Tooru Fujisawa 73fa2223ee Bug 1764717 - Part 15: Remove findMessage and findMessages from devtools/client/webconsole/test/browser/head.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147035
2022-05-24 10:06:03 +00:00
Tooru Fujisawa 6b71ed8c44 Bug 1764717 - Part 14: Use findErrorMessage in checkMessageStack. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147034
2022-05-24 10:06:03 +00:00
Tooru Fujisawa d015a45575 Bug 1764717 - Part 13: Use findMessageByType in openMessageInNetmonitor. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147033
2022-05-24 10:06:03 +00:00
Tooru Fujisawa dca246be3f Bug 1764717 - Part 12: Use findMessageByType in testOpenInDebugger. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147032
2022-05-24 10:06:02 +00:00
Tooru Fujisawa 13a1b61667 Bug 1764717 - Part 11: Add waitForRepeatedMessageByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147031
2022-05-24 10:06:02 +00:00
Tooru Fujisawa a287d936ce Bug 1764717 - Part 10: Use findMessagePart(s)ByType in devtools/client/webconsole/test/browser/. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147030
2022-05-24 10:06:01 +00:00
Tooru Fujisawa 0192380a06 Bug 1764717 - Part 9: Define findMessagePartByType and findMessagePartsByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147029
2022-05-24 10:06:01 +00:00
Tooru Fujisawa 6e6f58927e Bug 1764717 - Part 8: Use findAllMessages in devtools/client/webconsole/test/browser/. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147028
2022-05-24 10:06:00 +00:00
Tooru Fujisawa 6bbce4386c Bug 1764717 - Part 7: Define findAllMessages. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147027
2022-05-24 10:06:00 +00:00
Tooru Fujisawa 40f9a2dd0b Bug 1764717 - Part 6: Use type-specific findMessage(s) in devtools/client/webconsole/test/browser/browser_webconsole_*. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147026
2022-05-24 10:05:59 +00:00
Tooru Fujisawa 9ef63471c0 Bug 1764717 - Part 5: Use type-specific findMessage(s) in devtools/client/webconsole/test/browser/browser_jsterm_*. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147025
2022-05-24 10:05:59 +00:00
Tooru Fujisawa 1a8bd8c676 Bug 1764717 - Part 4: Use type-specific findMessage(s) in devtools/client/webconsole/test/browser/browser_console_*. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147024
2022-05-24 10:05:59 +00:00
Tooru Fujisawa 0ca8c52ae8 Bug 1764717 - Part 3: Define type-specific wrappers for findMessageByType and findMessagesByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147023
2022-05-24 10:05:58 +00:00
Tooru Fujisawa bd694eb9e3 Bug 1764717 - Part 2: Define findMessageByType and findMessagesByType. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147022
2022-05-24 10:05:58 +00:00
Tooru Fujisawa fd93af6976 Bug 1764717 - Part 1: Add shared-head.js in devtools/client/webconsole/test/browser/_browser_console.ini. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D147021
2022-05-24 10:05:58 +00:00
Alexandre Poirot 0eb74c5c7f Bug 1770360 - [devtools] Remove the stylesheets of destroyed targets. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D146889
2022-05-23 20:09:33 +00:00
Tom Schuster 78d2f34bf1 Bug 1763367 - Filter out unexpected messages. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D146901
2022-05-23 13:51:58 +00:00
Cristian Tuns 828f93231b Backed out 2 changesets (bug 1763367) as requested by evilpie on element. CLOSED TREE
Backed out changeset 9b27117a24c8 (bug 1763367)
Backed out changeset cd28d8497f99 (bug 1763367)
2022-05-23 06:53:28 -04:00
Tom Schuster e88688c34c Bug 1763367 - Filter out unexpected messages. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D146901
2022-05-23 09:07:51 +00:00
Julian Descottes 228c49e017 Bug 1764148 - [devtools] Add deadzone to drag to update feature r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D146667
2022-05-23 09:03:15 +00:00
Alexandre Poirot b2f1ef9241 Bug 1770130 - [devtools] Get rid of WorkerDescriptorActor.attach. r=nchevobbe,devtools-backward-compat-reviewers
We can immediately "attach" the descriptor as it gets instantiated.
So that the frontend no longer need to call this before doing anything around the worker.

I also renamed the descriptor front method "attach" method,
in order to better highlight how special it is.
Hopefully we can drop this once the worker targets are created by the server.
i.e. when we enable service side worker targets for the browser toolbox,
which includes supporting service workers.

Differential Revision: https://phabricator.services.mozilla.com/D146787
2022-05-23 08:38:01 +00:00
Julian Descottes 2f70942796 Bug 1768161 - [devtools] Use localName instead of nodeName in inactive-property-helper.js r=nchevobbe
Depends on D146898
nodeName can include the namespace prefix eg html:img, failing some of our string comparisons

Differential Revision: https://phabricator.services.mozilla.com/D146899
2022-05-20 15:13:55 +00:00
Nicolas Chevobbe 165ce5b39e Bug 1770238 - [devtools] Remove global.MessageChannel in webconsole mocha tests to avoid hangs. r=jdescottes.
There's an issue in React 16 that only occurs when MessageChannel is available
which prevents the nodeJS process to exit.
MessageChannel support was added in Node 15, so when we try to update to Node 16,
it caused a problem in CI.

Differential Revision: https://phabricator.services.mozilla.com/D146906
2022-05-20 12:58:17 +00:00
Nicolas Chevobbe 285ff88a80 Bug 1769973 - [devtools] Localize Device headers in Settings modal. r=bomsy.
We already have translation strings in `device.properties`, so we can use them.
String for `custom` type was missing, so we add it.
Assertions are added in test to check that we do have the expected labels in the UI.

Differential Revision: https://phabricator.services.mozilla.com/D146784
2022-05-20 12:54:38 +00:00
Benjamin VanderSloot bd52a7aac3 Bug 1765309, part 2 - Convert requestStorageAccess to use new helper functions before async portion, r=anti-tracking-reviewers,timhuang
Two tests had to be changed.
The first test had to be changed because I removed redundant error message logging from requestStorageAccess and its network of helpers.
The second is because we were acting out-of-specification and stopping nested iframes from using the storage access API. I could have done this in a second bug, but I felt like doing it here made sense enough.

Depends on D146343

Differential Revision: https://phabricator.services.mozilla.com/D146344
2022-05-20 11:46:04 +00:00
Nicolas Chevobbe 2fde15757f Bug 1766602 - [devtools] Speedup jump to styleeditor from inspector. r=jdescottes.
In `viewSourceInStyleEditor`, we used to first load the styleeditor, and then
select the stylesheet and show the panel. This mean that when clicking on a location
from the rule view, there would be some delays before we show any feedback to the user.
Since the load promise for the panel only settles once we watched for all existing
stylesheets and loaded their content for each of them, it could take a while in
cases where we have lots of stylesheets, like in the BrowserToolbox.

So here we modify `viewSourceInStyleEditor` to directly select the styleeditor and
passing it a stylesheet that can be added right away, in case the panel wasn't
loaded yet, without waiting for the stylesheets to be watched.

We take this as an opportunity add a test when `viewSourceInStyleEditor` is called
with a stylesheet not used on the page, and check that it does open a view-source tab.

Differential Revision: https://phabricator.services.mozilla.com/D146540
2022-05-20 06:24:37 +00:00
Nicolas Chevobbe 1e61e4307b Bug 1770160 - [devtools] Don't filter out platform-specific errors in Browser Console/Browser Toolbox. r=ochameau.
This is as simple as checking the session context type.

Differential Revision: https://phabricator.services.mozilla.com/D146818
2022-05-20 05:47:23 +00:00
Emilio Cobos Álvarez 9bf4df31fd Bug 1769771 - Basic constructable stylesheets + devtools tests. r=nchevobbe
Just testing that the editor and the new label work as expected since
these are the things that I could find broken in my reduced examples.

Differential Revision: https://phabricator.services.mozilla.com/D146688
2022-05-19 22:32:29 +00:00
Emilio Cobos Álvarez 05a8fc5ff9 Bug 1769771 - Differentiate inline from constructed stylesheets in rule view. r=nchevobbe
I think this is worth it, but needs localization changes so splitting
it out.

Differential Revision: https://phabricator.services.mozilla.com/D146683
2022-05-19 22:32:28 +00:00
Hubert Boma Manilla 4d189564be Bug 1769572 - [devtools] The CONNECT method should no longer be sent on request resend r=nchevobbe
The CONNECT method sent on Edit & Resend of certain requests crashes firefox
based on https://bugzilla.mozilla.org/show_bug.cgi?id=1769572#c2, Necko uses CONNECT in a special way, so lets restrict
the devtools from selecting and sending it.

The crash happens with both the current and new edit and resend panels, so this patch
needs to be tested for both.

Use the devtools.netmonitor.features.newEditAndResend and set it to true to enable the new edit and resend panel.

Note: The new edit and resend panel is enabled by default in Nightly.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1769572#c0 for the STR for the current Edit and Resend panel
See https://bugzilla.mozilla.org/show_bug.cgi?id=1769572#c7 for the STR for the new Edit and Resend

Differential Revision: https://phabricator.services.mozilla.com/D146820
2022-05-19 18:26:43 +00:00
Doug Thayer ac86b09b87 Bug 1761554 - Use a Map-based cache for ResourceCommand r=ochameau
This just intends to alleviate the more noticeable problem when the cache grows
too large by avoiding iterating through the array every time something changes.
There still remains the work of limiting the size of this based on what the UI
is capped at, but that can come later.

Differential Revision: https://phabricator.services.mozilla.com/D142279
2022-05-19 16:39:14 +00:00
Alexandre Poirot fe91c0f518 Bug 1769795 - [devtools] Avoid updating empty lines too frequently in the debugger. r=bomsy
We were calling the costly disableEmptyLines very frequently, about once for each new incoming source or so.

Differential Revision: https://phabricator.services.mozilla.com/D146665
2022-05-19 16:30:17 +00:00
Nicolas Chevobbe 17d1efcc34 Bug 1764347 - [devtools] Add Browser Toolbox test for the Style Editor. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D146539
2022-05-19 05:24:55 +00:00
Michael Comella 396647cde1 Bug 1766516 - add about:profiling thread checkboxes for java. r=canaltinova,fluent-reviewers,flod
I tried to pick thread groups that are part of GeckoView (Gecko), might be
common to GeckoView products (Nimbus), and the Android ecosystem (Kotlin
coroutines) instead of threads that are fenix-specific.

Differential Revision: https://phabricator.services.mozilla.com/D144753
2022-05-18 17:24:39 +00:00
Hubert Boma Manilla ffb083dccd Bug 1766237 - [devtools] Get the WebExtensionPolicy from the ExtensionProcessScript global r=jdescottes,rpl,ochameau
The issue here is it seems like WebExtensionPolicy is not always available on the Cu global,
therefore failing when trying to get the extension policy name.
in this example when adding sources from the browser toolbox (i'm still not completely sure why)

The solution here is changing to using the ExtensionProcessScript which works for the web and browser
toolbox.
Also added a `console.warn` so we get some notification when this fails.

Differential Revision: https://phabricator.services.mozilla.com/D144787
2022-05-18 08:56:13 +00:00
Mark Banner 3924c8914b Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-18 08:13:19 +00:00
Mark Banner b0725e2037 Bug 1769569 - Disable reject-importGlobalProperties for sjs files via the ESLint rule. r=Gijs
Depends on D146450

Differential Revision: https://phabricator.services.mozilla.com/D146598
2022-05-18 08:13:18 +00:00
Mark Banner 3b0258336e Bug 1769569 - Enable ESLint rule no-define-cc-etc for devtools sjs files. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D146449
2022-05-18 08:13:18 +00:00
Sebastian Hengst c552340e0c Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Mark Banner 4acbb4ff59 Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-17 16:50:33 +00:00
Mark Banner 5b82552956 Bug 1769569 - Disable reject-importGlobalProperties for sjs files via the ESLint rule. r=Gijs
Depends on D146450

Differential Revision: https://phabricator.services.mozilla.com/D146598
2022-05-17 16:50:32 +00:00
Mark Banner 55789cb268 Bug 1769569 - Enable ESLint rule no-define-cc-etc for devtools sjs files. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D146449
2022-05-17 16:50:31 +00:00
Alexandre Poirot b798b2e643 Bug 1529621 - [devtools] Make all panel's destroy method be synchronous. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D146533
2022-05-17 16:45:13 +00:00
Nicolas Chevobbe 547c9df37d Bug 1767788 - [devtools] Fix browser_styleeditor_sv_keynav.js intermittent failure. r=jdescottes.
Wait for the proper editor-selected event.

Differential Revision: https://phabricator.services.mozilla.com/D146577
2022-05-17 15:21:50 +00:00
Julian Descottes 2c889a3c67 Bug 1769701 - [devtools] Use a blocking promise instead of an arbitrary delay in browser_inspector_inspect_loading_document.js r=nchevobbe
Depends on D146464

Differential Revision: https://phabricator.services.mozilla.com/D146544
2022-05-17 11:46:36 +00:00
Hubert Boma Manilla 9743602245 Bug 1765817 - [devtools] Add getLocationSource selector to fetch source for a location r=nchevobbe
This cleanup helps support the subsequent work for breakpoints per url.

Depends on D146426

Differential Revision: https://phabricator.services.mozilla.com/D146427
2022-05-17 11:10:21 +00:00
Julian Descottes e91cbfb2f4 Bug 1767759 - [devtools] Wait for toolbox-ready in browser_about-devtools-toolbox_reload.js r=devtools-reviewers,nchevobbe
The test was only waiting for addTab to resolve, waiting for the proper toolbox-ready event could reduce intermittent issues.

Differential Revision: https://phabricator.services.mozilla.com/D146530
2022-05-17 07:01:10 +00:00
Julian Descottes e4e4e73bb9 Bug 1768475 - [devtools] WalkerActor watchRootNode should not check isDocumentReady r=devtools-reviewers,nchevobbe
If the walker actor was initialized, we assume the document is ready enough and a root node can be returned if available.

A new test was added for a slow loading document.

Differential Revision: https://phabricator.services.mozilla.com/D146464
2022-05-17 06:04:47 +00:00
Tooru Fujisawa 11c6b37c5f Bug 1765319 - Part 2: Do not use global this in symbolication.jsm.js. r=canaltinova
This `global` variable is used for accessing Error prototypes, and they're
properties of the shared global (`globalThis`), not per-JSM global (`this`).

Differential Revision: https://phabricator.services.mozilla.com/D144131
2022-05-13 20:12:26 +00:00
Luke Swiderski 60d6bfde93 Bug 1695896 - Add/edit log on breakpoint in sidebar scroll line into view. r=bomsy
This patch scrolls the editor to the log input when adding or editing a log
from the breakpoint context menu.

Differential Revision: https://phabricator.services.mozilla.com/D146202
2022-05-13 16:22:01 +00:00
Hubert Boma Manilla 8418e968f1 Bug 1755197 - [devtools] Remove breakpoint shifting on breakpoint syncing r=ochameau
This patch focuses on removing breakpoint shifting which is mostly used in
non-sourcemapping scenarios.

Differential Revision: https://phabricator.services.mozilla.com/D138625
2022-05-13 03:35:18 +00:00
Hubert Boma Manilla c7c3e45ec6 Bug 1767188 - [devtools] Make sure the source is in redux before selecting during a pause r=nchevobbe
This tries to fix a race issue where, on reload, the pause event fires way before the
related source is available. This is an issue the had the potential on happening at some point.
This fix is not super perfect but with the trottling of sources there is no guurantee that sources will
always be available before pause event fires.
This pattern is also used for source actors. waitForSourceActorToBeRegisteredInStore.

Differential Revision: https://phabricator.services.mozilla.com/D145925
2022-05-11 05:45:58 +00:00
Cristian Tuns 23517e3d2b Backed out 3 changesets (bug 1758745, bug 1758740, bug 1762462) for causing mochitest failures on test_storagePermissionsAccept.html CLOSED TREE
Backed out changeset fa222c0a9a26 (bug 1762462)
Backed out changeset 9daa04b239f9 (bug 1758745)
Backed out changeset c18aecb431c0 (bug 1758740)
2022-05-10 20:12:45 -04:00
Benjamin VanderSloot 7560dc381a Bug 1762462 - Tests do not reflect Always Partitioning Storage, r=twisniewski
Depends on D143627

Differential Revision: https://phabricator.services.mozilla.com/D144731
2022-05-10 21:49:42 +00:00
Mark Banner 6da9b0cbbf Bug 1766533 - Fix devtools HSplitBox for ESLint rule no-constant-binary-expression. r=nchevobbe
Depends on D145653

Differential Revision: https://phabricator.services.mozilla.com/D145654
2022-05-10 20:04:03 +00:00
Nicolas Chevobbe 088b5c3f34 Bug 1688231 - [devtools] Remove backward command for :block command. r=bomsy.
The command requires having network resource command support,
which is still not enabled everywhere (e.g. non-multiprocess browser toolbox).
We simply remove the backward compat comment but leave the check on network
resource command support.

Differential Revision: https://phabricator.services.mozilla.com/D145890
2022-05-10 11:48:45 +00:00
Nicolas Chevobbe 4363c73f4a Bug 1688231 - [devtools] Delete noPauseOnThreadActorAttach trait. r=bomsy.
This was used for pre-86 servers, and we can now assume that all servers
threads don't pause on attach.

Differential Revision: https://phabricator.services.mozilla.com/D145888
2022-05-10 11:48:45 +00:00
Nicolas Chevobbe e7198c20ea Bug 1688231 - [devtools] Remove unnecessary StyleSheetEditor#_isUpdating. r=bomsy.
This was used for pre-86 servers, so we can remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D145884
2022-05-10 11:48:44 +00:00
Nicolas Chevobbe 82b8cee903 Bug 1651428 - [devtools] Group context selector frame targets by their PIDs in Browser Toolbox console. r=Honza.
Depends on D145880

Differential Revision: https://phabricator.services.mozilla.com/D145942
2022-05-10 11:40:21 +00:00
Nicolas Chevobbe 2186a61def Bug 1768461 - [devtools] Fix content process and worker frame icons in context selector. r=Honza.
Adding the proper attribute on the SVG files is enough.

Differential Revision: https://phabricator.services.mozilla.com/D145880
2022-05-10 11:40:20 +00:00
Nicolas Chevobbe 03d2974d89 Bug 1768150 - [devtools] Turn StyleEditorUI methods private. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D145856
2022-05-10 09:17:50 +00:00
Nicolas Chevobbe bb8c2ad43f Bug 1768150 - [devtools] Turn StyleEditorUI properties into private fields. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D145855
2022-05-10 09:17:49 +00:00
Nicolas Chevobbe 8784696806 Bug 1768150 - [devtools] Don't use ui._* properties from styleeditor tests. r=bomsy.
This is some prep work to make those loosely private properties
actually be private fields.

Differential Revision: https://phabricator.services.mozilla.com/D145854
2022-05-10 09:17:49 +00:00
Nicolas Chevobbe 968874d5ce Bug 1767970 - [devtools] Merge SplitView into StyleEditorUI. r=jdescottes.
This allows to simplify what was done in SplitView and have
direct calls to functions instead of registering callbacks.

Differential Revision: https://phabricator.services.mozilla.com/D145607
2022-05-09 09:09:57 +00:00
Nicolas Chevobbe bf6abde59f Bug 1767970 - [devtools] Turn StyleEditorUI into a class. r=jdescottes.
This is some prep work for the next patch in the stack.

Differential Revision: https://phabricator.services.mozilla.com/D145606
2022-05-09 09:09:56 +00:00
Cosmin Sabou 57c5a2f155 Backed out changeset 3cdc612207bf (bug 1767070) for not having a real failure rate to be disabled. 2022-05-09 09:18:23 +03:00
Norisz Fay b938eef69c Bug 1767070 - disable uncompressed-sourcemaps.js for frequent failures. r=intermittent-reviewers,MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D145836
2022-05-08 20:01:10 +00:00
Nicolas Chevobbe 2dae975b96 Bug 1668219 - [devtools] Remove prefs used in old perf panel. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D145536
2022-05-06 17:16:30 +00:00
Nicolas Chevobbe 290ab0bcb4 Bug 1668219 - [devtools] Remove unused devtools/client/shared/options-view.js. r=bomsy.
It was only used in the old perf panel.

Differential Revision: https://phabricator.services.mozilla.com/D145535
2022-05-06 17:16:30 +00:00
Nicolas Chevobbe 55d79ae066 Bug 1668219 - [devtools] Remove unused devtools/client/shared/demangle.js. r=bomsy.
It was only used in the old perf panel.

Differential Revision: https://phabricator.services.mozilla.com/D145534
2022-05-06 17:16:30 +00:00
Nicolas Chevobbe 000b84abfd Bug 1668219 - [devtools] Remove now unused devtools/shared/performance folder. r=julienw.
Differential Revision: https://phabricator.services.mozilla.com/D145466
2022-05-06 17:16:29 +00:00
Nicolas Chevobbe 073b56709e Bug 1668219 - [devtools] Remove now unused performance-recording actor and front. r=julienw,devtools-backward-compat-reviewers.
Remove files that were only used by this actor as well.

Differential Revision: https://phabricator.services.mozilla.com/D145464
2022-05-06 17:16:29 +00:00
Nicolas Chevobbe eab2a86cbe Bug 1668219 - [devtools] Remove now unused performance actor and front. r=julienw,devtools-backward-compat-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D145463
2022-05-06 17:16:28 +00:00
Nicolas Chevobbe b5a99726eb Bug 1668219 - [devtools] Remove widgets only used on old perf panel. r=bomsy.
This removes FlameGraph.js, Graphs.js, GraphsWorker.js, LineGraphWidget.js, MountainGraphWidget.js
and their related tests.
DevToolsWorker tests that were relying on GraphsWorker.js are updated to use a test-specific blob worker.

Differential Revision: https://phabricator.services.mozilla.com/D145462
2022-05-06 17:16:27 +00:00
Nicolas Chevobbe 30db855c84 Bug 1668219 - [devtools] Remove devtools/client/performance. r=julienw.
Differential Revision: https://phabricator.services.mozilla.com/D145461
2022-05-06 17:16:27 +00:00
Nicolas Chevobbe e1f5f32c3a Bug 1668219 - [devtools] Remove isNewPerfPanelEnabled target configuration. r=bomsy,devtools-backward-compat-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D145460
2022-05-06 17:16:26 +00:00
Nicolas Chevobbe faee16015f Bug 1668219 - [devtools] Remove devtools.performance.new-panel-enabled preference. r=julienw.
Remove occurences of the pref (except in devtools/client/performance, which
will be removed further in the stack).

Differential Revision: https://phabricator.services.mozilla.com/D145459
2022-05-06 17:16:26 +00:00
Nicolas Chevobbe f7ae125a11 Bug 1668219 - [devtools] Remove new perf panel setting in DevTools Settings panel. r=julienw.
Differential Revision: https://phabricator.services.mozilla.com/D145458
2022-05-06 17:16:26 +00:00
Greg Tatum c8a4b709d5 Bug 1767537 - Update pseudolocalization docs; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D145374
2022-05-05 16:25:32 +00:00
Nicolas Chevobbe ab57d9eaba Bug 1576907 - [devtools] Don't add expressions from private window console in history. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D145200
2022-05-04 12:27:05 +00:00
Nicolas Chevobbe fea6e021bf Bug 1766975 - [devtools] Add keyboard shortcut to focus StyleEditor filter input. r=jdescottes.
We using Ctrl|Cmd+P as Ctrl|Cmd+F is used for a in-file search in
the CodeMirror instance.
We're tesing the keyboard shortcut in browser_style_editor_filter.js
by using it instead of manually calling input.focus and clearing it
programatically.

Differential Revision: https://phabricator.services.mozilla.com/D145057
2022-05-04 06:01:31 +00:00
Nicolas Chevobbe 0f4a927bab Bug 1766603 - [devtools] Lazy load modules in StyleEditor. r=bomsy.
Those modules are only needed on specific user actions, so we might save a few
cycles not loading them upfront.

Differential Revision: https://phabricator.services.mozilla.com/D144796
2022-05-04 06:01:31 +00:00
Nicolas Chevobbe 267bff5ff9 Bug 1766811 - [devtools] Remove StyleEditor list item animation. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D144930
2022-05-04 06:01:31 +00:00
Nicolas Chevobbe c02657bc0c Bug 1470781 - [devtools] Make check in browser_styleeditor_private_perwindowpb.js more specific. r=jdescottes.
For some reason, the new test added in the previous patch has an impact on this test:
when checking the disk cache, there's a `mochi.test:8888/tests.json` entry, and
since the test was only checking if there was an entry with the `mochi.test:8888` entry,
it was failing.
I wasn't able to understand why we have this entry in the cache, but it reveals
that the test check is a bit too broad, since what we cares about is simply to
know if the fetched stylesheet was added in the disk cache.
So here we're doing just that, checking that the fetched stylesheet wasn't added
to the disk cache.

Depends on D144723

Differential Revision: https://phabricator.services.mozilla.com/D145344
2022-05-04 06:01:30 +00:00
Nicolas Chevobbe 677b15d13b Bug 1470781 - [devtools] Add filter input for stylesheets list. r=jdescottes,fluent-reviewers.
The patch adds a filter input in the xhtml file, which will filter the list
of stylesheets displayed on the left side, based on the stylesheet name.
If the active stylesheet is filtered-out, the first visible one gets selected.
If all the stylesheet are filtered-out, a label is displayed indicating that
the search doesn't match any stylesheet.

The splitview CSS already had rules for this behaviour, so we're reusing what's
already there, re-adding the placeholder for the "all filtered" message.

This had an impact on keyboard navigation; the list is sorted by `ordinal` property,
which drives a `MozBoxOrdinalGroup` style property (similar to `order` on a flex item).
The navigation used to simply get the active ordinal, and move to the next one.
Now, the "next" ordinal could be hidden, so we change the behavior to move the focus
to the next (or previous), visible item in the list.

A test is added to check that everything works as intended.

Differential Revision: https://phabricator.services.mozilla.com/D144723
2022-05-04 06:01:30 +00:00
Doug Thayer 04d1c8fd1e Bug 1756823 - Replace ConsoleAPIStorage observer calls with js array r=nchevobbe,webdriver-reviewers,geckoview-reviewers,agi,jdescottes
See the comment in the file explaining it. For a case of logging 100k numbers,
this dropped the time per number from 15 microseconds to 9 with the console
closed, and 55 microseconds to 38 with the console open. I think we could shave
off more with a native approach, but I don't know that it's worth it and it's
much more likely for that to introduce bugs.

Differential Revision: https://phabricator.services.mozilla.com/D143782
2022-05-03 17:21:59 +00:00
Tooru Fujisawa 8c9eb71d74 Bug 1765167 - Part 2: Stop using Cu.import in devtools/. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D144095
2022-05-03 06:32:29 +00:00
Tooru Fujisawa 8412ce7da9 Bug 1766984 - Do not remove 3rd and remaining parameters when falling back to log from console.table. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D145138
2022-05-02 11:45:18 +00:00
Feng Yu 2b6e661c17 Bug 1554887 - [devtools] Remove eslint-disable complexity in devtools/client/shared/components/Frame.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D144802
2022-05-02 11:42:03 +00:00
criss 31c0885034 Backed out 3 changesets (bug 1766603, bug 1470781, bug 1766811) for causing devtools failures. CLOSED TREE
Backed out changeset 9a28a5613dbd (bug 1766811)
Backed out changeset d1fd983ac8ae (bug 1766603)
Backed out changeset f52a98377722 (bug 1470781)
2022-05-02 09:44:15 +03:00
Nicolas Chevobbe 2034ad0073 Bug 1766811 - [devtools] Remove StyleEditor list item animation. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D144930
2022-05-02 05:44:20 +00:00
Nicolas Chevobbe 5f5ea908d8 Bug 1766603 - [devtools] Lazy load modules in StyleEditor. r=bomsy.
Those modules are only needed on specific user actions, so we might save a few
cycles not loading them upfront.

Differential Revision: https://phabricator.services.mozilla.com/D144796
2022-05-02 05:44:20 +00:00
Nicolas Chevobbe ca25b31905 Bug 1470781 - [devtools] Add filter input for stylesheets list. r=jdescottes,fluent-reviewers.
The patch adds a filter input in the xhtml file, which will filter the list
of stylesheets displayed on the left side, based on the stylesheet name.
If the active stylesheet is filtered-out, the first visible one gets selected.
If all the stylesheet are filtered-out, a label is displayed indicating that
the search doesn't match any stylesheet.

The splitview CSS already had rules for this behaviour, so we're reusing what's
already there, re-adding the placeholder for the "all filtered" message.

This had an impact on keyboard navigation; the list is sorted by `ordinal` property,
which drives a `MozBoxOrdinalGroup` style property (similar to `order` on a flex item).
The navigation used to simply get the active ordinal, and move to the next one.
Now, the "next" ordinal could be hidden, so we change the behavior to move the focus
to the next (or previous), visible item in the list.

A test is added to check that everything works as intended.

Differential Revision: https://phabricator.services.mozilla.com/D144723
2022-05-02 05:44:19 +00:00
Nicolas Chevobbe 8be10dc59d Bug 1766630 - [devtools] Update MDN compat data (2022 April). r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D144810
2022-04-29 14:50:56 +00:00
Hubert Boma Manilla e8139922ea Bug 1762865 - [devtools] Add assertion for server breakpoints in breakpoints tests r=ochameau
This patch also adds assertions for breakpoints on the server to the
breakpoints reload tests. This also asserts that the breakpoint is not removed
on the server when related source no longer exists after a reload

Differential Revision: https://phabricator.services.mozilla.com/D142545
2022-04-29 14:23:51 +00:00
Hubert Boma Manilla 04c36fa3a5 Bug 1764055 - [devtools] Add tests for breakpoints in original source whose generated source content changes on reload r=ochameau
Updating the bug id

Differential Revision: https://phabricator.services.mozilla.com/D142047
2022-04-29 14:23:51 +00:00
Sebastian Zartner 6da32bdae4 Bug 1746824 - Added JsonML Rep. r=nchevobbe,devtools-backward-compat-reviewers
This Rep hooks into the default display of objects and outputs a JsonML (http://www.jsonml.org) representation of them if custom formatters are enabled and a custom formatter is defined for them.
It handles headers and bodies of custom formatters. Bodies are handled asynchronously from their corresponding headers.

Because custom formatters allow a website to provide CSS styles to be used for formatting an object within the DevTools, those styles are filtered first to avoid breaking their layout.

It is currently only applied to the output of the Webconsole and within the variable value popup and the watch expressions within the Debugger.

***

Differential Revision: https://phabricator.services.mozilla.com/D140119
2022-04-28 18:50:30 +00:00
Claudia a3d1bcf6f5 Bug 1766013 - [devtools] Rewrite old test for the currently panel to the New Request Panel. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D144441
2022-04-27 14:57:03 +00:00
Tooru Fujisawa 33be927b2a Bug 1766099 - Part 2: Explicitly specify import or imported symbol for importScripts in devtools/. r=Standard8
Depends on D144671

Differential Revision: https://phabricator.services.mozilla.com/D144672
2022-04-27 11:40:40 +00:00
Julian Descottes 83a6b29109 Bug 1764077 - [devtools] Add an option to disable 'drag to update' feature in Rule View r=nchevobbe,fluent-reviewers,flod
We should have a way to disable the feature. The RuleView will dynamically update whenever the preference is flipped

Differential Revision: https://phabricator.services.mozilla.com/D144727
2022-04-27 08:38:31 +00:00
Nicolas Chevobbe 0c3ab8a968 Bug 1766390 - [devtools] Remove StyleEditorUtil wire. r=bomsy.
It's only used to set event listeners, so we replace
all usages with direct calls to addEventListener instead.

Differential Revision: https://phabricator.services.mozilla.com/D144686
2022-04-26 16:13:20 +00:00
Andreea Pavel 29fe73260b Bug 1756616 - disable browser_browser_toolbox_debugger.js on linux64 debug r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D144703
2022-04-26 13:57:38 +00:00
Feng Yu 3227feb29a Bug 1554867: Simplify devtools/client/debugger/src/workers/parser/getSymbols.js and remove eslint-disable complexity r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D144506
2022-04-26 12:45:45 +00:00
Julian Descottes a3214e22a3 Bug 1765760 - [devtools] Do not wait indefinitely for DOMContentLoaded in inspector actor getWalker r=devtools-reviewers,nchevobbe
Fixes the issue by waiting only 500ms max for the event

Differential Revision: https://phabricator.services.mozilla.com/D144335
2022-04-26 06:31:09 +00:00
Raphael Ferrand f69ce054c6 Bug 1654731 - [devtools] Preview class when selecting item in the cls autocomplete popup r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D132261
2022-04-25 22:28:35 +00:00
Marian-Vasile Laza 3e77d599b0 Backed out 2 changesets (bug 1762865, bug 1764055) for causing devtools failures on browser_dbg-features-breakable-lines.js. CLOSED TREE
Backed out changeset 87cb99924fc4 (bug 1762865)
Backed out changeset 83c8bb7087f5 (bug 1764055)
2022-04-25 15:44:02 +03:00
Hubert Boma Manilla 7f6df7ea8a Bug 1762865 - [devtools] Add assertion for server breakpoints in breakpoints tests r=ochameau
This patch also adds assertions for breakpoints on the server to the
breakpoints reload tests. This also asserts that the breakpoint is not removed
on the server when related source no longer exists after a reload

Differential Revision: https://phabricator.services.mozilla.com/D142545
2022-04-25 11:46:23 +00:00
Hubert Boma Manilla 2e950ad6d7 Bug 1764055 - [devtools] Add tests for breakpoints in original source whose generated source content changes on reload r=ochameau
Updating the bug id

Differential Revision: https://phabricator.services.mozilla.com/D142047
2022-04-25 11:46:22 +00:00
Nicolas Chevobbe 9076b5fa2f Bug 1765748 - [devtools] Remove unncessary complex SplitView#setItemClassName. r=jdescottes.
The function was setting extra classes on both
the summary and the detail, running extra checks
to not remove the base classes.
It's only called from one place, and we only care
about adding classes to the summary element, which
we have access to directly.
We're switching to classList.(add|remove) , which
allows us to get rid of the SplitView method.

Differential Revision: https://phabricator.services.mozilla.com/D144427
2022-04-22 13:56:02 +00:00
Nicolas Chevobbe 8578d2224f Bug 1765748 - [devtools] Remove SplitView active summary getter and rename setter. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D144302
2022-04-22 13:56:01 +00:00
Nicolas Chevobbe d24de6a1bc Bug 1765748 - [devtools] Merge SplitView appendTemplateItem and appendItem. r=ochameau.
The template nodes are retrieved and cached from the constructor so we don't have
to do it for every item we add.

Differential Revision: https://phabricator.services.mozilla.com/D144269
2022-04-22 13:56:01 +00:00
Nicolas Chevobbe 947e5c6c8f Bug 1765748 - [devtools] Simplify SplitView#appendItem onShow option. r=ochameau.
Only the detail element was needed in the callback, so we remove all the other
unnecessary parameters.
This allows us to also remove the `data` option.

Differential Revision: https://phabricator.services.mozilla.com/D144268
2022-04-22 13:56:01 +00:00
Nicolas Chevobbe 6a68e17557 Bug 1765748 - [devtools] Remove SplitView#appendItem onCreate option. r=ochameau.
Since there's nothing asynchronous happening before the item gets added to the
list, the consumer can directly use the properties of the object returned by
'appendTemplatedItem'.

Differential Revision: https://phabricator.services.mozilla.com/D144267
2022-04-22 13:56:00 +00:00
Nicolas Chevobbe 703a40f1c8 Bug 1765748 - [devtools] Remove unused SplitView#appendItem options. r=ochameau.
`onHide` and `onDestroy` aren't declared from the callsite, we can remove them.

Differential Revision: https://phabricator.services.mozilla.com/D144266
2022-04-22 13:56:00 +00:00
Nicolas Chevobbe d0b5f00199 Bug 1765748 - [devtools] Turn SplitView.getSummaryElementByOrdinal into a private method. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D144265
2022-04-22 13:56:00 +00:00
Nicolas Chevobbe bd68cc6c18 Bug 1765748 - [devtools] Remove unused SplitView#isLandscape . r=ochameau.
This allows us to remove the `_mql` property as well as the `LANDSCAPE_MEDIA_QUERY`
const.

Differential Revision: https://phabricator.services.mozilla.com/D144264
2022-04-22 13:55:59 +00:00
Nicolas Chevobbe 54dc8da65c Bug 1765748 - [devtools] Remove unused SplitView#activeDetails. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D144263
2022-04-22 13:55:59 +00:00
Alexandre Poirot cec4e30a40 Bug 1759818 - [devtools] Ensure creating one source per URL, even for iframe targets. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D141225
2022-04-22 11:40:32 +00:00
Alexandre Poirot 65fb779c6d Bug 1759818 - [devtools] Assert the breakable lines for iframe html pages. r=bomsy
While adding this new html page for breakable lines,
I revisit how we load same-url.sjs and use this iframe document instead.
This feel more natural than dynamically injecting a document-builder iframe.

Also I promote breakable lines and positions tests to become features tests.

And it looks like adding the iframe target slow things down for the quick open.
So I tuned the related assertion to avoid intermittents.

Last but not least, this patch highlights two limitations for iframe html debugging:
* only the first inline script is "breakable" (others are ignored)
* on reload, no content is displayed at all (this is new to me)

Differential Revision: https://phabricator.services.mozilla.com/D143989
2022-04-22 11:40:32 +00:00
Mark Banner 7a084ed84c Bug 1725952 - Upgrade ESLint to v8.x. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D144002
2022-04-22 11:23:30 +00:00
Julian Descottes dfb8d25b1d Bug 1750446 - [devtools] Wait for the proper mutation in browser_rules_custom.js r=nchevobbe
We usually need three mutations to reach the final state of addProperty and usually the 2nd and 3rd come in the same batch.
Meaning that simply waiting for receivedMutations >= 2 works in most cases.

But the intermittent screenshots show that the markup view was not updated yet with the correct content meaning it either didn't receive or processed the last
mutation.
Let's try to wait for the proper mutation instead of using an arbitrary number. Hopefully this fixes it.

Differential Revision: https://phabricator.services.mozilla.com/D144181
2022-04-22 08:17:02 +00:00
Nicolas Chevobbe 1ac5da6a36 Bug 1764690 - [devtools] Check data-l10n-args attribute value instead of context menu label in storage tests. r=bomsy.
These tests are failing intermittently as, I think, the label gets localized
asynchronously.
So instead of checking the computed translated string, we only check that the
attribute for the item name is properly set.

Differential Revision: https://phabricator.services.mozilla.com/D144163
2022-04-21 13:08:56 +00:00
Alexandre Poirot 9aec23c0fe Bug 1594639 - [devtools] Ensure reusing browser toolbox custom binary path on reload. r=nchevobbe
I tried various approaches around the session restore, but this isn't reliable.
Using an environment variable is much easier and also help making the path global
for the whole instance in case we close and reopen it.

Differential Revision: https://phabricator.services.mozilla.com/D143695
2022-04-21 12:14:39 +00:00
Alexandre Poirot 96e520678a Bug 1594639 - [devtools] Pass option dictionary to BrowserToolboxLauncher.init. r=nchevobbe
This will be slightly easier to understand which argument we pass.

Differential Revision: https://phabricator.services.mozilla.com/D143694
2022-04-21 12:14:39 +00:00
Alexandre Poirot 6da1ebe13b Bug 1763576 - [devtools] Remove unnecessary await on synchronous dispatches. r=bomsy
When dispatching a JS Object, this won't be dispatching an async action.
Dropping the await will better highlight the synchronous dispatch calls.
Note that when we do
```
dispatch({
  [PROMISE]: ...,
  ...
});
```
The promise middleware kicks in and the action becomes async.
So await is still relevant in front of these dispatches.

Differential Revision: https://phabricator.services.mozilla.com/D143143
2022-04-21 11:22:33 +00:00
Alexandre Poirot 06e8487045 Bug 1763576 - [devtools] Document source selection in debugger frontend. r=bomsy
I especially highlight the special behavior where the frontend tries
to keep selecting original source if we were already selecting an original source
and do the same when we were on a generated source.

Differential Revision: https://phabricator.services.mozilla.com/D143142
2022-04-21 11:22:33 +00:00
Alexandre Poirot 4f3e79a5fa Bug 1763576 - [devtools] Document stackframe management in debugger frontend. r=bomsy
When selecting another thread/target, we shouldn't need to re-fetch frames/scopes.
This should always be done when paused() action is fired and data be stored and kept in the reducer.
But... this happen to be cancelled in middle of the processing when two thread pause concurrently.
This is experience by browser_dbg-windowless-workers.js.

Differential Revision: https://phabricator.services.mozilla.com/D143141
2022-04-21 11:22:33 +00:00
Noemi Erli 276b91ca80 Backed out changeset 7985a1fa0789 (bug 1764768) for causing multiple failures CLOSED TREE 2022-04-20 22:25:02 +03:00
Emilio Cobos Álvarez 485bae6d11 Bug 1764768 - Don't truncate viewport units at computed value time. r=dholbert
Instead, make the behavior consistent across all <length-percentage>
values (by truncating instead of rounding). This is the already-existing
behavior for calc() and percentages, but with this patch we also apply
it to plain length-flavored <length-percentage> values (this is needed
to avoid regressing things like bug 989802).

Regular <length>s keep rounding, to preserve existing behavior. We can
consider changing that in a follow-up if need be.

Differential Revision: https://phabricator.services.mozilla.com/D143857
2022-04-20 17:22:36 +00:00
Nicolas Chevobbe 94239d0425 Bug 1765239 - [devtools] Turn SplitView into an ES6 class. r=ochameau.
Depends on D144149

Differential Revision: https://phabricator.services.mozilla.com/D144150
2022-04-20 15:47:05 +00:00
Nicolas Chevobbe 7565d876bd Bug 1765239 - [devtools] Fix SplitView.jsm ESLint errors. r=ochameau.
Depends on D144148

Differential Revision: https://phabricator.services.mozilla.com/D144149
2022-04-20 15:47:05 +00:00
Nicolas Chevobbe 06e5af3c22 Bug 1765239 - [devtools] Move SplitView.jsm to styleeditor. r=ochameau.
It's only used here, so let's move it back here

Differential Revision: https://phabricator.services.mozilla.com/D144148
2022-04-20 15:47:05 +00:00
Alexandre Poirot c5c771622b Bug 1764505 - [devtools] Allow recording the browser toolbox startup by setting MOZ_BROWSER_TOOLBOX_PROFILER_STARTUP=1. r=nchevobbe
You can run:
```
$ MOZ_BROWSER_TOOLBOX_PROFILER_STARTUP=1 ./mach run --jsdebugger
```
This will open a first browser toolbox for which we will record its startup.
Then, open a second browser toolbox, and open the recorded profile from its performance panel.

Differential Revision: https://phabricator.services.mozilla.com/D143567
2022-04-20 15:15:07 +00:00
Alexandre Poirot d9782d91c8 Bug 1764505 - [devtools] Enable the new profiler on the browser toolbox. r=nchevobbe,julienw
This will help debug browser toolbox performance.
The performance panel displayed in the first browser toolbox is a bit pointless,
you better have to use the toolbar icon so that you avoid having all DevTools noise.
This enabling is actually mostly meant for the second browser toolbox you can open,
which will debug the first browser toolbox.
In this second browser toolbox, you will be able to record the first browser toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D143566
2022-04-20 15:15:07 +00:00
Alexandre Poirot ee871dd92b Bug 1764505 - [devtools] Migrate Tool's definition isTargetSupport to isToolSupported. r=nchevobbe
And pass a toolbox instead of only the toplevel target.
It helps identify the browser toolbox and easily enable/disable tools for it.

Differential Revision: https://phabricator.services.mozilla.com/D143628
2022-04-20 15:15:06 +00:00
Alexandre Poirot 1a24fdef28 Bug 1765330 - [devtools] Remove skip-pausing debugger feature flag. r=jdescottes
This has been enabled for a while and should be considered the new default behavior.

Also removing (now) unused selectors/actions.

Differential Revision: https://phabricator.services.mozilla.com/D143999
2022-04-20 15:05:59 +00:00
Tim Huang a5d06b6cd0 Bug 1759496 - Disable test browser_webconsole_warning_group_storage_isolation.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D144018
2022-04-20 08:32:32 +00:00
Tim Huang 52f2c65367 Bug 1535451 - Enable browser_webconsole_trackingprotection_errors.js test on Fission. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D142692
2022-04-20 08:32:32 +00:00
Nicolas Chevobbe 2e492939c5 Bug 1765240 - [devtools] Remove unused ObjectActor#ownPropertyNames. r=ochameau,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143974
2022-04-20 08:05:35 +00:00
Nicolas Chevobbe ea2f238e7a Bug 1765240 - [devtools] Remove unused ObjectActor#parameterNames. r=ochameau,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143973
2022-04-20 08:05:35 +00:00
Nicolas Chevobbe f04aa523c5 Bug 1765240 - [devtools] Remove ObjectActor#displayString. r=ochameau,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143971
2022-04-20 08:05:34 +00:00
Nicolas Chevobbe f3fcb6acfd Bug 1764885 - [devtools] Fix network MDN icon for HTTP Headers. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D143821
2022-04-19 12:06:02 +00:00
Hubert Boma Manilla 0a4230aa64 Bug 1758361 - [devtools] Fix crash when viewing request headers from upload stream r=nchevobbe
This patch fixes 2 crashes, for different reasons and improves/ adds tests to cover the issues
- The raw view of the `Request headers for upload stream` crashes when there
  is only one header sent. This is covered by the scenario

  ```
  [
    "content-type: application/x-www-form-urlencoded\r",
    "\r",
    "\r",
    "foo=bar&baz=123"
  ]
  ```

- The Request side panel crashes when there is no form data body content added to the payload sent.
  This is covered in the test by the scenario

  ```
  [
    "content-type: application/x-www-form-urlencoded\r",
    "\r",
    "\r",
  ]
  ```

Differential Revision: https://phabricator.services.mozilla.com/D143339
2022-04-15 08:16:17 +00:00
Hubert Boma Manilla 42b7d01933 Bug 1758361 - [devtools] Cleanup post data tests r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D143338
2022-04-15 08:16:17 +00:00
Alexandre Poirot 52314b1e46 Bug 1747105 - [devtools] Covers the source text content for named eval and same url loaded many times. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142918
2022-04-15 07:37:16 +00:00
Alexandre Poirot e8e3023f2b Bug 1747105 - [devtools] Cover SourceTree behavior when having many sources loaded from the same URL. r=bomsy
I had to tune the versionized http helper to pass the right headers,
while still ensuring that http cache is kept disabled.

Differential Revision: https://phabricator.services.mozilla.com/D142348
2022-04-15 07:37:16 +00:00
Nicolas Chevobbe f7e827cb6d Bug 1764764 - [devtools] Automatically generate StyleSheet reps stub. r=bomsy.
generateStubs is modified to accept having an async expression.

Differential Revision: https://phabricator.services.mozilla.com/D143717
2022-04-15 07:23:23 +00:00
Luca Greco 000f909691 Bug 1748530 - Log a warning in the event page DevTools console panel when terminate on idle is ignored. r=mixedpuppy,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D143520
2022-04-14 19:54:32 +00:00
Luca Greco e4af85d2ad Bug 1748530 - Prevent event page from being terminated on idle while a devtools toolbox is attached to the extension. r=mixedpuppy,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D142991
2022-04-14 19:54:32 +00:00
Tooru Fujisawa ce9880a20a Bug 1764682 - Explicitly wait for console API message to ignore the input command. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D143700
2022-04-14 11:52:26 +00:00
Tooru Fujisawa dea0f5e175 Bug 1761590 - Enter microtask when evaluating console/debugger input. r=nchevobbe,smaug
Differential Revision: https://phabricator.services.mozilla.com/D143356
2022-04-14 01:42:59 +00:00
Nicolas Chevobbe e2128559ec Bug 1763313 - [devtools] Make NON_L10N_STRINGS dict similar to HEADERS_L10N_IDS. r=jdescottes.
Depends on D143012.

Differential Revision: https://phabricator.services.mozilla.com/D143562
2022-04-13 12:47:57 +00:00
Nicolas Chevobbe 5c8a5c6759 Bug 1763313 - [devtools] Migrate storage panel to Fluent. r=jdescottes,flod
Both the dtd and properties files strings are moved to the existing storage.ftl.
A migration file was added to keep the localized strings.

Some of the strings were migrated to a declarative approach, setting `data-l10n-id` and
`data-l10n-args` attributes on elements. But in other cases, this was not easily doable.
To accomodate with the asynchronicity of `formatValue`, we translate all the strings that
don't have dynamic parameters during the initialization of the panel, and store them in
a Map for easy retrieval.

We also took this opportunity to cleanup the strings key names and have them all prefixed
with `storage-*`. Some functions where refactored so it should be easier to search the
code for a specific l10n string.

Finally, the `table.headers.indexedDB.*` strings weren't migrated as they were never read
in the UI (they are referenced in `NON_L10N_STRINGS`, which bypass localization).

Differential Revision: https://phabricator.services.mozilla.com/D143012
2022-04-13 12:47:57 +00:00
Nicolas Chevobbe abb6e53e32 Bug 1763312 - [devtools] Remove sourceeditor.dtd. r=jdescottes,flod.
It was only used in the style editor, so we migrate the existing string
to styleeditor.ftl.

Differential Revision: https://phabricator.services.mozilla.com/D143011
2022-04-13 12:47:57 +00:00
André Bargull 1530bed239 Bug 1763996: Handle NaN values in ComparatorNumeric. r=tcampbell
Normalising `NaN` comparator results to `0` was added in ES6, but the two
numeric comparator functions were never updated to include this change.

Differential Revision: https://phabricator.services.mozilla.com/D143337
2022-04-13 08:04:32 +00:00
Doug Thayer 8d7ca3f478 Bug 1763459 - Fix browser_webconsole_scroll with virtualization r=nchevobbe
Eugh - my attempts to validate that every SmartTrace had been expanded were
just hackish and incorrect. What appears to have been happening was a race
between the Promise.race in SmartTrace.js and the IntersectionObserver callback
after setting the output's scrollTop to 0 in the test. If the Promise.race is
fast enough, it executes right after the test yields execution after setting
scrollTop, causing it to run before the IntersectionObserver callback is able
to disable scroll pinning. Setting the default initialRenderDelay to 1 instead
of 100 is enough to get this to happen reliably for me.

I don't think we need any changes other than the change to this test, because I
don't expect this to be a problem that really shows up in practice, and it
would be easily remedied by the user simply continuing to scroll.

Differential Revision: https://phabricator.services.mozilla.com/D143433
2022-04-12 15:13:48 +00:00
Nicolas Chevobbe d39eede18a Bug 1763327 - [devtools] Automatically generate Symbol rep stubs. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D143445
2022-04-12 13:32:22 +00:00
Nicolas Chevobbe 5527d8f73c Bug 1763359 - [devtools] Remove backward compat code using outerWindowID. r=ochameau.
Depends on D143025

Differential Revision: https://phabricator.services.mozilla.com/D143026
2022-04-12 11:59:30 +00:00
Nicolas Chevobbe 8ab74459f2 Bug 1763360 - [devtools] Remove backward compat code for devtools.inspector.selectedSidebar pref. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143025
2022-04-12 11:59:30 +00:00
Nicolas Chevobbe bc36fd1cda Bug 1764236 - [devtools] Make copy messages action compatible with virtualized console. r=dthayer.
This is a naive implementation where we re-create a ConsoleOutput
element, reusing the existing store, and passing a specific prop
so all the messages would be rendered.

In order to include stacktraces, we pass a `0` initial render delay to the
callsites of the `SmartTrace` component.
We take this as an opportunity to extend the test coverage of `SmartTrace` around
this feature.

Differential Revision: https://phabricator.services.mozilla.com/D142189
2022-04-12 06:45:37 +00:00
Marian-Vasile Laza dfd5289fb8 Backed out changeset db337e401470 (bug 1764236) as requested by the dev. CLOSED TREE 2022-04-11 22:53:55 -07:00
Nicolas Chevobbe ce85d0f665 Bug 1764236 - [devtools] Make copy messages action compatible with virtualized console. r=dthayer.
This is a naive implementation where we re-create a ConsoleOutput
element, reusing the existing store, and passing a specific prop
so all the messages would be rendered.

In order to include stacktraces, we pass a `0` initial render delay to the
callsites of the `SmartTrace` component.
We take this as an opportunity to extend the test coverage of `SmartTrace` around
this feature.

Differential Revision: https://phabricator.services.mozilla.com/D142189
2022-04-12 05:36:59 +00:00
Nicolas Chevobbe 14585b76c5 Bug 1762552 - [devtools] Remove isGrip function. r=Honza.
Since we now have distinct list of Reps for callsites that
are handling native object and not grips, we can remove
the check to isGrip in the other reps.
This will allow us to not have to manage actors created
for getting the grip of an object inside the grip preview
(should be handled in Bug 1762553).

Differential Revision: https://phabricator.services.mozilla.com/D142659
2022-04-11 15:04:44 +00:00
Nicolas Chevobbe 6bf955b1fb Bug 1763309 - [devtools] Automatically generate text-node stubs. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D143013
2022-04-11 12:17:42 +00:00
Alexandre Poirot c2c44d0b6c Bug 1571708 - [devtools] Only expose the currently selected frame actor ID from the debugger to other panels. r=jdescottes
We only need the frame actor ID.
It might be helpful to expose the frame front instead,
but at the end of the day, the server expects the frame actor ID.

Differential Revision: https://phabricator.services.mozilla.com/D143041
2022-04-11 11:07:57 +00:00
Alexandre Poirot 2a5bf074b7 Bug 1571708 - [devtools] Inline WebConsoleUI.getWebconsoleFront into autocomplete code. r=jdescottes
This was the only callsite.
I also aligned to what was done in ScriptCommand.execute, which is the reference.

Differential Revision: https://phabricator.services.mozilla.com/D143040
2022-04-11 11:07:56 +00:00
Doug Thayer 81292d59a9 Bug 1753177 - Use a virtualized list for webconsole output r=nchevobbe
This should be ready to review. However, I will include a big caveat that I
tried to do things the Reacty way, and it felt really awkward. Notably, I used
a React functional component, because they seem to be recommended as the
Right Way to do things, but because of all the state we need to keep track of,
as well as just the props that we don't want to lexically access because then
they can be stale, it felt really wrong. Guidance is welcome.

However, the core logic should be ready for review, so focus on that, and let
me know if I need to move anything around to make it more palatable.

Depends on D138030

Differential Revision: https://phabricator.services.mozilla.com/D138031
2022-04-11 02:50:46 +00:00
Doug Thayer e85628cd17 Bug 1753177 - Clean up unnecessary componentMap in MessageContainer.js r=nchevobbe
This is just some clean up - looks like this was once used to more dynamically
map strings to types, but now all of the mappings are explicitly accessed via
string literals.

Differential Revision: https://phabricator.services.mozilla.com/D138030
2022-04-11 02:50:45 +00:00
Doug Thayer 8e24faf1c2 Bug 1760910 - Use root margin instead of half-visibility for scroll pinning r=nchevobbe
This fixes the test included in the patch. However, it makes no guarantees to not
break other things without the virtualization patch, which changes this to observe
the bottom buffer element instead of the last message.

Differential Revision: https://phabricator.services.mozilla.com/D142362
2022-04-11 02:50:45 +00:00
Julian Descottes b0d4505476 Bug 1758768 - [devtools] Skip browser_rules_user-property-reset.js on windows debug r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D143265
2022-04-08 10:13:34 +00:00
Hubert Boma Manilla c9cdcab8b2 Bug 1763386 - [devtools] Cleanup up remaping breakpoints r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D141341
2022-04-08 09:23:33 +00:00
Butkovits Atila 1a0219d30e Backed out 2 changesets (bug 1747105) for causing failures at browser_dbg-features-source-text-content.js. CLOSED TREE
Backed out changeset 773d1b03fdda (bug 1747105)
Backed out changeset 32441db1ea2c (bug 1747105)
2022-04-08 01:51:18 +03:00
Alexandre Poirot ed172a3449 Bug 1747105 - [devtools] Covers the source text content for named eval and same url loaded many times. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142918
2022-04-07 19:51:55 +00:00
Alexandre Poirot 551344eb74 Bug 1747105 - [devtools] Cover SourceTree behavior when having many sources loaded from the same URL. r=bomsy
I had to tune the versionized http helper to pass the right headers,
while still ensuring that http cache is kept disabled.

Differential Revision: https://phabricator.services.mozilla.com/D142348
2022-04-07 19:51:55 +00:00
Kagami Sascha Rosylight 3269d4c928 Bug 1703953 - Part 3: Apply mozilla/use-isInstance to devtools r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D142068
2022-04-06 11:57:57 +00:00
colin_czb d93d2c78e3 Bug 1514495 - [devtools] Add a button to clear filter input in JSON inspector r=Honza,Oriol
Differential Revision: https://phabricator.services.mozilla.com/D135428
2022-04-06 11:48:41 +00:00
Alexandre Poirot 2607e2017e Bug 1748222 - [devtools] Remove debugger's Resource API. r=bomsy
This has been mostly replaced by Redux's createSelector and its `resultEqualityCheck` argument.

Differential Revision: https://phabricator.services.mozilla.com/D142544
2022-04-06 07:17:41 +00:00
Alexandre Poirot 02c69d75ac Bug 1762215 - [devtools] Migrate source actors reducer to a Map (instead of Resource API). r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142542
2022-04-06 07:17:40 +00:00
Alexandre Poirot b5b41d96e9 Bug 1762212 - [devtools] Migrate sources reducer to a Map (instead of Resource API). r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142463
2022-04-06 07:17:40 +00:00
Gerald Squelart 04624c3d68 Bug 1750677 - processcpu: Remove mention of unneeded preview site - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D142921
2022-04-05 12:47:54 +00:00
Frederik Braun 30ca834b74 Bug 1752475 - Change nsICookie/CookieStruct to implicitly flip SameSite in getter func r=dveditz,dragana,freddyb
Given that we only support samesite lax/strict/none in our storage schema,
it's useful to introduce a default value, as required by the spec.
However, that would it hard to distinguish between none/lax when we switch
the default.
So, instead of doing that we use the peculiarities of our current schema
to our advantage: There's a "sameSite" attribute and a "rawSameSite"
attribute, where the latter is the literal value we received from the
server. With this patch, we'll interpret the "sameSite" attribute
based on the laxByDefault pref. This also has the advantage that various
front-end code (e.g., in DevTools) is always reading the "sameSite"
value of nsICookies.

Differential Revision: https://phabricator.services.mozilla.com/D137460
2022-04-05 08:20:25 +00:00
Nicolas Chevobbe 14ed677c3e Bug 1762849 - [devtools] Automatically generate DateTime rep stubs. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142788
2022-04-05 07:47:48 +00:00
Mark Banner f3012297a4 Bug 1762601 - Migrate all of devtools from Cu.import to ChromeUtils.import. r=jdescottes,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D142693
2022-04-04 13:41:02 +00:00
Alexandre Poirot efecaff737 Bug 1761368 - [devtools] Cover nameless eval and content script sources in the SourceTree test. r=bomsy
I'm also improving waitForSourcesInSourceTree to timeout faster and have an helpful error message,
clearly highlight the unexpected or missing sources.

In source tree test, it looks like adding named eval slow things down for the quick open.
So I tuned the related assertion to avoid intermittents.
We were having intermediate updates showing up named eval instead of the source with query string.

Differential Revision: https://phabricator.services.mozilla.com/D142340
2022-04-04 13:32:30 +00:00
Alexandre Poirot 88b1cb12ed Bug 1761368 - [devtools] Reuse integration test page for the source tree test. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142005
2022-04-04 13:32:29 +00:00
Alexandre Poirot 713fe5ad8e Bug 1761368 - [devtools] Merge all tests against the SourceTree into a dedicated feature test. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142004
2022-04-04 13:32:29 +00:00
Alexandre Poirot 6d2ea831a0 Bug 1761921 - [devtools] Clarify the integration test page with many comments. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142318
2022-04-04 13:32:28 +00:00
Nicolas Chevobbe eb0de131a8 Bug 1762827 - [devtools] Remove old edit-and-resend-button rule. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142781
2022-04-04 12:09:03 +00:00
Nicolas Chevobbe 703b2daf31 Bug 1762550 - [devtools] Cleanup webconsole stylesheet imports. r=bomsy.
Remove httpi.css that was only used by the console, and load the individual
CSS files instead.
Remove widgets.css, which is a relic of the old console.
Remove textActions.ftl import, which doesn't seem to have any effect.

Differential Revision: https://phabricator.services.mozilla.com/D142658
2022-04-04 06:04:17 +00:00
Nicolas Chevobbe b9f014222a Bug 1454419 - [devtools] Rename new-consoletable* to consoletable. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D142657
2022-04-04 06:04:17 +00:00
Nicolas Chevobbe 822125b4fa Bug 1454419 - [devtools] Cleanup webconsole.css. r=jdescottes.
This removes now unused rules (targetting element from the old webconsole), and
merge rules targetting similar elements.

Differential Revision: https://phabricator.services.mozilla.com/D142656
2022-04-04 06:04:16 +00:00
Claudia 71ead80661 Bug 1761991 - [devtools] Fix intermittent failure on custom HTTP panel tests r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142543
2022-04-02 06:50:15 +00:00
Nicolas Chevobbe 3e512a6918 Bug 1760590 - [devtools] Remove unhelpful console-message resource properties. r=ochameau.
- `category` isn't being used for console messages, so we can remove it
- `chromeContext` is only helpful when it's true, so we can omit it when it is not

We take this as an opportunity to test more properties and more message types
in browser_resources_console_messages.js.

Differential Revision: https://phabricator.services.mozilla.com/D141599
2022-04-01 13:03:56 +00:00
Norisz Fay c376790f3c Backed out 4 changesets (bug 1761921, bug 1761368) for causing dt failures on browser_dbg-features-source-tree.js CLOSED TREE
Backed out changeset f478fa1e3df3 (bug 1761368)
Backed out changeset 49ad1260f76d (bug 1761368)
Backed out changeset 0c34f0da19bc (bug 1761368)
Backed out changeset b6bb54ecd127 (bug 1761921)
2022-03-31 15:52:59 +03:00