Create some css variables matching the ones found in common.css (we cannot import common.css as is, as it brings too many default styles not
scoped to a specific classname etc...).
The main changes should be around the colors of links and of the selected category in the left sidebar
The separator in the sidebar also uses different colors in light/dark theme, mostly to be able to follow the base border color.
Differential Revision: https://phabricator.services.mozilla.com/D159664
This patch tries to cover a few things :-
1) The `location` object now also maintains an optional `sourceActorId` property
2) `selectSource` now takes an optional `sourceActor` argument which is used to
augument the `location` object and passed to `selectLocation` then onto
`loadSourceText` function to load the specific source text.
3) A new selector `getFirstSourceActorForGeneratedSource` to select the source actor to load the
source text.
4) `LoadSourceText`now always track the selected source actor (which should load the source text)
each time a location is selected.
Differential Revision: https://phabricator.services.mozilla.com/D155952
Depends on D156968
Cleanup of the ChannelMap class
- use private fields
- move static method to module-local method
- add comments
- rename methods to match behavior
Differential Revision: https://phabricator.services.mozilla.com/D156989
This is a very basic migration from commonjs modules to ESM for all modules related to network observation.
A few classes have been introduced instead of prototype-based classes, but otherwise the code remains mostly untouched.
We can followup to introduce private fields and methods if there's interest?
Differential Revision: https://phabricator.services.mozilla.com/D156968
ESM can't be loaded while loading.
So that Loader.jsm/sys.mjs can't load builtin-modules.js with itself loading Loader.jsm/sys.mjs.
We do that in order to inject JSM/ESM globals from builtin-modules.js.
Let's instead inject the few globals of JSM/ESM directly from Loader.
This isn't ideal, but as Loader is meant to be removed when moving to ESM...
Differential Revision: https://phabricator.services.mozilla.com/D158583
The dom::MaybeWrapValue() method was calling `isObject()` rather than
`hasObjectPayload()`, causing an assertion failure when passed a value
representing an ExtendedPrimitive (record or tuple). This was causing a crash
when evaluating a record or tuple literal either in the navigation bar or
the developer console. In addition, js::ToBooleanSlow() was missing a case
for ExtendedPrimitives, which would also cause an assertion failure in the
same scenario.
For documentation, I also added explicit assertions to dom::...Wrap...()
methods defined in BindingUtils.h that aren't expected to support
ExtendedPrimitives.
I also added placeholders for pretty-printing records and tuples in the
console (fully rendering these values is left for Bug 1772157).
Depends on D156494
Differential Revision: https://phabricator.services.mozilla.com/D148062
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
Breakpoints seem to now work with sources generated from sourcemaps where the
mappings are defined in the sections property.
Differential Revision: https://phabricator.services.mozilla.com/D158424
When using --enable-debug-js-modules in mozconfig,
today, we ship the modules with different filename and so different URLs.
This won't work once the modules will become ES Modules
as we would load the modules from a fixed URL and there won't be
any way to hack the module loader anymore.
So, we should rather have the build system to ship the right file
(production or dev version), using the same filename and URL.
Unfortunately, I didn't find any easier way to rename a file from moz.build
Differential Revision: https://phabricator.services.mozilla.com/D158665
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
To workaround the historical lack of 'white-space: pre', when an user
wants to compose HTML text with several consecutive spaces, WYSIWYG
HTML editors insert an alternating pattern of SPACE and NBSP to avoid
spaces being collapsed.
This is why browsers, when copying HTML content, usually strip all NBSP
from the copied text.
This commit changes the copying behavior, to strip only NBSP that were
potentially generated by an editor (and preserve the others).
The heuristic used is "An NBSP adjacent to a regular space doesn't make
sense, and can be replaced by a regular space". This detects the
alternating pattern of SPACE/NBSP, but also a space followed by a long
sequence of NBSP (because a line break would occur anyway in that case).
NB: included is a change that makes devtools use regular spaces
(rather than NBSPs) to indent stacktrace frames. This prevent NBSPs from
appearing in the clipboard when copying a stacktrace.
Attribution: the actual nsPlainTextSerializer changes were written by
Rachel Martin <rachel@betterbird.eu>, as a part of Betterbird.
Differential Revision: https://phabricator.services.mozilla.com/D149644
The neterror page serves a number of different use cases, which effectivly pick and choose elements from the page's DOM to display. Previously this logic was partly defined in the HTML, partly in the CSS, and partly in JS, using a couple of different methods. This change normalises all of that such that:
- All optional elements are initially hidden.
- Hiding is always controlled by an element's `hidden` attribute.
- Setting a CSS `display` style does not override the `hidden` attribute.
In addition to making the page easier to reason about, this allows for the CSS styles of the page to not be considered essential for its display, which means that they (and their dependencies) do not need to be included in `toolkit/themes/shared/minimal-toolkit.jar.inc.mn`.
The HTML and CSS of the page are also somewhat simplified, leaving out unused or unnecessary elements and styles.
Some tests affected by these changes are cleaned up to be slightly less flaky. Some are set to be skipped in verify mode under OS X, as they have a tendency to time out in chaos mode.
Differential Revision: https://phabricator.services.mozilla.com/D157726
Intrinsic sizing of scrollers affecting min-sizes of containing boxes is
one of those annoying behaviors of modern flexbox unfortunately, but
it's easy to fix using containment.
Differential Revision: https://phabricator.services.mozilla.com/D158556
Everywhere but:
* the debugger (to be done independently)
* jsonview (uses custom resource:// URLs)
* dependencies of jsonview in client/shared (reps, react, and two components)
* one dependency of performance-new (fluent-react)
This will greatly help migrating to ES Modules which don't support path and only URLs or relatives.
Differential Revision: https://phabricator.services.mozilla.com/D158324
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
Lets explicitly wait wait for the new request to get selected, as intermittently the test
likely fails beacuse we might be waiting for the request headers of the previous selected request instead
of the current one.
Differential Revision: https://phabricator.services.mozilla.com/D158345
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