This shouldn't have any behavior change, other than avoiding XUL / CSS
interaction issues.
I had to tweak a bit a few of the webconsole split styles to preserve
behavior (even though without the styles it ends up working out because
the collapsed console would be out of view anyways).
The reason for the changes are:
* visibility: collapse doesn't prevent min-height from applying on
modern flexbox. So just collapse it using height properly. We need to
use !important, at least on height, to override the style attribute
set by the splitter.
* Tweak the splitting setup of the console a bit more to match legacy
behavior.
* I need to contain: size on some scrollers and replaced elements so
that they flex properly rather than taking as much space as they need
(this kinda sucks but oh well). We could set min-width/height: 0
instead if you think it's easier to understand but contain is more
robust.
I needed to adjust the test since the fractional part of the container
wasn't getting rounded on my machine, but that's a pre-existing issue
that happens with my DPI settings both before and after the patch.
Differential Revision: https://phabricator.services.mozilla.com/D158183
This shouldn't have any behavior change, other than avoiding XUL / CSS
interaction issues.
I had to tweak a bit a few of the webconsole split styles to preserve
behavior (even though without the styles it ends up working out because
the collapsed console would be out of view anyways).
The reason for the changes are:
* visibility: collapse doesn't prevent min-height from applying on
modern flexbox. So just collapse it using height properly. We need to
use !important, at least on height, to override the style attribute
set by the splitter.
* Tweak the splitting setup of the console a bit more to match legacy
behavior.
* I need to contain: size on some scrollers and replaced elements so
that they flex properly rather than taking as much space as they need
(this kinda sucks but oh well). We could set min-width/height: 0
instead if you think it's easier to understand but contain is more
robust.
I needed to adjust the test since the fractional part of the container
wasn't getting rounded on my machine, but that's a pre-existing issue
that happens with my DPI settings both before and after the patch.
Differential Revision: https://phabricator.services.mozilla.com/D158183
This migrate gDevTools.showToolbox, but also the Toolbox now receives a commands right away,
and no longer need to create commands out of the descriptor front.
I'm removing browser_two_tabs as it is focusing on testing Tab Descriptors (RootFront.listTabs+getTab)
and Tab targets (TabDescriptor.getTarget).
Using getTarget on descriptor is legacy codepath for a while now.
We should now rather cover commands instead of these low level RDP methods.
Differential Revision: https://phabricator.services.mozilla.com/D157796
Note that this depends on the following patch, in order to destroy commands from the toolbox.
Commands have always been destroying the related client. This was a significant simplification in test.
So that I had to reverse the default value of shouldCloseClient and only toggle it to false
where it is strictly needed. Ideally only for about:debugging toolboxes (and two tests).
Differential Revision: https://phabricator.services.mozilla.com/D158206
Convert all imports but the one related to SessionDataHelper
as that's an hybrid module which is loaded as a JSM from the main thread,
but loaded as a common js module from the worker thread.
We will be able to drop this once we can migrate this JSM to ESM
once we support loading ESM from the worker thread.
Differential Revision: https://phabricator.services.mozilla.com/D158007
This help factorise all code trying to instantiate a server and a client everywhere.
This will also help migrate from descriptor to commands in Toolbox constructor.
A good way to track all leftover manual instantiation of descriptors is to look for mainRoot.get*.
There should only be tests now, and descriptor-from-url, which I would to convert once
we migrate toolbox constructor from descriptor to commands.
Differential Revision: https://phabricator.services.mozilla.com/D157737
This will help transition to ES Modules as we won't be able to expose a magic "chrome" ESM.
Also, most of these symbols are exposed as global already.
All but:
* `components` which is `Components`,
* `CC` which is `Components.Constructor`,
* `Cm` which is `Components.manager`.
$ sed -ie "/require(.chrome.)/d" $(git grep -l 'require("chrome")' devtools/)
+ manual edits for all three exceptions
Differential Revision: https://phabricator.services.mozilla.com/D156936
This will actually make commonjs module behave like JSM/ESM.
Where you have access to Components, Cc, Ci, Cu and Cr as globals.
This patch is based on the usage of Sandbox's wantComponents,
which will expose all these globals for us.
Then, I'm handling the special cases of Services and ChromeWorker,
which have nothing to do with Components.* APIs.
Differential Revision: https://phabricator.services.mozilla.com/D156935
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
Adding a test explicitly resizing the toolbox by manipulating the splitter in both horizontal and vertical configurations
Differential Revision: https://phabricator.services.mozilla.com/D157339
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
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 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
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
Note that it will also stop showing locale and popup settings for remote browser toolboxes.
Toolbox.isBrowserToolbox being false for this usecase.
Differential Revision: https://phabricator.services.mozilla.com/D155956
_buildTabs/_setInitialMeatballState wasn't awaited for.
So that preference front request might be pending when closing the toolbox too quickly in tests.
We should wait for all RDP requests to be completed before resolving Toolbox.open.
Differential Revision: https://phabricator.services.mozilla.com/D155872
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.
Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).
In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.
Add a debug-only assertion to ensure we preserve behavior for now.
Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.
Differential Revision: https://phabricator.services.mozilla.com/D154394
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.
Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).
In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.
Add a debug-only assertion to ensure we preserve behavior for now.
Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.
Differential Revision: https://phabricator.services.mozilla.com/D154394