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
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
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
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
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
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
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
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
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
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
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
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
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
- 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
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
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
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
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