26437 Commits

Author SHA1 Message Date
Alexandre Poirot
3ee6c57749 Bug 1824725 - [devtools] Add a global key shortcut to toggle JavaScript tracing. r=devtools-reviewers,fluent-reviewers,flod,nchevobbe
This key will be trigerred even when devtools aren't focused.
We are willing to trigger this key especially when the page is focused.
But the shortcut will only do something when the debugger is opened.

This feature highlights that JS tracing may as well work solely based
on the WebConsole... we may want to followup to make this feature work
across console and debugger.

Differential Revision: https://phabricator.services.mozilla.com/D174097
2023-04-12 14:54:55 +00:00
Alexandre Poirot
1cb5a67ab2 Bug 1824725 - [devtools] Avoid focusing the webconsole when enabling the JS Tracer. r=nchevobbe,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D174873
2023-04-12 14:54:54 +00:00
Emilio Cobos Álvarez
89cb883d52 Bug 1821985 - Fix and re-enable devtools test.
MANUAL PUSH: Trivial fix CLOSED TREE
2023-04-12 17:26:54 +02:00
Cristina Horotan
b17e1f1e86 Bug 1821985 - Fixing wrong disable tests. CLOSED TREE 2023-04-12 17:40:58 +03:00
Cristina Horotan
c50b03eb17 Bug 1821985 - Temporarily skip browser_webextension_dropdown.js for causing perma failures. CLOSED TREE 2023-04-12 17:21:32 +03:00
Stanca Serban
19500bcf2a Backed out 2 changesets (bug 1826502) for causing devtools failures. CLOSED TREE
Backed out changeset cf951535876b (bug 1826502)
Backed out changeset 18a87184af79 (bug 1826502)
2023-04-12 15:09:18 +03:00
Nicolas Chevobbe
b80305abbb Bug 1826502 - [devtools] Remove classnames package. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D174954
2023-04-12 10:23:45 +00:00
Nicolas Chevobbe
d5c6ec1430 Bug 1826502 - [devtools] Create a small utils similar to the classnames node package. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D174953
2023-04-12 10:23:45 +00:00
Julian Descottes
58cc5d71c7 Bug 1827505 - [devtools] Remove backward compatibility code for supportsJavascriptTracing r=devtools-reviewers,nchevobbe
Depends on D175179

Differential Revision: https://phabricator.services.mozilla.com/D175180
2023-04-12 07:54:11 +00:00
Julian Descottes
ca303c5cd8 Bug 1827505 - [devtools] Remove backward compatibility code for isOverridesSupported r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D175179
2023-04-12 07:54:11 +00:00
Nicolas Chevobbe
affbaffc08 Bug 860312 - [devtools] Add LegacyLenientThis getters to unsafe list. r=devtools-reviewers,ochameau.
Getters with LegacyLenientThis attribute will trigger a warning in the console
if it's called with the unexpected `this`.
We can't tell in DevTools if we have the "right" `this`.
For example displaying an `HTMLDivElementPrototype` object, we'll trigger the
warning because of the `onmouseenter` getter, which is supposed to be called
with the `HTMLElement` instance, which we don't have at this point.

For this reason, we exclude those from being safe getters, which will prevent
triggering the warning.

Differential Revision: https://phabricator.services.mozilla.com/D174070
2023-04-11 06:25:58 +00:00
Nicolas Chevobbe
3fbff23a4b Bug 860312 - [devtools] Check deprecated list before calling a getter. r=devtools-reviewers,ochameau.
As the drawback of not having the safeGetter evaluated is quite minimal, we taking
a very simple route and only check the getter name against the list of deprecated
getter names.
We didn't have test for deprecated warnings, so one is added where we check such
messages are not emitted when expanding an object inspector.

Differential Revision: https://phabricator.services.mozilla.com/D174057
2023-04-11 06:25:57 +00:00
Nicolas Chevobbe
d3d9d457c4 Bug 860312 - [devtools] Generate list of unsafe getters. r=devtools-reviewers,ochameau.
We'll only need those names to avoid executing getters.
The file is renamed to better convey what data it represents.

Differential Revision: https://phabricator.services.mozilla.com/D174056
2023-04-11 06:25:56 +00:00
Nicolas Chevobbe
bb2d6e65b8 Bug 1825797 - [devtools] Use a class for prettyFast. r=devtools-reviewers,ochameau.
This will make it easier to reason about the state of the task.
Depends on D174723

Differential Revision: https://phabricator.services.mozilla.com/D174281
2023-04-11 05:55:18 +00:00
Nicolas Chevobbe
6cb651994d Bug 1826508 - [devtools] Use rollup for bundling debugger workers. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D174723
2023-04-11 05:55:17 +00:00
Emilio Cobos Álvarez
3c1068d14a Bug 1826517 - Follow-up: fix tests with EFT disabled.
MANUAL PUSH: Trivial orange fix for setup that we don't ship CLOSED TREE
2023-04-10 15:09:34 +02:00
Emilio Cobos Álvarez
feebcb3f8a Bug 1826517 - Simplify DevTools' walker. r=smaug,devtools-reviewers,nchevobbe
The tree devtools uses is the light dom + pseudo-elements + NAC, but sometimes
it wants to know stuff about the flat tree like assigned nodes. Previously it
was using a weird mix of the anonymous vs. non-anonymous walkers to get what it
wants, but that's needlessly complicated.

Instead, make InspectorUtils.getChildrenForNode do the right thing, and add
assigned nodes explicitly.

While _getChildren using a walker might seem like a good idea for performance,
realistically it was using InspectorUtils under the hood, and this is much
simpler.

Differential Revision: https://phabricator.services.mozilla.com/D174491
2023-04-10 11:18:38 +00:00
kernp25
dd17ee1d19 Bug 1797352 - Fix webextension-fallback.html page. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D172898
2023-04-08 19:49:11 +00:00
Alexandre Poirot
a5dfce8121 Bug 1767760 - [devtools] Fix browser_target_parents.js when processing defunct worker from previous test. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D174919
2023-04-07 11:43:15 +00:00
Julian Descottes
d51dd03761 Bug 1825916 - [devtools] Add a http3 only test for netmonitor response headers r=bomsy,devtools-reviewers
Depends on D174526

Differential Revision: https://phabricator.services.mozilla.com/D174527
2023-04-05 17:13:05 +00:00
Julian Descottes
5ec4d15140 Bug 1825916 - [devtools] Update getHttpVersion to read the response version r=bomsy,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D174526
2023-04-05 17:13:05 +00:00
Mark Banner
f5cf70a12b Bug 1826570 - Remove unnecessary Prettier configuration for debugger/. r=devtools-reviewers,nchevobbe
The .prettierignore entries are already in the top-level .prettierignore.

Depends on D174760

Differential Revision: https://phabricator.services.mozilla.com/D174761
2023-04-05 15:35:36 +00:00
Emilio Cobos Álvarez
0537681b9c Bug 1825825 - Tweak DevTools walker to preserve behavior after the previous patches. r=devtools-reviewers,nchevobbe
To be clear the current behavior is worth preserving and not a bug, it just
happens that my previous patch breaks it subtly.

These patches on their own don't change behavior but they fail tests from the
precious changes.

The TLDR is that when using the standard walker we don't want to ignore all
anonymous children, just anonymous roots. This is important because now that
ShadowRoots can be anonymous roots, we were skipping their children altogether.

Also, don't return anonymous children that are really part of the shadow tree
and which now show up as anonymous because of that.

Depends on D174365

Differential Revision: https://phabricator.services.mozilla.com/D174366
2023-04-05 09:19:16 +00:00
Hubert Boma Manilla
a3621a085f Bug 1825601 - [devtools] Fix intermittent in browser_dbg-pretty-print-breakpoints.js r=nchevobbe,devtools-reviewers
This patch fixes the inttermittent which is caused by not waiting to properly
resume from an extra debugger statement that exists.

Differential Revision: https://phabricator.services.mozilla.com/D174690
2023-04-05 08:13:37 +00:00
Nicolas Chevobbe
62e358e5d8 Bug 1826336 - [devtools] Update compatibility data for 113 cycle. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D174632
2023-04-05 06:48:16 +00:00
Mark Banner
59c0d67e6c Bug 1825507 - Separate out prettier and ESLint to run as different processes. r=linter-reviewers,devtools-reviewers,ahal
This is enough to allow ESLint and Prettier to be run as different processes within the same lint command.
It does not fix all the failures with those two separate - that will be handled in follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D174133
2023-04-04 19:02:13 +00:00
shisama
75ee2d516c Bug 1753682 - fix format specifier for BigInt. r=nchevobbe,smaug,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D173415
2023-04-04 16:29:22 +00:00
Nicolas Chevobbe
2e56b1db0e Bug 1826263 - [devtools] Display ::backdrop rules for :modal elements (e.g. <dialog>). r=devtools-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D174582
2023-04-04 11:52:54 +00:00
Emilio Cobos Álvarez
cda66f2b96 Bug 1825825 - Remove unused scrollbarTreeWalkerFilter. r=nchevobbe,devtools-reviewers
Split out as per request in the other patches.

Differential Revision: https://phabricator.services.mozilla.com/D174580
2023-04-04 09:04:25 +00:00
Emilio Cobos Álvarez
3dadb13b7a Bug 1825825 - Remove unused whatToShow option from devtools inspector walker. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
It's always SHOW_ALL, and it doesn't work anyways, see the treewalker impl.

Differential Revision: https://phabricator.services.mozilla.com/D174490
2023-04-04 08:56:37 +00:00
Cosmin Sabou
3486fc5a51 Bug 1825601 - Disable browser_dbg-pretty-print-breakpoints.js on linux and windows because of frequent failures until there's a fix in place. r=devtools-reviewers,nchevobbe DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D174556
2023-04-04 08:01:27 +00:00
Nicolas Chevobbe
23ddde2f20 Bug 1826101 - [devtools] Make timeStamp property mandatory in ConsoleMessageWatcher emitMessages. r=ochameau,devtools-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D174484
2023-04-04 07:42:17 +00:00
Hubert Boma Manilla
84b589e729 Bug 1824715 - [devtools] Fix persisting blackbox ranges across toolbox restart r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D173687
2023-04-03 16:13:11 +00:00
Alexandre Poirot
4f2561f730 Bug 1819767 - [devtools] Expose ChromeUtils.isDevToolsOpened to know if DevTools are debugging something in the current process. r=smaug,devtools-reviewers,jdescottes
This doesn't help know what particular resource DevTools is currently inspecting,
but at least it helps know if it debugs something:
* one or many BrowsingContext(s) for regular DevTools (you can use BrowsingContext.watchedByDevTools instead)
* the whole process for the Browser Console/Toolbox

Differential Revision: https://phabricator.services.mozilla.com/D173295
2023-04-03 12:35:53 +00:00
Mark Banner
82e49f1086 Bug 1825739 - Replace generic ESLint disable statements with specific and prettier ones in devtools. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D174225
2023-04-03 10:23:52 +00:00
Mark Banner
44fdf3c6b0 Bug 1825715 - Replace disabling of ESLint rule prettier/prettier with prettier-specific disabling (other). r=Gijs,necko-reviewers,credential-management-reviewers,devtools-reviewers,dimi
Differential Revision: https://phabricator.services.mozilla.com/D174217
2023-04-01 16:40:01 +00:00
Cristian Tuns
8cca7e0d9f Backed out 3 changesets (bug 1825715) for causing node failures with checkBundles CLOSED TREE
Backed out changeset 53faa883781a (bug 1825715)
Backed out changeset 5ce3ad6ce483 (bug 1825715)
Backed out changeset 7f0b08e89cd1 (bug 1825715)
2023-03-31 17:23:28 -04:00
Mark Banner
a6e7fe51aa Bug 1825715 - Replace disabling of ESLint rule prettier/prettier with prettier-specific disabling (other). r=Gijs,necko-reviewers,credential-management-reviewers,devtools-reviewers,dimi
Differential Revision: https://phabricator.services.mozilla.com/D174217
2023-03-31 20:32:18 +00:00
Nicolas Chevobbe
bc5a13c461 Bug 1822355 - [devtools] Change icon for highlighting node in animation panel. r=devtools-reviewers,jdescottes.
Use the same icon and styling that we have for the highlight button in the rule view.
We only update the current background color we use so it still visible with the
animation item hover color.

Differential Revision: https://phabricator.services.mozilla.com/D173963
2023-03-31 09:07:42 +00:00
Nicolas Chevobbe
f1e47d4a2d Bug 1822355 - [devtools] Allow to pass a custom class for the icon in ElementNode rep. r=devtools-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D173962
2023-03-31 09:07:41 +00:00
Nicolas Chevobbe
a89a6bb4be Bug 1822355 - [devtools] Switch from mask to background image for Reps open in inspector icon. r=devtools-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D173961
2023-03-31 09:07:41 +00:00
Csoregi Natalia
7b914d56e5 Backed out 2 changesets (bug 1819767) for causing bustage on ChromeUtils.cpp. CLOSED TREE
Backed out changeset f67a63d151f5 (bug 1819767)
Backed out changeset 91e577f436e9 (bug 1819767)
2023-03-31 02:23:14 +03:00
Alexandre Poirot
7e6e318629 Bug 1825509 - [devtools] Remember JS tracing log method across restart. r=devtools-reviewers,nchevobbe
The log method being choosed in the context menu wasn't saved in a preference,
so that you have to pick STDOUT on each new firefox restart.

Differential Revision: https://phabricator.services.mozilla.com/D174096
2023-03-30 21:26:52 +00:00
Alexandre Poirot
15624fe213 Bug 1824724 - [devtools] Throttle JavaScript tracing to speed it up. r=nchevobbe,devtools-reviewers
It appears that emitting one CONSOLE_MESSAGE per frame highlights the overhead
of DevTools transport and JSWindowActor communication.
Throttling the messages by sending array of them significantly improve
the overall performance of tracing.

Differential Revision: https://phabricator.services.mozilla.com/D173775
2023-03-30 21:26:51 +00:00
Alexandre Poirot
d1f4f4ca8a Bug 1781941 - [devtools] Wait for original sources when mapping frames. r=devtools-reviewers,bomsy
With the new location object having direct references to source object,
we now have to wait for sources objects to be registered in the reducers
before trying to instantiate the related frame locations.

Also fix a typo in waitForSourceToBeRegisteredInStore.

Last but not least, we no longer need to wait for the source related to
the selected frame as mapFrames will do it.
Now we have a strong guaranty that frame.location will be set
with a valid source object. That for both generated *and* original sources.

Differential Revision: https://phabricator.services.mozilla.com/D173838
2023-03-30 21:26:23 +00:00
Alexandre Poirot
61c0a76c2d Bug 1819767 - [devtools] Expose ChromeUtils.isDevToolsOpened to know if DevTools are debugging something in the current process. r=smaug,devtools-reviewers,jdescottes
This doesn't help know what particular resource DevTools is currently inspecting,
but at least it helps know if it debugs something:
* one or many BrowsingContext(s) for regular DevTools (you can use BrowsingContext.watchedByDevTools instead)
* the whole process for the Browser Console/Toolbox

Differential Revision: https://phabricator.services.mozilla.com/D173295
2023-03-30 21:25:08 +00:00
Julian Descottes
d9c2dd6502 Bug 1710401 - [devtools] Add edge case test for netmonitor statistics panel r=ochameau,devtools-reviewers
Depends on D174031

Differential Revision: https://phabricator.services.mozilla.com/D174032
2023-03-30 21:12:35 +00:00
Julian Descottes
5a80d330e4 Bug 1710401 - [devtools] Wait for the load event to display network statistics charts r=devtools-reviewers,ochameau
Depends on D174120

Differential Revision: https://phabricator.services.mozilla.com/D174031
2023-03-30 21:12:35 +00:00
Julian Descottes
2718f99def Bug 1710401 - [devtools] Stop using resourceOverrides for content process network requests r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D174120
2023-03-30 21:12:34 +00:00
William Durand
231cd40547 Bug 1824346 - Only uninstall temporary add-ons. r=jdescottes,robwu,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D173696
2023-03-30 15:35:25 +00:00