This patch removes the old grid highlighter management logic. Some of it is gradually replaced by commits later in this series.
The diff with changes made in D99591 turned out very hairy and difficult to follow. To ease review, I completely removed some methods here and reintroduced them in D99591.
Unless otherwise stated, the contents of `showGridHighlighter()`, `hideGridHighlighter()`, `showParentGridHighlighter()` and `hideParentGridHighlighter()` may be considered completely rewritten.
If it helps, you may view the patches side-by-side to observe the difference (the diff view [looked very confusing](https://phabricator.services.mozilla.com/D99591?vs=on&id=378317#toc)).
In summary, the changes in this patch are:
- removed the separate parent grid highlighters map (`parentGridHighlighters`) and subgrid-to-parent mapping (`subgridToParentMap`); this information will be contained in the values of the `gridHighlighters` map which holds all instances of active grid highlighters (added in D99591)
- removed the cache pool for unused highlighters (`extraGridHighlighterPool`); with multi-process separation, this became unnecessarily complex
- removed `_getGridHighlighter()`; replaced with generic highlighter getter in D99591
- removed `destroyGridHighlighters()` reliant on the obsolete maps; replaced with consolidated highlighter destroy approach in D99591
Differential Revision: https://phabricator.services.mozilla.com/D99606
When the user edits a stylesheet in the StyleEditor, an `_isUpdating` flag is toggled,
and a request is sent to the server to actually apply those changes to the stylesheet.
It then causes a style-applied event to be emitted (or the stylesheet resource
to be updated, if watcher support is enabled for stylesheet).
In the end, this triggers the onStyleApplied function in the StyleEditor, where
we check if the `_isUpdating` flag is true (to know if the event was caused
through editing in style editor), and if not, replace the stylesheet content.
Unfortunately there's a race condition when the user is typing (and sending
multiple requests to the server), as the state of the _isUpdating flag could
be wrong if a new request is sent before the first one is handled.
This is probably highlighted with the throttling we're doing in the Resource API.
To fix this issue, we add a new `cause` parameter to the StyleSheets.update method,
which we set to `styleeditor` when calling update within the StyleEditor.
This `cause` parameter is then sent back by the server to the client (via the
style-applied event, or the resource update if we have Watcher support for stylesheets).
This `cause` can be checked by the StyleEditor client, and replace the check
on `_isUpdating`.
However, we need to keep the `_isUpdating` property to handle backward compatibility.
Differential Revision: https://phabricator.services.mozilla.com/D99862
Disabling browser_net_block-csp.js as it fails with fission enabled.
Bug 1682153 details the issue, and the test would be enabled when this
bug is fixed.
Differential Revision: https://phabricator.services.mozilla.com/D99626
When pausing in a content process script in the Browser Toolbox (e.g. somewhere
in devtools/server), we tried to display the PausedDebuggerOverlay, which was
causing an error to be displayed in the CanvasFrameAnonymousContentHelper, as
we didn't have access to a documentElement property it needed.
This happens because the _canShowOverlay method in the thread actor was only
checking for the presence of a window property on the target actor.
Unfortunately, the ContentProcessTargetActor does expose a window getter, which
is a Sandbox, and thus doesn't have a document.
This patch modifies the _canShowOverlay function to check that we do have access
to a documentElement.
Differential Revision: https://phabricator.services.mozilla.com/D99899
We used to set the `mousemove` event listener on the document once the drag
started, so we could track mouse movement outside of the drag element.
This can now be done another way, using `setPointerCapture`, so we can have the
event listener directly on the element, and not on the document anymore.
A few tests that were dispatching mousemove events from the document are updated.
Differential Revision: https://phabricator.services.mozilla.com/D99863
This fix pretty-printing of async functions in console. A test case is added
to make sure we don't regress.
We used to copy the library tests and run them in xpcshell. The tests changed
a lot, and I don't think we get much value running tests that are already ran on
the project CI (we do have a few tests that checks that we get the output we want)
, so this patch remove the xpcshell test and the associated files.
The upgrade documentation is updated to remove some unecessary steps:
- no need to rename the exported module for each file
- no need to replace the acorn module, since what's in the file is just a subset
of the library (~100 lines)
- no need to update the test file, which doesn't seem to exist anymore
Differential Revision: https://phabricator.services.mozilla.com/D99320
Depends on D96730
This patch refactors slightly the way flexbox highlighters are restored when the page is refreshed while a highlighter is active.
To account for Fission, we store the `browsingContextID` of the target in addition to the node's unique selector, in order to match again the node after refresh and show a flexbox highlighter for it.
The events emitted are renamed to more generic versions "highlighter-restored" and "highlighter-discarded". They contain the highlighter type in the event data payload. Tests are updated accordingly.
Also made slight changes to the grid highlighter restore logic and corresponding tests in order to use the new generic events and test helpers. The bulk of the refactoring for grid highlighters will happen in [Bug 1572652](https://bugzilla.mozilla.org/show_bug.cgi?id=1572652)
Differential Revision: https://phabricator.services.mozilla.com/D97660
Depends on D96449
Introduced two generic callbacks to `HighlightersOverlay`:
- `_afterShowHighlighterTypeForNode()` called after a highlighter is shown, but before emitting the "highlighter-shown" event that listeners react to
- `_beforeHideHighlighterType()` - called before an existing highlighter is hidden.
This allows us to move the telemetry logging methods for the Flexbox highlighter into these generic callbacks. The Grid highlighter will benefit from this too since it uses similar telemetry logging.
In an upcoming patch I will also move the logic to save metadata about the highlighter state in order to be able to restore it after page refresh.
Differential Revision: https://phabricator.services.mozilla.com/D96730
Depends on D96081
This patch builds upon the generalization in D96080 to update the Flexbox sidebar panel from the Inspector Layout panel to:
- listen to the generic highlighter events, "highlighter-shown" and "highlighter-hidden" and check for the flexbox highlighter type;
- use generic getter to get the node highlighted by the flexbox highlighter.
The corresponding tests are updated to use the generic highlighter events and test helpers.
Differential Revision: https://phabricator.services.mozilla.com/D96449
Depends on D96225
This patch removes event listeners for flexbox and grid highlighter events from individual nodes in the Markup view in favor of a delegated event handler at the panel level. It is similar to the approach introduced in D90247 for the selector highlighter in the Rules view (which will also be leveraged for the flexbox highlighter swatches in the Rule view).
This removes substantial duplication and a bit of ping-pong to enable/disable event listeners. It can also have a mild positive performance impact on documents with many flexbox & grid badges.
I updated both flex and grid badges in this patch for clarity and uniformity. To do that, I had to introduce emitting generic highlighter events for the grid highlighter as well. The bulk of the work for the grid highlighter will happen in [Bug 1572652](https://bugzilla.mozilla.org/show_bug.cgi?id=1572652).
Differential Revision: https://phabricator.services.mozilla.com/D96081
Depends on D96080
This patch leverages work done in D90247 for the `SelectorHighlighter`. Here, we delegate event handling of clicks on flexbox swatches next to "flex" and "inline-flex" CSS properties up to the Rules view. This will toggle the Flexbox highlighter from a single place in the Rules view.
When the Flexbox highlighter is shown/hidden, the swatches are marked "active" accordingly. We don't differentiate which swatch to mark if there are multiple "flex" properties. Only properties matching the selected node are shown. `display` is not an inheritable property so there will be only one winning `display: flex` declaration for the selected node. Even if there are duplicates, they will be marked overwritten. Swatches are hidden for overwritten properties. This eases the work when toggling some of the duplicates, the winning one will already show an "active" swatch.
This patch looks more scary than it is. The changes in tests are mass-renames to a new CSS class name and to use the same helpers.
It's easier if you start reviewing `highlighters-overlay.js`, then `text-property-editor.js`, then `rules.js`.
Differential Revision: https://phabricator.services.mozilla.com/D96225
Depends on D96079
This patch begins the work to make invoking the Flexbox highlighter process-agnostic. It replaces the direct-access methods that use the top-level inspector front with methods to show/hide highlighters corresponding to the nodes' respective inspector fronts.
There are other patches in this series which incrementally refactor the logic.
Known broken here, but updated in patches down the line:
- restoring active flexbox highlighters on refresh
- hiding highlighters when their target node or display type changes in remoted frames use cases
Differential Revision: https://phabricator.services.mozilla.com/D96080
Depends on D96078
Following the technique introduced in [Bug 1623906](https://bugzilla.mozilla.org/show_bug.cgi?id=1623906), remove the prop-drilled method to toggle the flexbox highlighter with a thunk dispatched from a deeply nested React component.
In a follow-up bug, I will also migrate the `onSetFlexboxOverlayColor` method and remove the awkward indirection in this flow: `flexbox.js` -> `layout.js` -> `LayoutApp` -> `Flexbox`.
Differential Revision: https://phabricator.services.mozilla.com/D96079
When selecting something in the rule view, if the user
moused up right onto the enable/disable rule checkbox,
and then tried to copy the selection, the clipboard was empty.
This is due to copySelection checking the target of the copy
event and doing something special if it is an input or a textarea.
To fix this, we add an extra check to test if the input isn't
a checkbox.
A test case, failing without the fix, is added to ensure we don't
regress this.
Differential Revision: https://phabricator.services.mozilla.com/D99425
And have it mirror in the parent process more automatically.
The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...
BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.
Differential Revision: https://phabricator.services.mozilla.com/D96072
The watcher trait might not be set on other descriptors, so
we want to keep them until we can get rid of the generic client
code that is handling them. This can probably be done as part of Bug 1680280.
Differential Revision: https://phabricator.services.mozilla.com/D98737
Those methods are used in the client, so we don't want to remove them.
The original comment was only here to indicate when it was added.
Differential Revision: https://phabricator.services.mozilla.com/D98733
The code might still be used in the future for the storage inspector, so we can
remove the backward compat comment, and add more context around those lines.
Differential Revision: https://phabricator.services.mozilla.com/D98732
Older server didn't have the `completed` property, and we needed to rely on the
`progress` one. `completed` was added in 79, so we'll always have access to it now.
Differential Revision: https://phabricator.services.mozilla.com/D98731
Older message had a _type property and a different shape,
so we needed to transform them.
We shouldn't get those anymore since 78, so we can remove that code.
Differential Revision: https://phabricator.services.mozilla.com/D98729
The trait was added in 76, so we can safely remove it.
This allows us to cleanup retrieveAsyncFormData, that
we rename to retrieveFavicon to better represents what it does.
Differential Revision: https://phabricator.services.mozilla.com/D98728
The trait was added in 72, so it's safe to remove it now.
With the trait removed, the onDeclarationUpdated method in rule.js
was no longer called, so we can remove it as well.
Differential Revision: https://phabricator.services.mozilla.com/D98723
Since we now always have a contentDomReference in grips, we
don't need to fallback on gripToNodeFront.
And since gripToNodeFront was only used from getNodeFrontFromNodeGrip,
we can remove it, as well as the walker actor method getNodeActorFromObjectActor.
We also had to get a content reference from a rendered Reps in the console, for
the "Reveal in inspector" context menu entry, so we stringigy it in a data attribute.
Differential Revision: https://phabricator.services.mozilla.com/D98720
When evaluating an expression containing console api calls,
it might happen that the result message is handled by the
client before the console api messages.
This is due to the fact that those messages are handled by
the resource watcher, which throttles resources, whereas
the result message is directly added from the webconsole
frontend.
In the console reducer we already have code handling out-of-order
messages, but it is only triggered for messages with different
timestamps; in our case, the timestamp of the result message
might be the same as the one of the console api messages.
To fix this issue, we simply add an extra millisecond on the
evaluation result packet, which will ensure it will have a
distinct timestamp from the console api messages it might
have triggered, with minimal risk of side effects.
The existing test for ordering is enhanced by logging multiple
messages, and it is failing quite frequently without the fix.
Differential Revision: https://phabricator.services.mozilla.com/D99205
The trait were added in 81 and 82, so we can safely remove them now.
We take this opportunity to bail early in setDefaultpreferencesIfNeeded
when there's no default preferences to set.
Differential Revision: https://phabricator.services.mozilla.com/D98498
Those methods were only kept for backward compatibility in the spec file, so we
can remove them from here.
`getText` is still used from the `StyleSheetFront#guessIndentation`, so we remove
the backward compat comment, and add more information on it.
The methods on the actor can't be removed as they're still called from the StyleSheetsActor
to support servers that don't use the resource watcher for stylesheets.
A test that was using those methods was updated.
Differential Revision: https://phabricator.services.mozilla.com/D98494
The trait were added in 81 and 82, so we can safely remove them now.
We take this opportunity to bail early in setDefaultpreferencesIfNeeded
when there's no default preferences to set.
Differential Revision: https://phabricator.services.mozilla.com/D98498
Those methods were only kept for backward compatibility in the spec file, so we
can remove them from here.
The methods on the actor can't be removed as they're still called from the StyleSheetsActor
to support servers that don't use the resource watcher for stylesheets.
A test that was using those methods was updated.
Differential Revision: https://phabricator.services.mozilla.com/D98494
The analyzeInputString function tried to handle escape characters in strings,
by having a dedicated ESCAPE state.
Unfortunately, when in ESCAPE state, the code will always re-assign the NORMAL state.
So if at some point the string was terminated, the code would assume we were entering
a string state again.
In the end, this would cause the autocomplete to fail, because the JSPropertyProvider
would think that it was passed an unterminated string literal.
This is fixed by introducing quote-specific escape state, so we know which state to get
back in once the escape character is consumed.
A few test cases are added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D98754
Not doing that, makes the browser_resources_sources.js test to fail because
of pending SW's target which comes with unexpected sources.
Differential Revision: https://phabricator.services.mozilla.com/D98460
This helps cover the workaround put in ResourceWatcher in order to trigger
the SOURCE legacy listener for targets that we don't yet support in the Watcher actor.
Differential Revision: https://phabricator.services.mozilla.com/D98438
This patch adds a script which is similar to the one that was written in the README.md file.
This goes along with a simple package.json that let's us have a simple command
to execute the update script.
The README file is updated as well to reflect this new script.
Differential Revision: https://phabricator.services.mozilla.com/D98912
My editor formats this file automatically when I need to change something here,
and it's annoying to exclude these when I need to change something in this
file. I guess it doesn't hurt to format it so we won't have to do that again.
Differential Revision: https://phabricator.services.mozilla.com/D91266
The changes should be trivial.
The third_party changes are up for review in
https://github.com/servo/rust-cssparser/pull/277 (and of course I'll
land with a bump to 0.28 rather than the override after that gets r+'d).
The basic idea is that with this we have the actual start offset of the
rule, so we wouldn't include html comments or other invalid stuff we
discard during sanitization in bug 1680084. But that's a separate
change.
Differential Revision: https://phabricator.services.mozilla.com/D98677
We weren't handling the error exception object in the Error previewer for
some error classes, and as a result we'd show an undefined grip in the console,
instead of a proper error message.
A test is added to check that we do print wasm errors as expected.
Differential Revision: https://phabricator.services.mozilla.com/D98469
My editor formats this file automatically when I need to change something here,
and it's annoying to exclude these when I need to change something in this
file. I guess it doesn't hurt to format it so we won't have to do that again.
Differential Revision: https://phabricator.services.mozilla.com/D91266
Those traits are going to be removed in Bug 1680280,
and not through the regular backward-compatibility cleanup routine.
Differential Revision: https://phabricator.services.mozilla.com/D98483
The function was taking care of removing old addons.
It landed 2 years ago, so we can assume that we don't
need that anymore.
Differential Revision: https://phabricator.services.mozilla.com/D98465
Prior to Firefox 68, worker target didn't have a unique id,
and we were relying on their actor id in a few places.
Now that we should have the id everywhere, we can remove
the backward compatibility code, and simplify some of
the logic.
Differential Revision: https://phabricator.services.mozilla.com/D98464
This is useful for SOURCE resource, as that's one resource that we expect to
fetch from all targets, but Service Worker and Shared worker targets aren't supported
yet by the watcher. So we should be using legacy listener for these.
Differential Revision: https://phabricator.services.mozilla.com/D97631
The test is quite simple as it checks the state of the buttons as we cycle through
it, and checks that the rule view does show the expected applied rule when
simulating a color scheme.
Even if the color scheme simulation is behind a pref, this simple test will help
avoid regression. It also highlights that the feature does not work on remote
iframe when Fission is enabled, which is why we tag it as `fail-if = fission`.
Differential Revision: https://phabricator.services.mozilla.com/D98047
This patch updates the modes file for javascript.
It fixes particularly the issue with the source editors syntax highlighting issue, caused by the usage
of optional chaining inside template strings.
It also benefits of any other improvements that have been made.
Differential Revision: https://phabricator.services.mozilla.com/D98106
The helper wasn't working for element in remote frame when Fission was enabled.
We fix this by first retrieving the iframe associated target front and related
walker front.
Then we can check if the walker is different from the top-level one, and call
`querySelector` with the appropriate queryNode.
Differential Revision: https://phabricator.services.mozilla.com/D98046
This turns all existing backward compatibility comments (or
comments mentioning a specific Firefox version), into the new
syntax we agreed upon in Bug 1673535.
Differential Revision: https://phabricator.services.mozilla.com/D97395
Before showing the pause overlay, we wait for the page to be fully loaded.
This introduced some delay, and at the moment we were showing the overlay, the
debugger could not be paused anymore.
This patch adds another check to ensure the debugger is paused, as well as a
test to avoid regression."
Differential Revision: https://phabricator.services.mozilla.com/D97778
In Bug 1673328, the signature of the resume function was modified,
but we missed that the function was called from the paused overlay,
which means we didn't pass the correct signature anymore, and buttons
of the paused overlay weren't working at all.
This patch fixes the callsite and adds a mochitest where we go
through a simple case of pausing and then stepping and resuming
by clicking on the overlay buttons.
Since the pause overlay is different from the other highlighters
for which we already had test helpers, we needed to add dedicated
test helpers for the pause overlay, in the test actor.
Differential Revision: https://phabricator.services.mozilla.com/D97757
In Bug 1673535, we agreed on a specific pattern for backward compatibility comments,
so this patch documents this syntax on our backward compatibility document.
We take this as an opportunity to reword the section where we talked about removing
old backward compatibility code, as well as adding another way of testing backward compatibility.
Differential Revision: https://phabricator.services.mozilla.com/D97320
In Bug 1575068, the message of CORSMissingAllowHeaderFromPreflight and CORSPreflightDidNotSucceed
changed, and the category field was updated in the nsIErrorMessage. As a result, the keys in
errordocs.js needed to be changed, which was rightfully done, but the value was changed as well,
which means the resulting url of the Learn more links were modified as well. I'm not sure if
something changed since then, but those 2 urls now lead to 404 pages on MDN.
This patch fixes those URLs to ensure we do link to the right MDN pages.
Differential Revision: https://phabricator.services.mozilla.com/D97129
The preference print.tab_modal.enabled drives the usage of the print preview UI and is only set to true on EARLY_BETA_OR_EARLIER.
Force the pref in the test to avoid failures after late beta.
Differential Revision: https://phabricator.services.mozilla.com/D97448
This avoids instancing twice the different storage type actors (legacy and resources). In order to keep current server tests working, a pref to force instancing legacy actors has been introduced.
Differential Revision: https://phabricator.services.mozilla.com/D97287
Depends on D97153
DevTools window actors rely on sendQuery for 2 APIs: instantiateTarget and addWatcherDataEntry.
If an exception occurs in the child actor, it will be propagated back to the parent, which will reject the sendQuery.
This can make the code revolving around those APIs very fragile. Since this code is involved in setting up the initial targets, it could be nice to catch errors there to avoid too many potential blank toolbox situations.
Differential Revision: https://phabricator.services.mozilla.com/D97155
DevToolsFrameChild actor excludes about:blank windows to avoid creating unnecessary targets.
In the parent process we are supposed to also exclude about:blank windows when fetching the browsing-contexts that should be debugged.
However the parent-process logic relies on checking the documentURI to exclude about:blank. The actor relies on a docShell flag called hasLoadedNonBlankURI.
The printpreview browser element uses an about:blank window, but still displays a document different from about:blank.
Consequently the parent process check considers this document as valid, because of its documentURI.
But the child actor throws because of the hasLoadedNonBlankURI flag.
This changeset adds an additional check for `window.document.documentURI` in the child actor.
Also adds a new mochitest to check that we can open the BrowserToolbox and inspect the print preview
Differential Revision: https://phabricator.services.mozilla.com/D97153
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.
This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.
Differential Revision: https://phabricator.services.mozilla.com/D94641
The ObjectInspector might be used in the inspector by extension
using the setExpression API. When we moved reps to a dedicated
folder and split it so it does not contain objectInspector bits
anymore (in Bug 1669956), we forgot to include Tree.css and ObjectInspector.css
in the inspector panel, resulting in weird styling for the side panel.
This patch includes the missing CSS files, which fixes the issue.
Differential Revision: https://phabricator.services.mozilla.com/D97126
We cannot use swapFrameLoaders between a fission and a non fission window. We should make sure to open non-fission windows if the current host is not a fission one.
Differential Revision: https://phabricator.services.mozilla.com/D96696
Change the logic in the devtools/server/actors/highlighters.js file to
use absolute paths instead of constructing them from an internal helper
function. Also modify the calls to `register` at the bottom of the file
according to this change.
Differential Revision: https://phabricator.services.mozilla.com/D96301
This also removes pref overrides from methods like LocaleService::IsLocaleRTL or
IntlService.getLocaleInfo, because it doesn't really make sense to override the
result of checking an arbitrary locale, the relevant use case is overriding the
result for the current app locale.
Removal of the intl.uidirection pref completely will be done in a separate bug.
Differential Revision: https://phabricator.services.mozilla.com/D96235
It looks like the test was hitting the timeout limit on slow hardware (e.g. on
linux ccov on TRY).
Requesting a longer timeout seems to fix the failure.
Differential Revision: https://phabricator.services.mozilla.com/D96405
This change removes docshell's `mTouchEventsOverride` and replaces it
with a new `BrowsingContext` field `TouchEventsOverrideInternal`.
All uses of the old field have been replaced and an override should
now work under fission when there are cross-origin descendent frames.
Differential Revision: https://phabricator.services.mozilla.com/D96414
This removes the few mentions of the launchpad that were
still existing in the debugger codebase.
We take this as an opportunity to use the #mount element
as the root of the React app (instead of creating a new
div for it).
Depends on D96384
Differential Revision: https://phabricator.services.mozilla.com/D96513
This moves the `isNode` and `isNodeTest` functions to the debugger/src/utils folder,
updates the callsites to those functions, generates the bundles, and finally,
removes the devtools-environment folder, as well as all mentions of it.
Differential Revision: https://phabricator.services.mozilla.com/D96384
When possible, we switch to the plain devtools/shared/flags module.
In some cases, the check was only done for jest test, so we use
isNodeTest instead.
Differential Revision: https://phabricator.services.mozilla.com/D96382
This updates the pretty-fast module to bring the commits
that were done there the 3 last years (date of the last
version being published).
Differential Revision: https://phabricator.services.mozilla.com/D96176
Previous `purgeRequestForDestroy` method was only rejecting all pending requests.
The new `syncFrontDestroy` allows to fully destroy the front, including
unregistering it/unmanage it. So that if we receive a packet from a brand new
actor, with the same prefix and actor ID, DevToolsClient.getFront doesn't return
the old destroyed front.
This issue was making pending requests that were never resolved.
Differential Revision: https://phabricator.services.mozilla.com/D94718
We were trying to resume the worker debugger in case we
couldn't connect to the worker. Since connectToWorker can
reject when the worker is closed, we might try to resume a
closed worker, which could cause a crash.
In this patch, we simply check if the worker debugger isn't closed
before resuming it.
Differential Revision: https://phabricator.services.mozilla.com/D95990
The function wasn't used, except in a test that this patch removes.
Since it was also the only use of the getSourcesManager hook, we're able to
remove it as well.
Differential Revision: https://phabricator.services.mozilla.com/D95989
For some reason we return an inlineTextChild when the iframe is remote, so only with fission turned on.
When the iframe isn't remote, WalkerFront.inlineTextChild returns undefined.
Differential Revision: https://phabricator.services.mozilla.com/D95868
Before this commit, the `MOZ_HEADLESS` environment variable was set by
the `--headless` process and inherited by the launched Browser Toolbox
process, hiding the debugger UI. This commit allows to launch the JS
debugger when running under `--headless` by explicitly removing the
`MOZ_HEADLESS` variable from the environment. To do this, a small
tweak to `Subprocess.jsm` is used that allows `null` to signal
"removal", distinct from `undefined` for "ignored".
While here I prefixed the output from the launched Browser Toolbox
process, which helps visually distinguish warnings, etc; and I also
corrected a typo that I stumbled across.
Differential Revision: https://phabricator.services.mozilla.com/D95897
I inlined the two existing functions that were modifying the base config directly
back into the base webpack config, and then removed everything that wasn't hit
or used by the bundling script.
Thanks to this work, we're able to remove a few files that were previously only
used in Launchpad, or that are simple enough to be inlined into the webpack config.
Since postcss wasn't used, we can also remove the postcss.config.js file, as
well as some libraries from package.json.
Differential Revision: https://phabricator.services.mozilla.com/D96018
This patch is simply inlining what was in devtools-launchpad directly into the
debugger's webpack config.
In order for the bundling script to still work, we had to add the dependencies
that were used in devtools-launchpad.
For some reason, this shifted a lot of modules in the generated files (but files
have the same size before and after, so I guess nothing changed).
Next patch in the serie will cleanup this webpack config.
Differential Revision: https://phabricator.services.mozilla.com/D96017
actorhasMethod had several technical limitations making it hard to use consistently. We now removed all the call sites for this method. This changeset removes the method and all its dependencies.
Differential Revision: https://phabricator.services.mozilla.com/D95861
The test was failing on Beta because we weren't setting the devtools.webconsole.input.context
pref, which is true only on Nightly.
This patch flip this pref in the test, which seems to make the test pass.
Differential Revision: https://phabricator.services.mozilla.com/D96061
This supports one manifestparser expression per line in the 'skip-if',
'fail-if' and 'run-if' keys. As a side effect the:
skip-if = foo ||
bar
syntax is no longer supported. Instead it can be:
skip-if =
foo # bug 123
bar # bug 456
Differential Revision: https://phabricator.services.mozilla.com/D95927
Use the generic "highlighter-shown" / "highlighter-hidden" events and check for highlighter type.
Use generic helpers in tests.
Fix an unrelated leftover nit from D92802
Differential Revision: https://phabricator.services.mozilla.com/D95835
The `dom.worker.console.dispatch_events_to_main_thread` pref is used by platform
code to check if console API messages in the worker thread should be dispatched
to the main thread. If so, the message parameters are cloned, or stringified if
they can't be. This is currently the default behavior.
The pref is checked on the server side and added as a trait to the root actor.
On the client, if the pref isn't true, then we accept messages coming from
worker targets in the console. We can't accept them without condition, otherwise
we would get duplicated message (from the main thread AND the worker thread).
The browser_webconsole_console_logging_workers_api.js test is repurposed for
worker logging since it was disabled on e10s anyway. We add a few test case
to check we can get cached and live message, and that non-clonable object, like
worker scope, are displayed like regular objects when the pref is false.
Differential Revision: https://phabricator.services.mozilla.com/D85397
The SELECTABLE_TEXT state is currently under-utilized and probably wrong, since it simply relies on testing if a hypertext has any text. A more correct reflection of the state should be taken from layout's IsSelectable method.
Note, even if an element is styled `user-select: none`, the text will still be keyboard selectable if it is editable (eg. input or contenteditable), so we should consider that SELECTABLE_TEXT.
Differential Revision: https://phabricator.services.mozilla.com/D95783
Depends on D95685
Keep the isFissionContentToolboxEnabled method but always return true to effectively enable all fission related behavior for all content toolboxes.
Differential Revision: https://phabricator.services.mozilla.com/D95686
This changeset only starts the FrameWatcher for any content toolbox.
The stack will progressively phase out the devtools.contenttoolbox.fission preference.
Differential Revision: https://phabricator.services.mozilla.com/D95685
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.
This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.
Differential Revision: https://phabricator.services.mozilla.com/D94641
Depends on D95299
The actors/stylesheets.js file contained three actors.
This change moves each actor in its own file.
Differential Revision: https://phabricator.services.mozilla.com/D95328
Depends on D95297
After moving actors to individual files, we should also do the same with specs.
Both actors are using shared types, which are moved to a shared types file.
Differential Revision: https://phabricator.services.mozilla.com/D95298
The actors/styles.js file contained two actors.
This change moves each actor in its own file.
A shared actors/utils/style-utils file is also created to host shared helpers.
Differential Revision: https://phabricator.services.mozilla.com/D95297
These are the presets that I think are most likely in use by people
who report performance bugs with the browser.
The SwComposite thread is used when software webrender is enabled,
except on macOS where it is never used. In those configurations, the
samples from the SwComposite thread are interesting in the same cases
when the samples from the Renderer thread are interesting, i.e. whenever
the performance bottleneck is on the rendering side.
However, we do not need to profile the SwComposite thread in all cases where
we profile the Renderer thread, because in some configurations the Renderer
thread is only profiled so that the screenshot markers are captured. The
SwComposite thread does not have screenshot markers.
Differential Revision: https://phabricator.services.mozilla.com/D95546