Commit graph

164 commits

Author SHA1 Message Date
Nicolas Chevobbe
5bfeb8f498 Bug 1788601 - [devtools] Fix ESLint consistent-return failures in devtools/client/framework. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D156159
2022-09-12 17:41:33 +00:00
Alexandre Poirot
573f380baf Bug 1789202 - [devtools] Expose ChromeUtils as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.ChromeUtils.)/d" $(git grep -l 'require("ChromeUtils")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .ChromeUtils./d" $(git grep -l 'loader.lazyRequireGetter(this, "ChromeUtils"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js + manual eslint fixes

Differential Revision: https://phabricator.services.mozilla.com/D156402
2022-09-09 07:22:51 +00:00
Alexandre Poirot
7f9229d43d Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
2022-09-09 07:22:51 +00:00
Noemi Erli
539bbccc5d Backed out 2 changesets (bug 1780912) for causing failures in browser_aboutdebugging_addons_debug_console.js CLOSED TREE
Backed out changeset d2360a2a3d70 (bug 1780912)
Backed out changeset 21f1e9031be0 (bug 1780912)
2022-09-08 01:59:18 +03:00
Alexandre Poirot
80c9c861dd Bug 1780912 - [devtools] Make the local web extension toolbox be always on top. r=nchevobbe,eemeli
This allows to keep the DevTools visible while interacting with the Firefox
window where the extension is running.

This behavior is enabled by default, but can be disable on-demand via a button
in the top toolbar.
Note that it requires to close and reopen the window/toolbox as platform APIs
disallow changing this behavior "live" on a given window.

Differential Revision: https://phabricator.services.mozilla.com/D155843
2022-09-07 21:00:17 +00:00
Alexandre Poirot
15211b3be5 Bug 1783821 - [devtools] Manual rewrites r=bomsy
In md files and code comments and mostly from common js files.

I'm moving away from require to load sys.mjs files so that we are closer
to what we do in mozilla-central.

Differential Revision: https://phabricator.services.mozilla.com/D154073
2022-09-05 12:29:57 +00:00
Alexandre Poirot
dff3ebe085 Bug 1787992 - [devtools] Expose gDevTools.showToolboxForWebExtension to open a webext toolbox in a dedicated window. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D155950
2022-09-01 08:41:49 +00:00
Daisuke Akatsuka
22973ccbbc Bug 1783877: Disable inspector quick action if already opening. r=daleharvey,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D155191
2022-08-24 22:02:44 +00:00
Mark Banner
a6855db57e Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Alexandre Poirot
6abf4cdc59 Bug 1751207 - [devtools] Allow debugging popups when a toolbox is opened for its opener tab. r=nchevobbe
This is only an issue when devtools.popups.debug is false,
when it is true, the toolbox is move and a warning message is printed
if we request to open a new toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D136498
2022-01-24 10:16:04 +00:00
Alexandre Poirot
be162a1fe8 Bug 1569859 - [devtools] Automagically move the toolbox between the original tab we debug and its popups. r=nchevobbe
This is also behind "devtools.popups.debug", to be set to true manually.

This special mode break the old fundamental principal where a given toolbox
is bound to one unique given tab. Now one toolbox starts being shared between
many tabs.

When we select the original tab we debug, or any of its popups opened in distinct tabs,
we will move the toolbox between each of these tabs.
We will have one toolbox instance, one toolbox iframe, which will be moved
around each tab's host. This is somewhat similar to host switching within the same tab.
This is all based on the same trick where we swap the toolbox iframe to another location.

Differential Revision: https://phabricator.services.mozilla.com/D131802
2022-01-14 12:02:25 +00:00
Julian Descottes
64526df84a Bug 1735359 - [devtools] Enable DevTools auto theme by default r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D128268
2021-10-21 21:08:24 +00:00
Julian Descottes
0fd5bdd82c Bug 1735358 - [devtools] Switch back default theme from auto to light/dark r=nchevobbe
Depends on D128093

We will attempt to re-enable the auto theme by default in Bug 1735359

Differential Revision: https://phabricator.services.mozilla.com/D128239
2021-10-18 07:54:45 +00:00
Emilio Cobos Álvarez
a884350674 Bug 1670480 - Add an "auto" theme for devtools which follows the browser's color scheme. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D128093
2021-10-12 09:25:05 +00:00
Alexandre Poirot
7b8be8dd09 Bug 1722553 - [devtools] Avoid enabling server targets for WebExtension commands. r=jdescottes
WebExtension reload command is still broken with target switching.
Enabling server targets would break this on all reloads.
So prevent enabling server targets until this is fixed.

Differential Revision: https://phabricator.services.mozilla.com/D120982
2021-07-28 12:04:32 +00:00
Alexandre Poirot
c8f91a99da Bug 1699493 - [devtools] Migrate WebExtInspectedWindow front to a command. r=nchevobbe,rpl
- implement the new "inspected-window" command
- move WebExtensionInspectedWindowFront implement to the command, making the front empty
- migrate tests to use the commands instead of front
- stop maintaining the current top level target in ExtensionParent.jsm, no longer have to use watchTargets
- stop creating a new descriptor on each new target
- instead only pull one new dedicated "commands" for WebExt (still in ExtensionParent.jsm)
- remove TabDescriptor isDevToolsExtensionContext as we no longer need anything special in the descriptor
- remove now unused methods on DevToolsShims (createWebExtensionInspectedWindowFront, createDescriptorForTabForWebExtension)
- remove the now unused TabDescriptorFactory.createDescriptorForTab's "forceCreationForWebextension" option, as CommandsFactory.forTab always instantiate a brand new commands
- migrate webext to use the command instead of front

Differential Revision: https://phabricator.services.mozilla.com/D108994
2021-04-01 10:31:43 +00:00
Julian Descottes
9def83a8fd Bug 1695046 - [devtools] Use the same signature for showToolbox and showToolboxForTab r=ochameau,nchevobbe,rpl
Depends on D107100

Differential Revision: https://phabricator.services.mozilla.com/D106539
2021-03-11 06:32:15 +00:00
Julian Descottes
4d4fd23226 Bug 1694906 - [devtools] Add new option to createDescriptorForTab to support devtools webextensions r=rpl,ochameau
Depends on D106426

Without this patch queue, `createDescriptorForTab` was not caching its descriptors, so each call to it would yield a new descriptor.
Since the webextension codebase really needs to use a different target from the one used by the DevTools toolbox, suddenly sharing the Toolbox's descriptor was an issue.

Addressing it with an explicit parameter to make this expectation from the webextension codebase a bit clearer for us.

Differential Revision: https://phabricator.services.mozilla.com/D107052
2021-03-10 18:22:03 +00:00
Julian Descottes
01718819b8 Bug 1694906 - [devtools] Use descriptors instead of targets in all toolbox APIs r=ochameau,nchevobbe,rpl,perftest-reviewers,sparky
Depends on D107051

Differential Revision: https://phabricator.services.mozilla.com/D106426
2021-03-10 18:22:02 +00:00
Narcis Beleuzu
e783ef6d6e Backed out 5 changesets (bug 1694906) for dt failures on browser_target_list_frames.js . CLOSED TREE
Backed out changeset bd5cb6f8b41f (bug 1694906)
Backed out changeset c23343373584 (bug 1694906)
Backed out changeset 02428006de51 (bug 1694906)
Backed out changeset 284e000deded (bug 1694906)
Backed out changeset 3b5269fe0113 (bug 1694906)
2021-03-10 04:52:56 +02:00
Julian Descottes
7d14461043 Bug 1694906 - [devtools] Add new option to createDescriptorForTab to support devtools webextensions r=rpl,ochameau
Depends on D106426

Without this patch queue, `createDescriptorForTab` was not caching its descriptors, so each call to it would yield a new descriptor.
Since the webextension codebase really needs to use a different target from the one used by the DevTools toolbox, suddenly sharing the Toolbox's descriptor was an issue.

Addressing it with an explicit parameter to make this expectation from the webextension codebase a bit clearer for us.

Differential Revision: https://phabricator.services.mozilla.com/D107052
2021-03-09 20:50:42 +00:00
Julian Descottes
0f66091841 Bug 1694906 - [devtools] Use descriptors instead of targets in all toolbox APIs r=ochameau,nchevobbe,rpl
Depends on D107051

Differential Revision: https://phabricator.services.mozilla.com/D106426
2021-03-09 20:50:42 +00:00
smolnar
c685a0eb54 Backed out changeset 59da0caf4b8e (bug 1694906) for causing browser-chrome failures in browser_ext_addon_debugging_netmonitor. CLOSED TREE 2021-03-03 12:40:50 +02:00
Julian Descottes
6e8574d4ad Bug 1694906 - [devtools] Use descriptors instead of targets in all toolbox APIs r=ochameau,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D106426
2021-03-03 09:10:48 +00:00
Julian Descottes
deaaf67f5f Bug 1694140 - [devtools] Rename TargetFactory to TabTargetFactory and update filename r=ochameau
Depends on D106032

Differential Revision: https://phabricator.services.mozilla.com/D106037
2021-02-25 18:02:53 +00:00
Julian Descottes
6ead96bb08 Bug 1694140 - [devtools] Remove unused getTargetForTab helper on gDevTools r=ochameau
Depends on D106001

This is only used internally: https://searchfox.org/mozilla-central/search?path=&q=getTargetForTab
Can be inlined and removed from DevToolsShim

Differential Revision: https://phabricator.services.mozilla.com/D106002
2021-02-25 18:02:53 +00:00
Julian Descottes
d0f4645a76 Bug 1694140 - [devtools] Stop using TargetFactory.forTab in devtools code r=perftest-reviewers,ochameau
Depends on D105998

Differential Revision: https://phabricator.services.mozilla.com/D105999
2021-02-25 18:02:51 +00:00
Julian Descottes
953b5c230b Bug 1694140 - [devtools] Add getToolboxForTab and closeToolboxForTab helpers on gDevTools r=ochameau
Depends on D105743

Differential Revision: https://phabricator.services.mozilla.com/D105998
2021-02-25 18:02:51 +00:00
Julian Descottes
12c3715f97 Bug 1688688 - [devtools] Add a simple helper to start devtools for wptrunner r=ladybenko
The webplatform test runner recently added an option to open devtools during their tests.
The current implementation relies on TargetFactory::forTab and gDevTools::showToolbox.
Those methods will most likely change as we move away from targets and start using descriptors.

See previous WPT PR at https://github.com/web-platform-tests/wpt/pull/27309

Differential Revision: https://phabricator.services.mozilla.com/D105740
2021-02-25 18:02:50 +00:00
Brindusan Cristian
39abcde940 Backed out 10 changesets (bug 1694140, bug 1694886, bug 1688688) for devtools failures on browser_CORS-console-warnings.js. CLOSED TREE
Backed out changeset 1b7367a27d9a (bug 1694886)
Backed out changeset d5a70a3143ad (bug 1694140)
Backed out changeset 74adaced5c0a (bug 1694140)
Backed out changeset 0b8f857e3f90 (bug 1694140)
Backed out changeset 45a8dc952aba (bug 1694140)
Backed out changeset 299f17e9cb6f (bug 1694140)
Backed out changeset 6beb9dd48ef3 (bug 1694140)
Backed out changeset 5f6688e8fe4c (bug 1694140)
Backed out changeset ae1fa0484c91 (bug 1688688)
Backed out changeset 8a0f5c24ed9a (bug 1688688)
2021-02-25 16:07:39 +02:00
Julian Descottes
13d48a2ee6 Bug 1694140 - [devtools] Rename TargetFactory to TabTargetFactory and update filename r=ochameau
Depends on D106032

Differential Revision: https://phabricator.services.mozilla.com/D106037
2021-02-25 12:58:16 +00:00
Julian Descottes
2c32ed1ce4 Bug 1694140 - [devtools] Remove unused getTargetForTab helper on gDevTools r=ochameau
Depends on D106001

This is only used internally: https://searchfox.org/mozilla-central/search?path=&q=getTargetForTab
Can be inlined and removed from DevToolsShim

Differential Revision: https://phabricator.services.mozilla.com/D106002
2021-02-25 12:58:15 +00:00
Julian Descottes
5b183d1d77 Bug 1694140 - [devtools] Stop using TargetFactory.forTab in devtools code r=perftest-reviewers,ochameau
Depends on D105998

Differential Revision: https://phabricator.services.mozilla.com/D105999
2021-02-25 12:58:14 +00:00
Julian Descottes
a49f853e14 Bug 1694140 - [devtools] Add getToolboxForTab and closeToolboxForTab helpers on gDevTools r=ochameau
Depends on D105743

Differential Revision: https://phabricator.services.mozilla.com/D105998
2021-02-25 12:58:13 +00:00
Julian Descottes
050bfe4fcb Bug 1688688 - [devtools] Add a simple helper to start devtools for wptrunner r=ladybenko
The webplatform test runner recently added an option to open devtools during their tests.
The current implementation relies on TargetFactory::forTab and gDevTools::showToolbox.
Those methods will most likely change as we move away from targets and start using descriptors.

See previous WPT PR at https://github.com/web-platform-tests/wpt/pull/27309

Differential Revision: https://phabricator.services.mozilla.com/D105740
2021-02-25 12:58:12 +00:00
Alexandre Poirot
1956957ae8 Bug 1692874 - [devtools] Use descriptors instead of targets in TargetList/Toolbox r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D105200
2021-02-18 18:36:47 +00:00
Julian Descottes
e65f71419f Bug 1674977 - [devtools] Remove gDevTools::isFissionContentToolboxEnabled r=ochameau
Depends on D95686

Finally, remove the method itself.

Differential Revision: https://phabricator.services.mozilla.com/D95687
2020-11-04 18:32:37 +00:00
Julian Descottes
4952a99950 Bug 1674977 - [devtools] Always return true from gDevTools::isFissionContentToolboxEnabled r=ochameau
Depends on D95685

Keep the isFissionContentToolboxEnabled method but always return true to effectively enable all fission related behavior for all content toolboxes.

Differential Revision: https://phabricator.services.mozilla.com/D95686
2020-11-04 14:33:37 +00:00
Julian Descottes
2bf491018d Bug 1667341 - [devtools] Return a descriptor from createTargetForTab r=ochameau
Depends on D91563

Differential Revision: https://phabricator.services.mozilla.com/D91613
2020-10-15 13:34:03 +00:00
Kris Maglione
bbfbd2f113 Bug 1660057: Add preferences for Fission rollout Normandy experiment. r=nika,marionette-reviewers,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D91066
2020-09-25 02:01:15 +00:00
Razvan Maries
8de1e9f262 Backed out changeset 737f0e3e2f94 (bug 1660057) for xpcshell perma failures. CLOSED TREE 2020-09-24 23:25:54 +03:00
Kris Maglione
04dc79653a Bug 1660057: Add preferences for Fission rollout Normandy experiment. r=nika,marionette-reviewers,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D91066
2020-09-24 18:35:58 +00:00
Nicolas Chevobbe
d056b8ad0f Bug 1656888 - Make the iframe in fission_document.html a remote iframe. r=jdescottes.
fission_document.html's iframe was on example.com while the top document
is always on example.com as well, so we weren't exercising fission in it.
This patch puts the iframe on example.org, which highlighted some TargetList
test failures that this patch addresses.

Differential Revision: https://phabricator.services.mozilla.com/D85812
2020-08-05 08:27:23 +00:00
Julian Descottes
eddca6ec0a Bug 1639934 - Enable devtools.contenttoolbox.fission by default but gate it behind fission.autostart r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D79849
2020-06-17 19:46:51 +00:00
Yura Zenevich
e8b2fc41bb Bug 1635632 - ensure that the nodeFront exists before trying to inspect it or its accessibility properties. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D73987
2020-05-06 02:19:22 +00:00
Yura Zenevich
2f39083963 Bug 1610562 - take into account multiple browsing contexts when getting a node from content DOM reference. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D60545
2020-05-06 01:52:36 +00:00
Daisuke Akatsuka
1c0e943acf Bug 1604211: Introduce target-switching mechanism for devtools inspectedWindow. r=rpl,ochameau,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D66736
2020-04-24 04:35:51 +00:00
Alexandre Poirot
5df0d80f13 Bug 1605763 - Initialize browser console UI before attaching to all process targets. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D58947

--HG--
extra : moz-landing-system : lando
2020-02-13 13:46:20 +00:00
Oana Pop Rus
c66b8439b5 Backed out changeset d3dc60cc5291 (bug 1610562) for devtools failures in browser_inspector_inspect_node_contextmenu.js on a CLOSED TREE 2020-01-24 22:14:29 +02:00
Yura Zenevich
139344118f Bug 1610562 - take into account multiple browsing contexts when getting a node from content DOM reference. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D60545

--HG--
extra : moz-landing-system : lando
2020-01-22 16:26:37 +00:00