Commit Graph
28175 Commits
Author SHA1 Message Date
Nicolas Chevobbe ca1ab8f378 Bug 1590432 - [devtools] Update style for active toggle buttons. r=devtools-reviewers,ochameau.
This adds a light background alongside a bottom border that makes it clear that
the state changed.

Differential Revision: https://phabricator.services.mozilla.com/D196409
2024-05-23 06:02:57 +00:00
Cristian Tuns 732a76714e Backed out changeset 4c4e846a4ebf (bug 1590432) for causing dt failures in browser_parsable_css.js CLOSED TREE 2024-05-22 10:54:16 -04:00
Nicolas Chevobbe b5b368576d Bug 1590432 - [devtools] Update style for active toggle buttons. r=devtools-reviewers,ochameau.
This adds a light background alongside a bottom border that makes it clear that
the state changed.

Differential Revision: https://phabricator.services.mozilla.com/D196409
2024-05-22 13:35:10 +00:00
Cristian Tuns d0272b92b7 Backed out 8 changesets (bug 1651518, bug 1883847) dt failures in nsTArray.h. CLOSED TREE
Backed out changeset 481558275c1d (bug 1651518)
Backed out changeset 5337435e8bca (bug 1651518)
Backed out changeset 8fe0c1a4da7f (bug 1651518)
Backed out changeset 840a0d9db260 (bug 1651518)
Backed out changeset eaab9de5819d (bug 1651518)
Backed out changeset cf71de92d782 (bug 1651518)
Backed out changeset d778691464db (bug 1651518)
Backed out changeset af28e5f719e8 (bug 1883847)
2024-05-22 09:02:19 -04:00
Alexandre Poirot 76d52e829a Bug 1651518 - [devtools] Enable server side worker targets for browser toolbox. r=devtools-reviewers,nchevobbe
Note that the ignore code for subprocess is being ported from the legacy worker watcher.

The Worker Target URL is now correctly set to the Absolute URL,
this has an impact on the context selector as we are displaying it.

Also, this patch highlights some issues around Common JS Loader and the distinct compartment
to be used when debugging privileged page, or when running the browser toolbox.
It caused leaks when running browser toolbox tests in debug builds.
The JS Process Actor is directly loaded in a distinct global and compartment "DevTools global",
thanks to `loadInDevToolsLoader` flag of BrowserToolboxDevToolsProcess JS Process Actor configuration.
There is no need to use `useDistinctSystemPrincipalLoader` helper as Loader.sys.mjs, loaded from
the JS Process Actor will also be loaded in the distinct global.
Then, we only need to ensure that the CommonJS Loader will also pick up the "DevTools global"
when it is loaded in that distinct global.
Things will be significantly easier once we migrate from CommonJS to ESM as the `{ global: "contextual" }`
option passed to `ChromeUtils.importESModule` will do the right thing, as well as static `import` statements.

Differential Revision: https://phabricator.services.mozilla.com/D204874
2024-05-22 11:50:45 +00:00
Alexandre Poirot adc974e7f1 Bug 1651518 - [devtools] Ensure cleaning up workers which are destroyed during their initilization. r=devtools-reviewers,nchevobbe
We may unwatch for workers, while the creation of the target actor is still ongoing.

Differential Revision: https://phabricator.services.mozilla.com/D210367
2024-05-22 11:50:45 +00:00
Alexandre Poirot 93312eab5a Bug 1651518 - [devtools] Ensure destroying active target actors on toolbox closing. r=devtools-reviewers,nchevobbe
The cleanup work done from didDestroy was only calling `unwatch` on the Watcher classes,
which was typically unregistering the platform listeners.
We were missing calling `destroyTargetsForWatcher` on them which is meant to destroy
the target actors, which can also register platform listeners and be leaking data.

Differential Revision: https://phabricator.services.mozilla.com/D210366
2024-05-22 11:50:45 +00:00
Alexandre Poirot e9c4e8ed6b Bug 1651518 - [devtools] Unregister the JS Process Actor only on watcher actor destruction. r=devtools-reviewers,nchevobbe
Stop unregistering the JS Process actor when removing the last watched target/resource type.
Instead only unregister it when the Watcher Actor is destroyed.

It prevents some race condition where unwatch request (which aren't awaited for)
unregister the actor late and the next test/next toolbox opening would have its actor
unregistered by late destruction code related to the previously closed toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D210365
2024-05-22 11:50:44 +00:00
Alexandre Poirot 34e5032104 Bug 1651518 - [devtools] Ensure spawning DistinctSystemPrincipalLoader.sys.mjs only once. r=devtools-reviewers,nchevobbe
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.

Differential Revision: https://phabricator.services.mozilla.com/D207432
2024-05-22 11:50:44 +00:00
Alexandre Poirot b7ce0e5088 Bug 1651518 - [devtools] ResourceCommand.watchResources should be protected from mutation made to its array argument. r=devtools-reviewers,nchevobbe
Modifying the content of the list of resources may suddently start or stop receiving new resources types,
that, without calling (un)watchResources again!

Differential Revision: https://phabricator.services.mozilla.com/D205603
2024-05-22 11:50:43 +00:00
Alexandre Poirot 2ca6803e58 Bug 1651518 - [devtools] Ensure waiting for CSS Warning full listening when toggling the filter from tests. r=devtools-reviewers,nchevobbe
The enhancer was brittle as nothing was waiting for its completion.
We should rather do such work from the action layer. At least this can delay the action completion,
which the test header (setFilterState) already wait for.

Differential Revision: https://phabricator.services.mozilla.com/D205602
2024-05-22 11:50:43 +00:00
Alexandre Poirot ffda34f517 Bug 1883847 - [devtools] Add support for server side SHARED_WORKER target support. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204873
2024-05-22 11:50:43 +00:00
Florian Quèze 6bf97a67e5 Bug 1897772 - Allow sampling at 1Hz, r=profiler-reviewers,aabh
Differential Revision: https://phabricator.services.mozilla.com/D210917
2024-05-22 06:15:20 +00:00
Cristina Horotan ca70119cfa Backed out 8 changesets (bug 1651518, bug 1883847) for causing damp failures at toolbox/browser-toolbox.js CLOSED TREE
Backed out changeset 4ec70db12f48 (bug 1651518)
Backed out changeset b2b138889ad6 (bug 1651518)
Backed out changeset efda5c09b0ea (bug 1651518)
Backed out changeset b0de4113f8fb (bug 1651518)
Backed out changeset 03cf235d2a80 (bug 1651518)
Backed out changeset 58e71c27f1fd (bug 1651518)
Backed out changeset f7fb390c3965 (bug 1651518)
Backed out changeset b8a2473c47c0 (bug 1883847)
2024-05-22 04:00:53 +03:00
Alexandre Poirot 64b2f242bc Bug 1651518 - [devtools] Enable server side worker targets for browser toolbox. r=devtools-reviewers,nchevobbe
Note that the ignore code for subprocess is being ported from the legacy worker watcher.

Also, this patch highlights some issues around Common JS Loader and the distinct compartment
to be used when debugging privileged page, or when running the browser toolbox.
It caused leaks when running browser toolbox tests in debug builds.
The JS Process Actor is directly loaded in a distinct global and compartment "DevTools global",
thanks to `loadInDevToolsLoader` flag of BrowserToolboxDevToolsProcess JS Process Actor configuration.
There is no need to use `useDistinctSystemPrincipalLoader` helper as Loader.sys.mjs, loaded from
the JS Process Actor will also be loaded in the distinct global.
Then, we only need to ensure that the CommonJS Loader will also pick up the "DevTools global"
when it is loaded in that distinct global.
Things will be significantly easier once we migrate from CommonJS to ESM as the `{ global: "contextual" }`
option passed to `ChromeUtils.importESModule` will do the right thing, as well as static `import` statements.

Differential Revision: https://phabricator.services.mozilla.com/D204874
2024-05-21 14:09:35 +00:00
Alexandre Poirot 5aee0c27f5 Bug 1651518 - [devtools] Ensure cleaning up workers which are destroyed during their initilization. r=devtools-reviewers,nchevobbe
We may unwatch for workers, while the creation of the target actor is still ongoing.

Differential Revision: https://phabricator.services.mozilla.com/D210367
2024-05-21 14:09:35 +00:00
Alexandre Poirot 2adafe588e Bug 1651518 - [devtools] Ensure destroying active target actors on toolbox closing. r=devtools-reviewers,nchevobbe
The cleanup work done from didDestroy was only calling `unwatch` on the Watcher classes,
which was typically unregistering the platform listeners.
We were missing calling `destroyTargetsForWatcher` on them which is meant to destroy
the target actors, which can also register platform listeners and be leaking data.

Differential Revision: https://phabricator.services.mozilla.com/D210366
2024-05-21 14:09:34 +00:00
Alexandre Poirot fd464b4d95 Bug 1651518 - [devtools] Unregister the JS Process Actor only on watcher actor destruction. r=devtools-reviewers,nchevobbe
Stop unregistering the JS Process actor when removing the last watched target/resource type.
Instead only unregister it when the Watcher Actor is destroyed.

It prevents some race condition where unwatch request (which aren't awaited for)
unregister the actor late and the next test/next toolbox opening would have its actor
unregistered by late destruction code related to the previously closed toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D210365
2024-05-21 14:09:34 +00:00
Alexandre Poirot 3d2406db93 Bug 1651518 - [devtools] Ensure spawning DistinctSystemPrincipalLoader.sys.mjs only once. r=devtools-reviewers,nchevobbe
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.

Differential Revision: https://phabricator.services.mozilla.com/D207432
2024-05-21 14:09:33 +00:00
Alexandre Poirot 6fa21b8235 Bug 1651518 - [devtools] ResourceCommand.watchResources should be protected from mutation made to its array argument. r=devtools-reviewers,nchevobbe
Modifying the content of the list of resources may suddently start or stop receiving new resources types,
that, without calling (un)watchResources again!

Differential Revision: https://phabricator.services.mozilla.com/D205603
2024-05-21 14:09:33 +00:00
Alexandre Poirot 77d5f78f48 Bug 1651518 - [devtools] Ensure waiting for CSS Warning full listening when toggling the filter from tests. r=devtools-reviewers,nchevobbe
The enhancer was brittle as nothing was waiting for its completion.
We should rather do such work from the action layer. At least this can delay the action completion,
which the test header (setFilterState) already wait for.

Differential Revision: https://phabricator.services.mozilla.com/D205602
2024-05-21 14:09:33 +00:00
Alexandre Poirot 91b22a2ea0 Bug 1883847 - [devtools] Add support for server side SHARED_WORKER target support. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204873
2024-05-21 14:09:32 +00:00
Tamas Szentpeteri 03c9e65872 Backed out 2 changesets (bug 1897619) for causing wpt failures on position-anchor-basics.html
Backed out changeset d1e736673f03 (bug 1897619)
Backed out changeset 62489eeeb03e (bug 1897619)
2024-05-21 18:53:31 +03:00
Alexandre Poirot b2844dc4bf Bug 1781941 - [devtools] Fix browser_dbg-integration-reloading-uncompressed-sourcemaps.js intermittent. r=devtools-reviewers,nchevobbe
We seem to never wait for the breakpoint to be actually visibile before calling assertBreakpoint,
but it seems that it is relevant in this particular test, in the uncompressed codepath.

Differential Revision: https://phabricator.services.mozilla.com/D210991
2024-05-21 12:24:29 +00:00
Jonathan Watt e3ca566fd8 Bug 1897619. Implement parsing of CSS 'position-anchor' property. r=emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D210880
2024-05-21 10:12:22 +00:00
Alexandre Poirot 7c07e66e35 Bug 1832824 - [devtools] Fix browser_command_line_urls.js intermittent. r=devtools-reviewers,nchevobbe
View source may update the selection late.

Differential Revision: https://phabricator.services.mozilla.com/D210974
2024-05-21 08:32:13 +00:00
Nicolas Chevobbe b64ccccc10 Bug 1896847 - [devtools] Add matching bracket styling in cm6. r=bomsy,devtools-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D210901
2024-05-21 05:43:20 +00:00
Alexandre Poirot f27b54d9d0 Bug 1835255 - [devtools] Fix browser_dbg-reducer-cleanup-on-target-removal.js intermittent. r=devtools-reviewers,nchevobbe
We were waiting for Sources, which are resources, but not the targets,
which are updated with a different logic and timings.

Differential Revision: https://phabricator.services.mozilla.com/D210943
2024-05-20 16:03:27 +00:00
Alexandre Poirot b062cd5868 Bug 1874227 - [devtools] Fix browser_resources_sources.js permafail. r=devtools-reviewers,nchevobbe
The DOM Timer source is now correctly resurrected.
And the unique call to forceGC was a source of intermittent.

Differential Revision: https://phabricator.services.mozilla.com/D210911
2024-05-20 16:03:26 +00:00
Alexandre Poirot 467f34b667 Bug 1874227 - [devtools] Fix browser_many_toggles.js intermittent. r=devtools-reviewers,nchevobbe
ResponsiveUI was instantiated a promise which wasn't awaited by any code,
and especially the test codepath which explicitely ignore rejections.

Differential Revision: https://phabricator.services.mozilla.com/D210902
2024-05-20 16:03:26 +00:00
Alexandre Poirot be63276971 Bug 1770282 - [devtools] Fix browser_toolbox_toolbar_overflow_button_visibility.js intermittent. r=devtools-reviewers,nchevobbe
This is MacOS specific.

Differential Revision: https://phabricator.services.mozilla.com/D210899
2024-05-20 16:03:25 +00:00
Valentin Gosu 4079e2222e Bug 1711622 - Update tests r=necko-reviewers,devtools-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D203115
2024-05-20 15:35:29 +00:00
Iulian Moraru 256c02a385 Backed out 2 changesets (bug 1711622) for causing reftest failures on accept-image-catchall.html. CLOSED TREE
Backed out changeset 877d9c37605a (bug 1711622)
Backed out changeset c315e89b6e4b (bug 1711622)
2024-05-20 16:59:04 +03:00
Alexandre Poirot 08943eeb3b Bug 1874711 - [devtools] Fix browser_styleeditor_init.js intermittent. r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D210699
2024-05-20 12:46:49 +00:00
Valentin Gosu 968cfaf0f1 Bug 1711622 - Update tests r=necko-reviewers,devtools-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D203115
2024-05-20 11:53:58 +00:00
Hubert Boma Manilla 6ee10584ed Bug 1890269 - [devtools] Implementing search highlight in codemirror 6 r=devtools-reviewers,nchevobbe
This patch
- Gets the search in file feature working for codemirror 6 (Use Ctrl/CMD F to open in the editor)
- Highlights search results in the editor, when using the search panel on the left.
- Includes the @codemirror/search package in the codemirror bundle. This enables using the `RegExpCursor`

Differential Revision: https://phabricator.services.mozilla.com/D208110
2024-05-20 09:50:41 +00:00
Hubert Boma Manilla 999135a4da Bug 1891336 - [devtools] Highlight text during pause and for exceptions r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D207418
2024-05-19 22:28:23 +00:00
Hubert Boma Manilla 2db2984f38 Bug 1889281 - [devtools] Display column breakpoints for codemirror 6 r=devtools-reviewers,nchevobbe
This patch creates a new extension and api enable marking content nodes

Differential Revision: https://phabricator.services.mozilla.com/D207408
2024-05-19 22:28:23 +00:00
Hubert Boma Manilla 412baef0b9 Bug 1894725 - [devtools] Scroll to the function when using the copy function context menu item r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D209676
2024-05-19 22:24:16 +00:00
Jonathan Watt 26c49a3375 Bug 1897605. Implement parsing of CSS 'anchor-scope'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D210874
2024-05-18 16:47:28 +00:00
Jonathan Watt ea5cbc487d Bug 1897405 p1. Implement parsing of CSS 'anchor-name'. r=emilio,devtools-reviewers,firefox-style-system-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D210787
2024-05-18 16:47:27 +00:00
Nicolas Chevobbe badb49de19 Bug 1897469 - [devtools] Fix focus-indicator glitch in inspector sidebar tabs. r=jdescottes,devtools-reviewers.
We make the focused tab appear in fronts of the others,
so the box-shadow of the focus-indicator applies properly
on each side.
We also hide the small line on active tab when it is also
focused, so we avoid it to overlap with the focus-indicator
outline.

Differential Revision: https://phabricator.services.mozilla.com/D210818
2024-05-17 16:10:18 +00:00
Nicolas Chevobbe 99013436f5 Bug 1674321 - [devtools] Tweak matching bracket style. r=devtools-reviewers,bomsy.
We used to have an outline all around the brackets, making
it hard to distinguish the cursor if it was close.
Switching to a simple underline so it's less distracting.

Differential Revision: https://phabricator.services.mozilla.com/D210331
2024-05-17 11:44:56 +00:00
Nicolas Chevobbe e39b6ccdc1 Bug 1897139 - [devtools] Share blocked request string between console and netmonitor. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D210649
2024-05-17 07:42:17 +00:00
Alexandre Poirot 4f32ffa373 Bug 1778803 - [devtools] Fix browser_target_command_scope_flag.js intermittent. r=devtools-reviewers,nchevobbe
It is always tricky to test the Browser Toolbox codepaths as you may have various targets
related to previous test/tasks which are being destroyed in middle of the test.
Here some target related to previous task were removed in middle of this assertion.

It is better to test for actual deterministic content we are expecting rather than counting targets.

Differential Revision: https://phabricator.services.mozilla.com/D210668
2024-05-16 16:55:56 +00:00
Rob Wu 9ee4da4349 Bug 1865689 - Add test case for view-source in devtools r=rpl,devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D196134
2024-05-16 14:46:57 +00:00
Nicolas Chevobbe e58349d131 Bug 1895536 - [devtools] Update network request blocked string. r=devtools-reviewers,ochameau.
Requests can be blocked because of many reasons, but the label was always
saying it was because of DevTools.
Update the label so we follow what's done in Netmonitor.

Differential Revision: https://phabricator.services.mozilla.com/D210471
2024-05-16 12:40:22 +00:00
Alexandre Poirot 5506678bac Bug 1896592 - [devtools] Better handle file:// requests. r=devtools-reviewers,bomsy
Error were thrown when trying to fetch headers and cookies, which was preventing inspecting them fully.

Fixing that, enable seeing about:neterror requests which were trigerring a file:// URI request (at least on local builds).
So that we now have to explicitly ignore these error requests.

Differential Revision: https://phabricator.services.mozilla.com/D210319
2024-05-16 08:30:22 +00:00
Nicolas Chevobbe 78c8fde8c1 Bug 1896652 - [devtools] Fix layout glitch in storage table and variable view. r=devtools-reviewers,ochameau.
The plain class that was removed in Bug 1896330 was set
on a few elements in the variable view, the table and
the chart widgets, as well as in the inspector breadcrumb.
This patch removes the plain class and adjust styling
where it's needed.

Differential Revision: https://phabricator.services.mozilla.com/D210316
2024-05-15 15:56:15 +00:00
Valentin Gosu df76ed5c04 Bug 1784496 - The necko consumers should use the priority's incremental flag r=necko-reviewers,kershaw
This patch sets the incremental flag on document and image channels

Differential Revision: https://phabricator.services.mozilla.com/D209235
2024-05-15 08:18:42 +00:00