Remote debugging in those method names and comments refered to e10s.
Nowadays remote debugging is rather used to talk about remote "browser" debugging, via about:debugging.
The comments give the false impression that those events are only used for about:debugging, which is not true.
Differential Revision: https://phabricator.services.mozilla.com/D93063
When a page is refreshed, the inspector fonts associated with targets within are destroyed and recreated.
The node picker didn't observe for this behavior. When a page was refreshed, it kept picking against dead fronts and ignored the newly created fronts, thus leaving users confused. This is an issue in popular web dev workflows like Hot Module Reloading, where the page may end up being refreshed. See [Bug1352121#c4](https://bugzilla.mozilla.org/show_bug.cgi?id=1352121#c4)
This patch makes the node picker listen for targets and inspector fronts as they become available or get destroyed. If node picking isn't explicitly stopped by either clicking a node or pressing the Escape key, node picking continues onto the refreshed page or to new page (same behavior as in Firefox Release).
Differential Revision: https://phabricator.services.mozilla.com/D92779
When requesting a highlighter instance, the inspector front returns one from its cache if present, otherwise it sends a request to the server create a new one.
But if multiple requests come in very quickly before the server responds to the original request, the cache is still empty so the front fires a few more requests. How many? It's arbitrary. As many as fit before the original request's promise resolves and the cache is set. This is the root cause for the issue of seeing duplicate highlighters.
The issue is more pronounced when there is congestion: many microtasks in the queue, for example when loading a heavy tool like the Inspector on a complex page.
To solve this, we store the unsettled promise to create a highlighter and explicitly wait for it to resolve while ignoring subsequent requests.
Differential Revision: https://phabricator.services.mozilla.com/D92802
Depends on D92499
Tweak an existing mock in the main process about:debugging test to check that we are not creating any target.
Differential Revision: https://phabricator.services.mozilla.com/D92553
This changeset focuses on dependencies, but surprisingly, it has an impact on bundles.
Looks like one dependency uses another revision.
Differential Revision: https://phabricator.services.mozilla.com/D92736
This changeset focus on devDependencies, but a similar work can probably be done on dependencies.
Many dependencies are justifies solely because of jest.
In order to run flow, we only need flow, and we need very few things for bin/bundle.
For me, the three things to keep working are:
* flow
* jest
* bin/bundle to rebuild vendors, reps, worker modules
The debugger frontend itself (src/ folder) is built without involving yarn/package.json.
Differential Revision: https://phabricator.services.mozilla.com/D92735
We should register the resource listeners only once.
ResourceWatcher will automatically handle re-registering the per-target listener for us.
Differential Revision: https://phabricator.services.mozilla.com/D92550
This changes the test from using a single threshold value of 300ms and testing
whether an event happens quicker or slower than that value, to instead use an
upper limit for instant events and a lower limit for delayed events. It also
disables the timer smoothing preferences and improves the error messages.
Differential Revision: https://phabricator.services.mozilla.com/D92478
This is a speculative fix. Open to suggestions if there's a better approach.
## Context
When clicking a node in the Markup view, the `MarkupContainer` for that node will shift focus to the [first editor](https://searchfox.org/mozilla-central/rev/d54210d490ef335b13fc1fcac817525120c8c46b/devtools/client/inspector/markup/views/markup-container.js#777-786) for that node's attributes. This is good for accessibility and for keyboard navigation. But when the Markup view is narrow, the effect is shifting the horizontal scroll in order to bring the editor into view.
As a mouse user, if I want to double click a node attribute to edit it, the focus shifts as soon as I click first.
This is particularly annoying for attributes at the far end of the node. I can't edit the attribute because it shifts away as the focus moves to the first editor.
A workaround is to tab through the attribute editors until I get to the desired one
Video of the effect and workaround:
{F2424060}
## Proposed fix
The proposed fix is to keep the original behavior on first click on a `MarkupContainer` (focus the first editor, shift scroll if the viewport is too narrow).
But on second click, i.e. the `MarkupContainer` is already selected, skip moving focus and allow the user to edit node attributes.
Video of the effect with the patch applied
{F2424065}
Differential Revision: https://phabricator.services.mozilla.com/D87869
The problem with `getOverflowCausingElement`s seems to be that it returned an array
of nodes that weren't properly attached to their parents.
To mitigate this, we call `attachElements` on the entire list of nodes and
return a `disconnectedNodeArray` which ensures that the returned nodes
are properly attached and therefore has all their parent node information
when calling `showNode`.
Differential Revision: https://phabricator.services.mozilla.com/D92360
Without that, we are closing the toolbox by destroying its tab or window.
This prevent correctly waiting for toolbox full destruction and was causing leaks
in debug builds on browser_webconsole_trackingprotection_errors.js and browser_aboutdebugging_devtools.js.
Differential Revision: https://phabricator.services.mozilla.com/D91917
With bug 1620280's patches, browser_dbg-windowless-workers-early-breakpoint.js started failing
because of a removed breakpoint being re-added after being removed!
This relates to the usage of `PROMISE` in the action object,
which triggers the promise middleware, itself making the action being emitted twice.
One time immediately, and another time after the promise is resolved.
So that the reducer was adding the breakpoint twice.
Differential Revision: https://phabricator.services.mozilla.com/D91720
This was relevant before as we were calling "ThreadActor.getSources"/"StyleSheets.getStyleSheets",
and by the time these requests resolved, we would have navigated to a new URL and need to ignore their response.
I think it is safe to drop this now as these requests may still be pending if we use legacy listeners,
but the call to unwatchResources should immediately unregister _onResourceAvailable and ignore any pending data
coming late.
Differential Revision: https://phabricator.services.mozilla.com/D90428
Depends on D92110
This file is requiring "devtools-config" which we want to remove. And it is not used so it can be removed.
Differential Revision: https://phabricator.services.mozilla.com/D92117
This module uses devtools-config, which should be removed.
bin/dev-server was only used for launching the debugger in standalon (via devtools-launchpad).
This setup is no longer supported and can be removed.
Differential Revision: https://phabricator.services.mozilla.com/D92110
Depends on D91859
The devtools-contextmenu package also needs devtools-modules. In order to remove devtools-modules, we need to also stop using devtools-contextmenu.
Differential Revision: https://phabricator.services.mozilla.com/D92027