Once upon a time (bug 862341), we decided to enable network listening by
default in DevTools.
In a general sense, that's fine. When you open a toolbox, we listen to that
tab and stop listening when the toolbox closes.
GCLI / Developer Toolbar is quite different, though. It connects to the whole
browser. This meant that enabling GCLI would start listening to network
activity in *every* tab (even though it doesn't have any way to even use that
data). This of course will slow down performance with all the extra tracking
and eat up memory with the tracked request data.
In this change, we move the step to enable network listening into the toolbox,
which seems more like what we intended anyway.
MozReview-Commit-ID: 2UYoQtWCAE1
The toolbox can get a preference front for toggling various prefs on the server.
The toolbox destruction code path was written in such a way that it would
request a preference front during toolbox destroy, only to immediately destroy
the front right after. This is extra painful, since we send a `listTabs`
request and other fun things as part of this.
With this change, we cache the preference front when it is first used, and we
only attempt to destroy it if it was previously used.
MozReview-Commit-ID: 9repQSXjdRj
This makes the new client-side mapping service available from the toolbox. Note
that it's not actually _used_ from here yet, as that will happen in separately.
MozReview-Commit-ID: 5Bq774CANfC
The existing `SourceMapService` uses server-side source maps, which we are
replacing with client-side source maps. It will be removed later in bug
1349354, but for now mark it as deprecated so we don't use it with any other
tools.
MozReview-Commit-ID: ABmWGC5asZd
This was a regression given by bug 1320149; in order to keep the performance
gain I created a lightweight object (`CommandState`) that is required from both
gcli's command and toolbox so that the last one doesn't need to be strong
coupled with the first one.
MozReview-Commit-ID: 3NcTt6i4ezx
This changes the behavior of the element picker so that when it is
cancelled the previously selected DOM node is re-scrolled into view.
Additionally the existing behavior of the keyboard shortcuts for the
element picker was broken when the devtools toolbox was docked. The main
content area was not being focused, so the keyboard shortcuts for the
element picker were not being used. When the toolbox is detached, the
focus event is still not fired, as it's not desirable to have the
content pop into view over the devtools.
Finally there is now an additional implementation of the Escape shortcut
when the devtools are focused. The console Escape shortcut is ignored
until the element picker has been disabled making disabling the element
picker consistent irrelevant of the context.
MozReview-Commit-ID: HxENmPBoTcD
This change makes use of the toolbox's textBox menu in all of the
inspector's text fields.
Previously, right-clicking in a text field in the inspector would give
various results: either the tool's context menu would open, or nothing
would happen, or the usual copy/paste/cut menu would open.
Now, right-clicking in any text field in the inspector always shows the
copy/paste/cut menu.
MozReview-Commit-ID: DwkhBqY7Qzj
Toolbox sets the dir attribute on a panel document element when loading a panel,
if the panel is using a HTML document.
Using the ForceRTL addon, the dir attribute should be automatically updated whenever
the direction is changed by the addon.
MozReview-Commit-ID: 2r18APw7IBs