Commit Graph

59 Commits

Author SHA1 Message Date
Alexandre Poirot
59fe57c052 Bug 1793396 - [devtools] Use absolute URLs in all usages of loader.lazyRequireGetter. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D158489
2022-10-03 18:57:13 +00:00
Alexandre Poirot
caaf5fa378 Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/inspector. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158375
2022-09-30 15:17:37 +00:00
Alexandre Poirot
0f32f335e3 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
Mark Banner
3387a89bc7 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D155167
2022-08-26 13:39:34 +00:00
Kagami Sascha Rosylight
a37cf7833d Bug 1695435 - Part 2: Add more words to the chrome script heuristic in use-isInstance r=preferences-reviewers,Gijs,webdriver-reviewers,whimboo,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D110932
2022-08-24 22:47:42 +00:00
Nicolas Chevobbe
57f0463e29 Bug 1734786 - [devtools] Remove usage of Promise.jsm in devtools/client/inspector. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D127929
2021-10-11 16:30:05 +00:00
Cristian Tuns
efc1b74179 Backed out 5 changesets (bug 1384527, bug 1734786, bug 1734782, bug 1734592, bug 1734785) for causing mochitest failures. CLOSED TREE
Backed out changeset fd5088801f6d (bug 1384527)
Backed out changeset 0752e08d7ec9 (bug 1734786)
Backed out changeset 038d15951e1a (bug 1734782)
Backed out changeset a6a1a9b835f4 (bug 1734785)
Backed out changeset aca421f634ea (bug 1734592)
2021-10-11 11:06:16 -04:00
Nicolas Chevobbe
9bc14c4efa Bug 1734786 - [devtools] Remove usage of Promise.jsm in devtools/client/inspector. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D127929
2021-10-11 14:03:15 +00:00
Nicolas Chevobbe
51ae13fc7b Bug 1712739 - [devtools] Add a script command with an execute method. r=jdescottes.
This method is meant to replace the direct usage
of webconsoleFront.evaluateJSAsync.
The WebConsoleCommands file is removed, and all
client calls to evaluateJSAsync are migrated to
the new method. Callsites are simplified when
possible, and some test are refactored to switch
to spawned task to retrieve content page information.

Differential Revision: https://phabricator.services.mozilla.com/D116242
2021-06-02 13:15:06 +00:00
Ankit
4a3fcbd878 Bug 1690880 - Made label for element Edit option change dynamically depending on the element's namespace. r=sebo
Differential Revision: https://phabricator.services.mozilla.com/D106574
2021-03-02 12:51:57 +00:00
Yura Zenevich
c58a3d5490 Bug 1640778 - remove auto-init experiment code. r=mtigley,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D77057
2020-07-03 23:52:16 +00:00
Cosmin Sabou
ce90ee5587 Backed out 4 changesets (bug 1640338, bug 1640778) for devtools failures on browser_dbg-toolbox-unselected-pause.js.
Backed out changeset 92cb02f03119 (bug 1640778)
Backed out changeset 6401dd804f28 (bug 1640338)
Backed out changeset cb4edb2627bb (bug 1640338)
Backed out changeset b2394d79f48f (bug 1640338)
2020-06-30 19:59:10 +03:00
Yura Zenevich
da6e50b60d Bug 1640778 - remove auto-init experiment code. r=mtigley,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D77057
2020-06-30 14:53:07 +00:00
Yura Zenevich
e1726aea78 Bug 1602075 - display enabled Inspect Accessibility Properties menu item in inspector if devtools.accessibility.auto-init.enabled pref is set to true. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D71587
2020-05-06 15:55:06 +00:00
Andreea Pavel
4a4ab92e01 Backed out 7 changesets (bug 1602075, bug 1551574) for failing multiple dt e.g. browser_accessibility_context_menu_inspector.js on a CLOSED TREE
Backed out changeset d878be5e1884 (bug 1551574)
Backed out changeset 2b11feb2473d (bug 1602075)
Backed out changeset 1406b19b25e9 (bug 1602075)
Backed out changeset 0aa8307788b6 (bug 1602075)
Backed out changeset 418dbded9752 (bug 1602075)
Backed out changeset 2c19213df4d7 (bug 1602075)
Backed out changeset 98a4b4e8fda3 (bug 1602075)
2020-04-27 20:23:42 +03:00
Yura Zenevich
0efa17ac1a Bug 1602075 - display enabled Inspect Accessibility Properties menu item in inspector if devtools.accessibility.auto-init.enabled pref is set to true. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D71587
2020-04-27 14:16:03 +00:00
Csoregi Natalia
1bb2ccdf94 Backed out 6 changesets (bug 1602075) for devtools failures caused by markup-context-menu.js. CLOSED TREE
Backed out changeset cf06e30be068 (bug 1602075)
Backed out changeset 51f01135d82f (bug 1602075)
Backed out changeset fbb30bd09d66 (bug 1602075)
Backed out changeset e1e570497527 (bug 1602075)
Backed out changeset 3aa7f4f31934 (bug 1602075)
Backed out changeset 7d568f0fa1e4 (bug 1602075)
2020-04-23 19:03:05 +03:00
Yura Zenevich
e8a007173b Bug 1602075 - display Inspect Accessibility Properties menu item in inspector if devtools.accessibility.auto-init.enabled pref is set to true. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D71587
2020-04-23 14:40:25 +00:00
Jason Laster
9d007fdfee Bug 1624630 - Simplify the selected thread logic. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D68095
2020-03-26 12:50:46 +00:00
Jason Laster
33fbc4889f Bug 1605175 - Selecting an element in remote iframe should switch context and update selector. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D67083
2020-03-24 15:28:52 +00:00
Lina Refai
b751b88466 Bug 1590196 - Remove unneeded backward compatibility check hasAccessibilityProperties; r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D62192
2020-02-10 13:23:12 +00:00
Nicolas Chevobbe
e93d973ee2 Bug 1611682 - Fix show DOM properties. r=rcaliman.
This patch work around the fact that the `inspect` command
is used for different purpose:
- open the evaluated element in the inspector/debugger
- expand a given object in the console

In order to do that, a second parameter is added to indicate
which usage we do want.
This is not pretty, but I can't see something as straightforward
to fix this issue.
Given that there's plan to have a properties sidebar in the
inspector, it might be enough for now.

The existing test is modified to check that the object is indeed
expanded in the console.

Differential Revision: https://phabricator.services.mozilla.com/D61662
2020-02-05 15:23:10 +00:00
Nicolas Chevobbe
78ac5b16fd Bug 1601630 - Remove WebConsoleUI evaluateJSAsync. r=jlast.
This method was directly using the main target console front
to evaluate something, which could cause issue in a fission
world.
The function is moved to the WebConsole class, and calls commands
evaluateJSAsync, in which we retrieve the appropriate front
given the given options object (e.g. if there's a selecteObjectActor,
we'll talk to the target that hold the actor).

Differential Revision: https://phabricator.services.mozilla.com/D55986
2019-12-06 08:29:20 +00:00
Emilio Cobos Álvarez
b2d8637998 Bug 1600084 - Allow to edit a ShadowRoot's html, by modifying its inner, not outerHTML. r=jdescottes
Turns out this was pretty easy to support, and I think it is useful.

Differential Revision: https://phabricator.services.mozilla.com/D55131
2019-11-28 23:08:51 +00:00
Emilio Cobos Álvarez
5f7309c15c Bug 1598944 - Allow to paste innerHTML in fragments. r=jdescottes
No reason not to.

Differential Revision: https://phabricator.services.mozilla.com/D55098
2019-11-28 14:39:55 +00:00
Emilio Cobos Álvarez
389f5fc3e9 Bug 1598944 - Rename isSelectionElement to isElement in markup-context-menu.js. r=jdescottes
Depends on D54422

Differential Revision: https://phabricator.services.mozilla.com/D55096
2019-11-28 13:55:59 +00:00
Emilio Cobos Álvarez
c20909433d Bug 1598944 - Allow to copy innerHTML of document fragments (including ShadowRoot). r=jdescottes
As they have an innerHTML property, and it is useful.

I didn't find relevant tests for this. browser_inspector-traversal.js tests only
the server bits.

Differential Revision: https://phabricator.services.mozilla.com/D54422
2019-11-28 12:02:43 +00:00
Gabriel Luong
373303b932 Bug 1586801 - Use the contextual WalkerFront in _duplicateNode(). r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D48442
2019-10-08 07:07:02 +00:00
Gabriel Luong
4bf9cfe3f0 Bug 1586800 - Use the contextual WalkerFront in _deleteNode(). r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D48439
2019-10-08 06:59:39 +00:00
Alexandre Poirot
eda0503941 Bug 1578426 - Rename Inspector.target to Inspector.currentTarget. r=pbro
Rename this attribute to better significate that the target is
changing over time when the debugged target navigates to another process.

Differential Revision: https://phabricator.services.mozilla.com/D44632
2019-09-05 14:17:20 +00:00
David Walsh
c215f445e2 Bug 1575671 - Improve DOM Mutation breakpoints test r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D42964
2019-08-21 22:14:18 +00:00
Nicolas Chevobbe
290ba5cb21 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300
2019-08-19 12:48:16 +00:00
David Walsh
2e1b24d913 Bug 1569216 - Implement DOM Mutation Breakpoints UI for the debugger r=loganfsmyth
Differential Revision: https://phabricator.services.mozilla.com/D39517
2019-08-13 02:35:50 +00:00
Nicolas Chevobbe
b71ffcdf97 Bug 1441711 - Create multiple proxies when in Fission Browser Console. r=ochameau.
When opening the Browser Console, if the browser toolbox fission pref
is enabled, we create a WebConsoleConnectionProxy for each process.
This allow us to not start the ContentProcessMessages listener (that
uses ContentProcessMessagesForward), but directly connect to the content
process, to get fully inspectable console message, from the Browser Console.

We keep the this.proxy reference in WebConsoleUI to represent the "main" target
proxy, and we add an `additionalProxies` property that represent proxies
for other targets we connect to (e.g. content process targets).
We then have a function to list all the proxies we're handling, in order to
be able to do tasks on all of them (e.g. clearing cache, network message, ...)

We also take this as an opportunity to add a `evaluateJSAsync` at the
WebConsoleUI level so callsites don't retrieve the proxy.webConsoleClient
themselves.

Differential Revision: https://phabricator.services.mozilla.com/D40786
2019-08-08 13:23:03 +00:00
Nicolas Chevobbe
80d2f1cc80 Bug 1568143 - Don't use JsTerm reference to evaluate code. r=jdescottes.
JSTerm `execute` function is renamed to `_execute` to emphasize
that it's a private function.
A `dispatchEvaluateExpression` is added to the WebConsoleWrapper
so other panels can use that if they need to.
A test helper is added to be able to evaluate without grabbing
the jsterm reference, and tests are modified to use the new
helper, or the existing `executeAndWaitForMessage`.

Differential Revision: https://phabricator.services.mozilla.com/D39024
2019-08-02 11:50:28 +00:00
Nicolas Chevobbe
25a1093676 Bug 1567174 - Move expression evaluation to a proper Redux action. r=jdescottes.
The goal is to not directly use the panel.hud.ui.proxy reference
directly from the JsTerm, so we're in better shape when Fission
comes.
It's also a nice refactor to make the JSTerm component more
React-like.
As a nice benefit, we can handle telemetry and history persistence
from their middleware.
As the `requestEvaluation` method is removed from the JSTerm, some
callsites needed to be updated to still work.

Differential Revision: https://phabricator.services.mozilla.com/D39022
2019-08-02 11:49:21 +00:00
Ciure Andrei
74372a9da1 Backed out 2 changesets (bug 1568143, bug 1567174) for causing browser_ext_addon_debugging_netmonitor.js to perma fail CLOSED TREE
Backed out changeset a8faaa1c722e (bug 1568143)
Backed out changeset 5dddaeb1e952 (bug 1567174)
2019-08-02 00:50:34 +03:00
Nicolas Chevobbe
a81a1e8f40 Bug 1568143 - Don't use JsTerm reference to evaluate code. r=jdescottes.
JSTerm `execute` function is renamed to `_execute` to emphasize
that it's a private function.
A `dispatchEvaluateExpression` is added to the WebConsoleWrapper
so other panels can use that if they need to.
A test helper is added to be able to evaluate without grabbing
the jsterm reference, and tests are modified to use the new
helper, or the existing `executeAndWaitForMessage`.

Differential Revision: https://phabricator.services.mozilla.com/D39024
2019-08-01 06:52:25 +00:00
Nicolas Chevobbe
c2ebae7e8a Bug 1567174 - Move expression evaluation to a proper Redux action. r=jdescottes.
The goal is to not directly use the panel.hud.ui.proxy reference
directly from the JsTerm, so we're in better shape when Fission
comes.
It's also a nice refactor to make the JSTerm component more
React-like.
As a nice benefit, we can handle telemetry and history persistence
from their middleware.
As the `requestEvaluation` method is removed from the JSTerm, some
callsites needed to be updated to still work.

Differential Revision: https://phabricator.services.mozilla.com/D39022
2019-08-01 06:47:41 +00:00
Gabriel Luong
12587ec458 Bug 1567276 - Refactor inspector to inspectorFront. r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D38554
2019-07-18 15:33:55 -04:00
Victor Porof
b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
Gabriel Luong
904f583885 Bug 1550030 - Part 1: Implement the DOM mutation breakpoint context menu items in the markup view. r=loganfsmyth,jdescottes
This implements the context menu items for the DOM mutation breakpoint.
In addition, there were some server changes to:
- Update the mutationBreakpoints form for the NodeActor
- Expose the mutationBreakpoints form
- Moved the setMutationBreakpoints method from the Node spec to Walker spec
since the Node spec only consisted of getter methods. It made more sense
that the setter went into the Walker spec to be more consistent with how
the Walker and Node spec have been arranged.

Unit tests will be followed up in Part 2 immediately.

Differential Revision: https://phabricator.services.mozilla.com/D36074
2019-06-26 15:16:22 -04:00
Gabriel Luong
45c5168984 Bug 1548703 - Rearrange the markup context menu items. r=rcaliman
This patch rearranges the second and third group of context menu items
in the markup context menu.

Differential Revision: https://phabricator.services.mozilla.com/D35675
2019-06-24 13:12:10 -04:00
Razvan Caliman
59765734eb Bug 1555064 - (Part 2) Centralize the list of supported pseudo-classes. r=gl
Depends on D32867

Reference the shared list of pseudo-elements throughout the codebase:
- markup view context menu + test
- Rule editor
- box model highlighter
- node actor
- new Rules view

Differential Revision: https://phabricator.services.mozilla.com/D32868
2019-05-30 16:14:53 +00:00
Razvan Caliman
9a68f0d9ed Bug 1552275 - Fix Copy Link context menu in DevTools Inspector markup view. r=gl
- Fixes the references to the correct event handler & InspectorFront after a previous mass refactoring in Bug 1529364.
- Augments a test to ensure the clipboard content is correct executing the context menu action to copy a link.

Differential Revision: https://phabricator.services.mozilla.com/D31765
2019-05-20 16:03:00 +00:00
Julian Descottes
395ede7256 Bug 1543940 - Use the toolbox top window for context menus r=ochameau
Depends on D28036

If a context menu is opened in the toolbox document when running in a frame with type=content, keyboard navigation will not move to the context menu when it's opened.

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

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

Differential Revision: https://phabricator.services.mozilla.com/D28036
2019-05-08 21:35:36 +00:00
Andreea Pavel
368a7a0194 Backed out 5 changesets (bug 1543940) for failing browser_menu_api.js on a CLOSED TREE
Backed out changeset aaa0f827616a (bug 1543940)
Backed out changeset 590b72185b69 (bug 1543940)
Backed out changeset 42e2136f684f (bug 1543940)
Backed out changeset a66967f17042 (bug 1543940)
Backed out changeset b1e6e932873c (bug 1543940)
2019-05-08 20:49:43 +03:00
Julian Descottes
1d66f6eb50 Bug 1543940 - Use the toolbox top window for context menus r=ochameau
Depends on D28036

If a context menu is opened in the toolbox document when running in a frame with type=content, keyboard navigation will not move to the context menu when it's opened.

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

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

Differential Revision: https://phabricator.services.mozilla.com/D28036
2019-05-08 15:13:40 +00:00