Граф коммитов

22118 Коммитов

Автор SHA1 Сообщение Дата
Noemi Erli debd6a2710 Backed out 3 changesets (bug 1676808) for causing devtools failures CLOSED TREE
Backed out changeset bc9b1ba331c3 (bug 1676808)
Backed out changeset 9e26cb0f0bdf (bug 1676808)
Backed out changeset 03abab648794 (bug 1676808)
2020-11-17 01:23:53 +02:00
Alexandre Poirot 02c7de7954 Bug 1676808 - [devtools] Rename all watcher to watcherFront. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96859
2020-11-16 21:08:24 +00:00
Alexandre Poirot 1b2d2414ad Bug 1676808 - [devtools] Rename ResourceWatcher.hasWatcherSupport to hasResourceWatcherSupport. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D97148
2020-11-16 21:08:21 +00:00
Alexandre Poirot b1bb3196f3 Bug 1676808 - [devtools] Expose WatcherFront via the TargetList instead of ResourceWatcher. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96804
2020-11-16 21:08:19 +00:00
Nika Layzell 42028efc71 Bug 1671983 - Part 4: Stop awaiting BrowserTestUtils.loadURI, r=annyG,remote-protocol-reviewers,extension-reviewers,preferences-reviewers,whimboo,zombie
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
2020-11-12 18:01:03 +00:00
Nicolas Chevobbe 41e5dcf390 Bug 1673226 - [devtools] Load missing ObjectInspector-related CSS files in inspector. r=rcaliman.
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
2020-11-16 14:14:47 +00:00
Julian Descottes 4c52379c29 Bug 1676646 - [devtools] Remove unused Connected localized string in aboutdebugging r=ladybenko,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96714
2020-11-16 09:34:00 +00:00
Karl Tomlinson 332494e855 Bug 1213512 remove unused NS_ERROR_DOM_FILE_ABORT_ERR r=baku
Depends on D95967

Differential Revision: https://phabricator.services.mozilla.com/D95968
2020-11-13 07:55:31 +00:00
Nicolas Chevobbe 68d3b8b92b Bug 1672980 - [devtools] Fix browser_browser_resources_console_messages failures on beta simulation. r=ochameau.
This is flipping the devtools.browsertoolbox.fission pref, which
is only enabled on Nightly at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D96411
2020-11-11 09:05:01 +00:00
Hubert Boma Manilla a70ec38159 Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-13 15:17:48 +00:00
Julian Descottes e7ec1ff308 Bug 1676980 - [devtools] Remove unused protocol/utils describeTemplate() helper r=ochameau
Depends on D96935

Differential Revision: https://phabricator.services.mozilla.com/D96939
2020-11-13 10:21:36 +00:00
Julian Descottes 3ad6fe2ca8 Bug 1676974 - [devtools] Remove unused protocol/utils.js method() helper r=ochameau
Current implementation
```lang=javascript
exports.method = function(fn, spec = {}) {
  fn._methodSpec = Object.freeze(spec);
  if (spec.request) {
    Object.freeze(spec.request);
  }
  if (spec.response) {
    Object.freeze(spec.response);
  }
  return fn;
};
```
https://searchfox.org/mozilla-central/rev/5a1a34953a26117f3be1a00db20c8bbdc03273d6/devtools/shared/protocol/utils.js#70-79

The helper method() in protocol/utils.js is only called from two methods:
- actorBridge (never used in the codebase)
- actorBridgeWithSpec (used by a few actors)

actorBridgeWithSpec doesn't pass the second argument, so in practice, this method could be reduced to:
```lang=javascript
exports.method = function(fn) {
  fn._methodSpec = Object.freeze({});
  return fn;
};
```

`_methodSpec` is only mentioned in one other spot: https://searchfox.org/mozilla-central/rev/5a1a34953a26117f3be1a00db20c8bbdc03273d6/devtools/shared/protocol/Actor/generateActorSpec.js#27-40

But based on our coverage tooling, we never actually have a `_methodSpec` when we run this code: https://coverage.moz.tools/#view=file&revision=latest&path=devtools/shared/protocol/Actor/generateActorSpec.js

To hit it, we would have to call `generateActorSpec` directly with an actor where we used `actorBridgeWithSpec`. But we never do that, we only use it with plain JS objects in the devtools/shared/specs folder.

Consequently, this helper can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D96935
2020-11-13 09:49:53 +00:00
Bogdan Tara 3667467db8 Backed out 10 changesets (bug 1662254) for lint failure on generate_static_pref_list.py CLOSED TREE
Backed out changeset 972e63387191 (bug 1662254)
Backed out changeset 3a9d6f0aa380 (bug 1662254)
Backed out changeset 4b3ffe7fe1af (bug 1662254)
Backed out changeset 4834b1025611 (bug 1662254)
Backed out changeset ec1f7afe8a2d (bug 1662254)
Backed out changeset c7a6b927b1de (bug 1662254)
Backed out changeset 2427d85b2605 (bug 1662254)
Backed out changeset 979bf4ac97bb (bug 1662254)
Backed out changeset 3e443333c636 (bug 1662254)
Backed out changeset a5261578ebfc (bug 1662254)
2020-11-12 23:59:07 +02:00
Steve Fink 9ab0a6a530 Bug 1662254 - Rename CC_WAITING -> CC_FINISHED r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D94792
2020-11-12 19:05:32 +00:00
Julian Descottes 2a85b4f393 Bug 1650963 - [devtools] Set non-fission flag when opening DevTools window from a non-fission host tab r=Honza
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
2020-11-12 15:18:43 +00:00
Cody Welsh 049cc3d149 Bug 1673932 - [devtools] - Combine `register` calls in highlighters. r=jdescottes
Combine the calls to the highlighter `register()` function in a loop.
One of several possible solutions here.

Differential Revision: https://phabricator.services.mozilla.com/D96302
2020-11-12 08:38:59 +00:00
Cody Welsh efbcf065d3 Bug 1673932 - [devtools] - Use absolute paths in highlighters register helper. r=jdescottes
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
2020-11-10 10:12:53 +00:00
Tim Huang 7ec26df273 Bug 1641270 - Part 6: Pass CookieJarSettings to nsIWebBrowserPersist.saveURI() and nsIWebBrowserPersist.savePrivacyAwareURI(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D95616
2020-11-11 18:19:27 +00:00
Andreea Pavel 51f16bb9d2 Backed out changeset 62af829812bd (bug 1662736) for permafailing bug 1676641 and bug 1655183 on a CLOSED TREE 2020-11-11 19:53:14 +02:00
Hubert Boma Manilla d4cec11d5a Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-11 10:51:28 +00:00
Julian Descottes 2e535d26d6 Bug 1669666 - [devtools] Ignore custom pageshow/pagehide events in BrowsingContextTargetActor r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D96605
2020-11-11 09:51:11 +00:00
Dan Minor 57441aa8cc Bug 1673054 - Migrate uses of intl.uidirection to intl.l10n.pseudo; r=Gijs,zbraniecki
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
2020-11-09 15:33:39 +00:00
Kris Maglione cfebcd3fd2 Bug 1669961: Return null from `.contentWindow` when inner window is inactive. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93853
2020-11-10 20:35:04 +00:00
Kris Maglione 7ae9faa46f Bug 1651774: Update mozilla/use-services rule for native Services implementation. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D93858
2020-11-06 18:58:33 +00:00
Nicolas Chevobbe 6abc8ae401 Bug 1634208 - [devtools] Fix browser_jsterm_screenshot_command_warnings intermittent. r=ladybenko.
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
2020-11-10 16:07:32 +00:00
Steven MacLeod 971103bdd5 Bug 1606061 - move TouchEventsOverride to BrowsingContext. r=farre,devtools-backward-compat-reviewers
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
2020-11-10 15:57:30 +00:00
Nicolas Chevobbe 56c8e9380a Bug 1667778 - [devtools] Remove mentions of launchpad in debugger. r=jdescottes.
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
2020-11-10 13:05:24 +00:00
Nicolas Chevobbe 514b0ddad4 Bug 1675769 - [devtools] Move devtools-environment function into debugger/src. r=bomsy.
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
2020-11-10 15:18:32 +00:00
Nicolas Chevobbe 6e6be10526 Bug 1675769 - [devtools] Remove usage of devtools-environment isTesting. r=bomsy.
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
2020-11-10 15:14:07 +00:00
Nicolas Chevobbe 9725148bcb Bug 1675769 - [devtools] Clean-up devtools-environment usage. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D96381
2020-11-10 15:07:57 +00:00
smolnar ec58e559fc Backed out changeset 1780d41127e8 (bug 1662736) for causing devtools failure. CLOSED TREE 2020-11-10 15:07:27 +02:00
Andrey Bienkowski e5944c6972 Bug 1674841 - [devtools] Clean up devtools/shared/protocol/tests/xpcshell/test_protocol_async.js r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95553
2020-11-10 12:55:29 +00:00
Nicolas Chevobbe 858da426e6 Bug 1674400 - [devtools] Update pretty-fast to 0.2.4. r=bomsy.
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
2020-11-10 12:15:13 +00:00
Hubert Boma Manilla 5c91d1f55c Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-10 12:44:23 +00:00
Yura Zenevich 21c81dd7e6 Bug 1675539 - add telemetry for tabbing order overlay activation. r=jdescottes,janerik
Differential Revision: https://phabricator.services.mozilla.com/D96091
2020-11-09 16:19:20 +00:00
Alexandre Poirot efdfcfb399 Bug 1672826 - [devtools] Unmanage fronts when we purge a whole prefix. r=nchevobbe
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
2020-11-09 12:29:53 +00:00
Alexandre Poirot 8e2267f855 Bug 1672826 - [devtools] Close ChildDebuggerTransport in the parent process when we destroy content process targets. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D94485
2020-11-09 12:26:41 +00:00
Andrey Bienkowski e86e7489c7 Bug 1674425 - [devtools] Remove defer usage in server/tests/browser/browser_perf-realtime-markers.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95337
2020-11-09 11:42:38 +00:00
Fabien CASTERS a2ece0090c Bug 1664766 - [devtools] Remove defer usage in devtools\client\shared\test\test-actor.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94966
2020-11-09 11:36:51 +00:00
Andrey Bienkowski 9a314848ae Bug 1673934 - [devtools] Remove defer usage in client/debugger/src/actions/tests/preview.spec.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95858
2020-11-09 11:31:42 +00:00
Ben Delevingne 6df2de2623 Bug 1674136 - [devtools] Remove defer usage in devtools/client/shared/test/shared-redux-head.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95152
2020-11-09 10:21:26 +00:00
Nicolas Chevobbe 3da665e7b3 Bug 1674115 - [devtools] Fix crash caused by calling WorkerDebugger.setDebuggerReady. r=ochameau.
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
2020-11-09 10:03:41 +00:00
Nicolas Chevobbe a76f5a8519 Bug 1675497 - [devtools] Remove unused duplicated object-inspector folder. r=bomsy.
Something probably went wrong in Bug 1671163 and we ended up
with this duplicated, unused folder.

Differential Revision: https://phabricator.services.mozilla.com/D96027
2020-11-09 09:57:12 +00:00
Nicolas Chevobbe 220bf52237 Bug 1675450 - [devtools] Remove unused ObjectActor.definitionSite. r=ochameau,devtools-backward-compat-reviewers.
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
2020-11-09 09:50:26 +00:00
Alexandre Poirot 48133a28a8 Bug 1673627 - [devtools] Force showing iframe content instead of inline content for remote frames. r=jdescottes
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
2020-11-09 08:43:28 +00:00
Nick Alexander b143efdd25 Bug 1675332 - Make `--headless --jsdebugger` launch a headed Browser Toolbox. r=emalysz
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
2020-11-06 04:53:24 +00:00
Belén Albeza a6367adcc2 Bug 1673821 - [devtools] Fix error when closing storage panel r=jdescottes
Introduce a guard in the actor's destructor, so it does not fail if called more than once.

Differential Revision: https://phabricator.services.mozilla.com/D96068
2020-11-06 14:12:55 +00:00
Neil Deakin c5eff66205 Bug 1649843, remove now unused legacy actor code, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D95206
2020-11-06 15:46:11 +00:00
Nicolas Chevobbe 90fc707966 Bug 1673368 - [devtools] Remove unnecessary parts of debugger's webpack config. r=jdescottes
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
2020-11-06 14:49:16 +00:00
Nicolas Chevobbe e783099865 Bug 1673368 - [devtools] Remove dependency on devtools-launchpad in webpack config. jdescottes. r=jdescottes
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
2020-11-06 14:29:44 +00:00
Julian Descottes d6d8ea296d Bug 1654763 - [devtools] Remove implementation, tests and documentation for actorHasMethod r=rcaliman,ochameau,devtools-backward-compat-reviewers
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
2020-11-06 13:50:52 +00:00
Julian Descottes 7f05d92a6e Bug 1673605 - [devtools] Remove unused css variables from perf.css r=julienw
Depends on D94747

Differential Revision: https://phabricator.services.mozilla.com/D94828
2020-10-27 17:44:14 +00:00
Nicolas Chevobbe 2e2dfdc264 Bug 1673641 - [devtools] Fix browser_browser_toolbox_evaluation_context.js failure on beta simulation. r=ladybenko.
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
2020-11-05 17:04:10 +00:00
Andrew Halberstadt 331bc892dd Bug 1675319 - [manifestparser] Properly support multiline skip-if statements, r=jmaher,extension-reviewers,zombie
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
2020-11-05 19:55:08 +00:00
Razvan Caliman ac7cf1d57c Bug 1675226 - [devtools] Remove leftover specific box model highlighter events r=jdescottes
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
2020-11-05 14:43:46 +00:00
Oriol Brufau d2199d3928 Bug 1674590 - Show reason of rejected promise in console, and allow it to be inspected. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95450
2020-11-05 14:28:01 +00:00
Nerixyz 60cff423b5 Bug 1674577: Show icon corresponding to the source file if it's inside of an extension. r=jdescottes,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D95446
2020-11-05 09:54:42 +00:00
Nicolas Chevobbe 4bad3995de Bug 1592584 - [devtools] Accept worker targets in console. r=ochameau.
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
2020-11-05 10:17:36 +00:00
Nicolas Chevobbe 4269e69069 Bug 1674417 - [devtools] Rename SourcesManager instances. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D95333
2020-11-05 08:54:54 +00:00
Eitan Isaacson f42d5e8b3d Bug 1672694 - P1: Query layout for selectable text state. r=morgan,Jamie,yzen
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
2020-11-04 19:56:55 +00:00
Julian Descottes d8f70bb25f Bug 1675020 - [devtools] Disable frequent intermittents / permafail DevTools tests on Fission platforms r=Honza
Temporarily add skip-if=fission in order to move devtools tests on Fission platforms to Tier1

Differential Revision: https://phabricator.services.mozilla.com/D95746
2020-11-04 18:39:57 +00:00
Julian Descottes e65f71419f Bug 1674977 - [devtools] Remove gDevTools::isFissionContentToolboxEnabled r=ochameau
Depends on D95686

Finally, remove the method itself.

Differential Revision: https://phabricator.services.mozilla.com/D95687
2020-11-04 18:32:37 +00:00
Julian Descottes 4952a99950 Bug 1674977 - [devtools] Always return true from gDevTools::isFissionContentToolboxEnabled r=ochameau
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
2020-11-04 14:33:37 +00:00
Julian Descottes d17e35eb23 Bug 1674977 - [devtools] Enable Frame watching for all content toolboxes r=ochameau
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
2020-11-04 14:26:06 +00:00
Alexandre Poirot 613fcbb932 Bug 1675256 - [devtools] Remove discardRequestBody and discardResponseBody attributes of NETWORK_EVENT resource. r=bomsy,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D95846
2020-11-04 17:14:03 +00:00
Alexandre Poirot 2de72821eb Bug 1675237 - [devtools] Set NETWORK_EVENT resource's `isRacing` attribute early, on securityInfo update. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D95836
2020-11-04 17:14:03 +00:00
Andrey Bienkowski 4de647d3c5 Bug 1675299 - [devtools] Improve the guidelines for commit naming r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D95864
2020-11-04 16:39:46 +00:00
Yura Zenevich c7aaa8e041 Bug 1654956 - add UI for displaying tabbing order overlay in the accessibility panel. r=jdescottes,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94926
2020-11-03 15:33:16 +00:00
Yura Zenevich ba825c5746 Bug 1654956 - add AccessibleWalker functionality to show/hide tabbing order overlay. r=jdescottes,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94925
2020-11-03 15:33:09 +00:00
Yura Zenevich e669493035 Bug 1654956 - adding TabbingOrderHighlighter that highlights a sequence of nodes within the tabbing order. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94924
2020-11-03 15:33:01 +00:00
Yura Zenevich 265472b1e2 Bug 1654956 - adding NodeTabbingOrderHighlighter highlighter to highlight nodes that are in the tabbing order for a particular target. r=jdescottes,rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D94923
2020-11-03 15:32:53 +00:00
Csoregi Natalia 7f8521b157 Backed out changeset b39d14d9fe26 (bug 1673934) for debugger failures. CLOSED TREE 2020-11-04 13:19:59 +02:00
Hubert Boma Manilla 42cc6b08ee Bug 1675039 - [devtools] Fix crash when serverTiming does not exists r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95749
2020-11-04 10:37:53 +00:00
Andrey Bienkowski 2ec70a4044 Bug 1673934 - [devtools] Remove defer usage in client/debugger/src/actions/tests/preview.spec.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95275
2020-11-04 10:45:45 +00:00
Andrey Bienkowski ee420ad724 Bug 1674971 - [devtools] Replace task.js with async/await in devtools/docs/contributing/javascript.md r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95674
2020-11-04 10:43:35 +00:00
Kartikaya Gupta b86f005446 Bug 1673071 - Disable failing tests. r=jrmuizel,marionette-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D95429
2020-11-03 23:05:08 +00:00
Razvan Maries 10425eddfc Backed out 7 changesets (bug 1658084, bug 1671983) for perma failures on browser_async_remove_tab.js and browser_e10s_chrome_process.js. CLOSED TREE
Backed out changeset 2e6309c1cdbd (bug 1658084)
Backed out changeset 99aafd9304ef (bug 1671983)
Backed out changeset 80280b85280a (bug 1671983)
Backed out changeset 008db2659002 (bug 1671983)
Backed out changeset 32bd45c7fe3a (bug 1671983)
Backed out changeset 56e227e6580c (bug 1671983)
Backed out changeset a404f809f79d (bug 1671983)
2020-11-04 04:23:47 +02:00
Nika Layzell 5f9c85da95 Bug 1671983 - Part 4: Stop awaiting BrowserTestUtils.loadURI, r=annyG,remote-protocol-reviewers,extension-reviewers,preferences-reviewers,whimboo,zombie
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
2020-11-04 00:55:36 +00:00
Razvan Maries 156298851f Backed out 4 changesets (bug 1673071) for perma failures on grid-minimum-contribution-baseline-shim-vertical-lr.html. CLOSED TREE
Backed out changeset a8ad01797ee0 (bug 1673071)
Backed out changeset f2ed8ed80bf2 (bug 1673071)
Backed out changeset 34d6c0fbfeef (bug 1673071)
Backed out changeset d6857ecf3c81 (bug 1673071)
2020-11-04 00:56:16 +02:00
Kartikaya Gupta 7bfa94e01a Bug 1673071 - Disable failing tests. r=jrmuizel,marionette-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D95429
2020-11-03 14:59:47 +00:00
Julian Descottes 5f04ebe1d9 Bug 1654758 - [devtools] Remove usage of actorHasMethod in responsive/ui module r=bradwerth
All the backward compatibility code can be removed.

"setMaxTouchPoints" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1500672 (FF77)
"simulateScreenOrientationChange" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1357774 (FF69)
"captureScreenshot" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1579133 (FF71)

Differential Revision: https://phabricator.services.mozilla.com/D95313
2020-11-03 16:48:25 +00:00
Julian Descottes d55fc399a4 Bug 1654752 - [devtools] Remove actorHasMethod usage in animation inspector r=daisuke
The related backward compatibility code was only to support FF62 or older and can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D95309
2020-11-03 16:47:55 +00:00
Julian Descottes ea163d7b6b Bug 1674357 - [devtools] Remove lifetime from DevTools protocol r=ochameau,devtools-backward-compat-reviewers
Depends on D95299

The lifetime feature seems unused in DevTools. Removing it should have no impact.

Differential Revision: https://phabricator.services.mozilla.com/D95302
2020-11-03 16:43:52 +00:00
Julian Descottes 9168a9f524 Bug 1674405 - [devtools] Extract StyleSheet, StyleSheets and MediaRule fronts to individual files r=daisuke,devtools-backward-compat-reviewers
Depends on D95329

Differential Revision: https://phabricator.services.mozilla.com/D95330
2020-11-03 16:35:51 +00:00
Julian Descottes 3ad5aa0547 Bug 1674405 - [devtools] Extract StyleSheet, StyleSheets and MediaRule specs to individual files r=daisuke,devtools-backward-compat-reviewers
Depends on D95328

Differential Revision: https://phabricator.services.mozilla.com/D95329
2020-11-03 15:56:12 +00:00
Julian Descottes bcd5dded83 Bug 1674405 - [devtools] Extract StyleSheet, StyleSheets and MediaRule actors to individual files r=daisuke
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
2020-11-02 18:42:53 +00:00
Julian Descottes a311d05ca5 Bug 1654760 - [devtools] Remove usage of actorHasMethod in SwatchColorPickerTooltip r=rcaliman
This backward compatibility code can be removed
"getBackgroundColor" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1568053 (FF70)

Differential Revision: https://phabricator.services.mozilla.com/D95315
2020-11-03 16:34:58 +00:00
Andrey Bienkowski ffe82f7865 Bug 1674986 Fix a comment in devtools/client/inspector/shared/test/head.js r=rcaliman DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D95681
2020-11-03 11:35:31 +00:00
Cristina Coroiu 72d7b11420 Bug 1607636 - disable browser_dbg-inline-preview.js for frequent failures r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D95449
2020-11-03 10:11:31 +00:00
Julian Descottes ea5444d838 Bug 1674721 - [devtools] Log a meaningful failure message when attempting to run ToolboxTask on ASAN builds r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D95500
2020-11-03 10:05:08 +00:00
Julian Descottes 3def563fd2 Bug 1674371 - [devtools] Move ELEMENT_STYLE constant to a single file r=rcaliman,devtools-backward-compat-reviewers
Depends on D95299

Differential Revision: https://phabricator.services.mozilla.com/D95307
2020-11-02 18:45:03 +00:00
Julian Descottes 7021e9145e Bug 1674362 - [devtools] Extract PageStyle and StyleRule fronts to individual files r=rcaliman,devtools-backward-compat-reviewers
Depends on D95298

Also extract the corresponding fronts in individual files.

Differential Revision: https://phabricator.services.mozilla.com/D95299
2020-11-02 18:36:09 +00:00
Julian Descottes 6094cf8dcb Bug 1674362 - [devtools] Extract PageStyle and StyleRule specs to individual files r=rcaliman,devtools-backward-compat-reviewers
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
2020-11-02 18:35:28 +00:00
Julian Descottes 51323f232a Bug 1674362 - [devtools] Extract PageStyle and StyleRule actors to individual files r=rcaliman
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
2020-11-02 17:14:55 +00:00
Markus Stange b3bfed14fe Bug 1669838 - Add the SwComposite thread to the presets "Firefox Platform", "Firefox Front-End", "Firefox Graphics" and "Media". r=gregtatum
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
2020-11-02 17:41:50 +00:00
Belén Albeza 65ade5bf66 Bug 1669509 - [devtools] Hide internal indexedDB's when we are not in the browser toolbox r=ochameau
In https://phabricator.services.mozilla.com/D91122#C3084925OL296 we transferred the filtering of indexedDB dbs to a transformer, but it was not being applied since the `hosts` getter was still used by the client. Since we discussed this filtering should be done in the server, this patch moves the filtering to the storage actor instead.

Differential Revision: https://phabricator.services.mozilla.com/D95020
2020-11-02 13:28:56 +00:00
Julian Descottes 72919d479b Bug 1654757 - [devtools] Remove usage of actorHasMethod in performance-controller r=julienw
This backward compatibility code was added a long time ago and is no longer necessary

Differential Revision: https://phabricator.services.mozilla.com/D95312
2020-11-02 13:29:31 +00:00
Julian Descottes f1f295625f Bug 1654755 - [devtools] Remove usage of actorHasMethod in rules and new-rules modules r=rcaliman
Related backward compatibility code was only needed for FF74 or older and can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D95311
2020-11-02 13:29:59 +00:00
Julian Descottes b61c9cda43 Bug 1654754 - [devtools] Remove actorHasMethod usage from grid inspector and highlighters-overlay r=rcaliman
The backward compatibility code was introduced in FF69 and can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D95310
2020-11-02 12:35:20 +00:00
Itiel 0c395b7d08 Bug 1674607 - Fix dark mode for the netmonitor error boundary r=Honza,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D95452
2020-11-02 11:48:00 +00:00
Julian Descottes 3fc97c1b4d Bug 1673419 - [devtools] Ignore existing typescript violations in devtools/client/performance-new r=gregtatum
Depends on D95235

Ignore remaining typescript violations in performance-new

Differential Revision: https://phabricator.services.mozilla.com/D95236
2020-10-30 17:27:50 +00:00
Julian Descottes 900514e20e Bug 1673419 - [devtools] Support performance-new typescript checks in devtools node try runner r=gregtatum,nchevobbe
This allows to run the performance-new typescript checks via
"node devtools/client/bin/devtools-node-test-runner.js --suite=performance"

Differential Revision: https://phabricator.services.mozilla.com/D95232
2020-10-30 17:15:55 +00:00
Belén Albeza 6ce63ec0cd Bug 1666528 - [devtools] Add session storage resource + test r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94728
2020-10-30 16:12:58 +00:00
Csoregi Natalia c9031b88f2 Backed out changeset 5a4c2dc63d04 (bug 1669509) for causing leaks. CLOSED TREE 2020-10-30 18:50:11 +02:00
Belén Albeza a2eed98a2c Bug 1669509 - [devtools] Hide internal indexedDB's when we are not in the browser toolbox r=ochameau
In https://phabricator.services.mozilla.com/D91122#C3084925OL296 we transferred the filtering of indexedDB dbs to a transformer, but it was not being applied since the `hosts` getter was still used by the client. Since we discussed this filtering should be done in the server, this patch moves the filtering to the storage actor instead.

Differential Revision: https://phabricator.services.mozilla.com/D95020
2020-10-30 13:33:47 +00:00
Razvan Caliman 3b35332b4f Bug 1623906 - [devtools] Dispatch thunks from Grid panel React components to show/hide the Box Model Highlighter r=gl
Depends on D95035

This patch is using the approach introduced in D79556 to dispatch thunks (functions) to the Redux store to show/hide the box model highlighter from individual React components instead of passing down the methods through deeply nested trees of components that don't use them.

The Redux `dispatch()` method is passed down via the component tree instead. This enables further usage of dispatching thunks for other scenarios avoiding prop drilling.
The `showBoxModelHighlighterForNode` and `hideBoxModelHighlighter` props and methods are removed in favor of the corresponding thunks.

Differential Revision: https://phabricator.services.mozilla.com/D95036
2020-10-29 14:35:58 +00:00
Razvan Caliman e312efef7e Bug 1623906 - [devtools] Dispatch thunks from Animation panel React components to show/hide the Box Model Highlighter r=daisuke
Depends on D95034

This patch is using the approach introduced in D79556 to dispatch thunks (functions) to the Redux store to show/hide the box model highlighter from individual React components instead of passing down the methods through deeply nested trees of components that don't use them.

The Redux `dispatch()` method is passed down via the component tree instead. This enables further usage of dispatching thunks for other scenarios avoiding prop drilling.
The `showBoxModelHighlighterForNode` and `hideBoxModelHighlighter` props and methods are removed in favor of the corresponding thunks.

Differential Revision: https://phabricator.services.mozilla.com/D95035
2020-10-29 14:36:00 +00:00
Razvan Caliman 5287f759f2 Bug 1623906 - [devtools] Dispatch thunks from Compatibility panel React components to show/hide the Box Model Highlighter r=daisuke
Depends on D95033

This patch is using the approach introduced in D79556 to dispatch thunks (functions) to the Redux store to show/hide the box model highlighter from individual React components instead of passing down the methods through deeply nested trees of components that don't use them.

The Redux `dispatch()` method is passed down via the component tree instead. This enables further usage of dispatching thunks for other scenarios avoiding prop drilling.
The `showBoxModelHighlighterForNode` and `hideBoxModelHighlighter` props and methods are removed in favor of the corresponding thunks.

Differential Revision: https://phabricator.services.mozilla.com/D95034
2020-10-30 14:42:43 +00:00
Razvan Caliman 2cdcc31876 Bug 1623906 - [devtools] Dispatch thunks from Box Model panel React components to show/hide the Box Model Highlighter r=gl
Depends on D79556

This patch is using the approach introduced in D79556 to dispatch thunks (functions) to the Redux store to show/hide the box model highlighter from individual React components instead of passing down the methods through deeply nested trees of components that don't use them.

The Redux `dispatch()` method is passed down via the component tree instead. This enables further usage of dispatching thunks for other scenarios avoiding prop drilling.
The `showBoxModelHighlighterForNode`, `hideBoxModelHighlighter` and `showBoxModelHighlighter` props and methods are removed in favor of the corresponding thunks.

Differential Revision: https://phabricator.services.mozilla.com/D95033
2020-10-29 14:35:53 +00:00
Razvan Caliman f3e06f46f3 Bug 1623906 - [devtools] Dispatch thunks from Flexbox panel React components to highlight nodes r=gl,jdescottes,nchevobbe
### Problem
There is a lot of [prop drilling](https://kentcdodds.com/blog/prop-drilling) in React components to pass down a callback that is invoked at the bottom of a long chain of components.

[onShowBoxModelHighlighterForNode()](https://searchfox.org/mozilla-central/search?path=&q=onShowBoxModelHighlighterForNode) is one such example. It is created at the [Inspector client level](https://searchfox.org/mozilla-central/rev/25d491b7924493b5d4bedc07841a1cd92f271100/devtools/client/inspector/inspector.js#1885-1908) then passed to React components for panels, then drilled down to the consumer component which invokes it. There is also some [needless duplication](https://searchfox.org/mozilla-central/source/devtools/client/inspector/layout/layout.js#85-86) with [onShowBoxModelHighlighter](https://searchfox.org/mozilla-central/search?q=onShowBoxModelHighlighter%5CW&path=&case=false&regexp=true).

### Solution

With this patch, we leverage thunks in Redux.
In Redux, you can `dispatch()`:
- actions -> an object with an action type string which is matched by reducers
- thunks -> a function which can be async and can itself dispatch actions or other thunks

Thunks are supported by middleware already set up in the DevTools Redux [createStore()](https://searchfox.org/mozilla-central/source/devtools/client/shared/redux/create-store.js#54,104) helper. During store setup, we pass `thunkOptions` to the middleware, an object with arguments which will be available to all thunks when invoked. This is where we pass in the inspector client as a thunk option so we can invoke the highlighter.

This is the replacement for prop drilling the `onShowBoxModelHighlighterForNode()` method. The same way they dispatch actions, components can now dispatch the thunk to show/hide the highlighter when they need it without direct knowledge of the `inspector`, thus satisfying the original intent of passing down the `onShowBoxModelHighlighterForNode()` callback while cleaning up the code.

### Prior art
Thunks are not something new to DevTools. They are extensively used by the WebConsole, for example:
- passing [thunk options to the store](https://searchfox.org/mozilla-central/rev/25d491b7924493b5d4bedc07841a1cd92f271100/devtools/client/webconsole/webconsole-wrapper.js#95-104)
- making use of thunk options,  [webConsoleUI and hud](https://searchfox.org/mozilla-central/source/devtools/client/webconsole/actions/autocomplete.js#14-91) in a thunk to handle autocomplete


###Useful context:
DevTools helpers
- [thunkWithOptions](https://searchfox.org/mozilla-central/source/devtools/client/shared/redux/middleware/thunk-with-options.js)
- [shared Redux createStore helper with thunks middleware](https://searchfox.org/mozilla-central/source/devtools/client/shared/redux/create-store.js#54,104)
Redux docs
- [Async Actions in Redux](https://redux.js.org/advanced/async-actions)
- [dispatch() as default prop with redux-connect](https://react-redux.js.org/using-react-redux/connect-mapdispatch#default-dispatch-as-a-prop)

Differential Revision: https://phabricator.services.mozilla.com/D79556
2020-10-29 14:35:55 +00:00
Alexandre Poirot 1cca051c93 Bug 1673328 - [devtools] Stop using requestTypes in ThreadActor. r=nchevobbe
This was hacking the internals of RDP/protocol.js in order to provide
different names to the actor prototype.
I had to rename existing `skipBreakpoints` getter in order to avoid
name collision with the RDP method of the same name.
I also had to tweak a few method arguments as they weren't following protocol.js spec.
They were called without protocol.js automatic marshalling of values.
Finally, hack something in protocol.js in order to avoid duplicated response for ThreadActor.attach.

Differential Revision: https://phabricator.services.mozilla.com/D94958
2020-10-29 18:58:33 +00:00
Alexandre Poirot ce474dc715 Bug 1673328 - [devtools] Rename TabSources to SourcesManager. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95042
2020-10-29 19:00:26 +00:00
Alexandre Poirot 90a993e0b7 Bug 1673328 - [devtools] Drop ThreadActor.exit in favor of destroy. r=nchevobbe
We no longer need to manuall call threadActor.exit from Target Actors
as the ThreadActor is managed by the Target Actors, so that managed children
will be destroyed when the target actor is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D94957
2020-10-29 18:59:35 +00:00
Alexandre Poirot fdb8f8c40d Bug 1673328 - [devtools] Drop unused ThreadActor.detach method. r=nchevobbe,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94956
2020-10-29 19:00:39 +00:00
Alexandre Poirot e5dd1d7904 Bug 1671906 - [devtools] Introduce a target actor mixin in order to share common code between all targets. r=jdescottes
Similarly to the frontend, I'm introducing a mixin in order to share code between at target actors.
We might be able to share more, like sources. But at least we share new addition related to watcher and resources.
This would probably have been easier if Actor were using ES Classes.

Differential Revision: https://phabricator.services.mozilla.com/D94948
2020-10-29 16:46:20 +00:00
Cody Welsh a38acfa1f0 Bug 1660435 - Introduce top level Error boundary Component. r=Honza,bomsy
Add a needed top-level error boundary component to the Net Monitor panel
in DevTools, to catch errors that would otherwise render the pane blank.

Differential Revision: https://phabricator.services.mozilla.com/D91511
2020-10-29 16:40:29 +00:00
Nicolas Chevobbe 451188c464 Bug 1673882 - [devtools] Fix DOMNode icon in a11y panel sidebar. r=yzen.
The panel was using the `highlighterFront` property of the nodeFront, but it was
removed in Bug 1623667, and as a result, highlighting was broken.
To be consistent with the other panels having such capabilities (console, debugger, …),
we now use the toolbox `getHighlighter` function.

This wasn't caught because there wasn't any test covering this behavior; this patch
adds one, that was failing without the fix in Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D95030
2020-10-29 14:52:11 +00:00
Ben Delevingne 8745656461 Bug 1673974 - [devtools] Remove defer usage in browser_console_webconsole_ctrlw_close_tab.js. r=nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D95080
2020-10-29 14:41:32 +00:00
Butkovits Atila ce82eb57bc Backed out 5 changesets (bug 1623906) for node failures. CLOSED TREE
Backed out changeset 92d23f0ea155 (bug 1623906)
Backed out changeset 2af3b0ee91ac (bug 1623906)
Backed out changeset bc7e021e8d98 (bug 1623906)
Backed out changeset 362bad2b7311 (bug 1623906)
Backed out changeset 78d0de3437ab (bug 1623906)
2020-10-29 16:32:29 +02:00
Razvan Caliman 1ddf32aa96 Bug 1623906 - [devtools] Dispatch thunks from Grid panel React components to show/hide the Box Model Highlighter r=gl
Depends on D95035

This patch is using the approach introduced in D79556 to dispatch thunks (functions) to the Redux store to show/hide the box model highlighter from individual React components instead of passing down the methods through deeply nested trees of components that don't use them.

The Redux `dispatch()` method is passed down via the component tree instead. This enables further usage of dispatching thunks for other scenarios avoiding prop drilling.
The `showBoxModelHighlighterForNode` and `hideBoxModelHighlighter` props and methods are removed in favor of the corresponding thunks.

Differential Revision: https://phabricator.services.mozilla.com/D95036
2020-10-29 14:06:01 +00:00
Razvan Caliman a020465154 Bug 1623906 - [devtools] Dispatch thunks from Animation panel React components to show/hide the Box Model Highlighter r=daisuke
Depends on D95034

This patch is using the approach introduced in D79556 to dispatch thunks (functions) to the Redux store to show/hide the box model highlighter from individual React components instead of passing down the methods through deeply nested trees of components that don't use them.

The Redux `dispatch()` method is passed down via the component tree instead. This enables further usage of dispatching thunks for other scenarios avoiding prop drilling.
The `showBoxModelHighlighterForNode` and `hideBoxModelHighlighter` props and methods are removed in favor of the corresponding thunks.

Differential Revision: https://phabricator.services.mozilla.com/D95035
2020-10-29 07:27:56 +00:00
Razvan Caliman ada8b572a7 Bug 1623906 - [devtools] Dispatch thunks from Compatibility panel React components to show/hide the Box Model Highlighter r=daisuke
Depends on D95033

This patch is using the approach introduced in D79556 to dispatch thunks (functions) to the Redux store to show/hide the box model highlighter from individual React components instead of passing down the methods through deeply nested trees of components that don't use them.

The Redux `dispatch()` method is passed down via the component tree instead. This enables further usage of dispatching thunks for other scenarios avoiding prop drilling.
The `showBoxModelHighlighterForNode` and `hideBoxModelHighlighter` props and methods are removed in favor of the corresponding thunks.

Differential Revision: https://phabricator.services.mozilla.com/D95034
2020-10-29 14:05:39 +00:00
Razvan Caliman 855b0ba37e Bug 1623906 - [devtools] Dispatch thunks from Box Model panel React components to show/hide the Box Model Highlighter r=gl
Depends on D79556

This patch is using the approach introduced in D79556 to dispatch thunks (functions) to the Redux store to show/hide the box model highlighter from individual React components instead of passing down the methods through deeply nested trees of components that don't use them.

The Redux `dispatch()` method is passed down via the component tree instead. This enables further usage of dispatching thunks for other scenarios avoiding prop drilling.
The `showBoxModelHighlighterForNode`, `hideBoxModelHighlighter` and `showBoxModelHighlighter` props and methods are removed in favor of the corresponding thunks.

Differential Revision: https://phabricator.services.mozilla.com/D95033
2020-10-29 14:04:42 +00:00
Razvan Caliman a522c7d3ad Bug 1623906 - [devtools] Dispatch thunks from Flexbox panel React components to highlight nodes r=gl,jdescottes,nchevobbe
### Problem
There is a lot of [prop drilling](https://kentcdodds.com/blog/prop-drilling) in React components to pass down a callback that is invoked at the bottom of a long chain of components.

[onShowBoxModelHighlighterForNode()](https://searchfox.org/mozilla-central/search?path=&q=onShowBoxModelHighlighterForNode) is one such example. It is created at the [Inspector client level](https://searchfox.org/mozilla-central/rev/25d491b7924493b5d4bedc07841a1cd92f271100/devtools/client/inspector/inspector.js#1885-1908) then passed to React components for panels, then drilled down to the consumer component which invokes it. There is also some [needless duplication](https://searchfox.org/mozilla-central/source/devtools/client/inspector/layout/layout.js#85-86) with [onShowBoxModelHighlighter](https://searchfox.org/mozilla-central/search?q=onShowBoxModelHighlighter%5CW&path=&case=false&regexp=true).

### Solution

With this patch, we leverage thunks in Redux.
In Redux, you can `dispatch()`:
- actions -> an object with an action type string which is matched by reducers
- thunks -> a function which can be async and can itself dispatch actions or other thunks

Thunks are supported by middleware already set up in the DevTools Redux [createStore()](https://searchfox.org/mozilla-central/source/devtools/client/shared/redux/create-store.js#54,104) helper. During store setup, we pass `thunkOptions` to the middleware, an object with arguments which will be available to all thunks when invoked. This is where we pass in the inspector client as a thunk option so we can invoke the highlighter.

This is the replacement for prop drilling the `onShowBoxModelHighlighterForNode()` method. The same way they dispatch actions, components can now dispatch the thunk to show/hide the highlighter when they need it without direct knowledge of the `inspector`, thus satisfying the original intent of passing down the `onShowBoxModelHighlighterForNode()` callback while cleaning up the code.

### Prior art
Thunks are not something new to DevTools. They are extensively used by the WebConsole, for example:
- passing [thunk options to the store](https://searchfox.org/mozilla-central/rev/25d491b7924493b5d4bedc07841a1cd92f271100/devtools/client/webconsole/webconsole-wrapper.js#95-104)
- making use of thunk options,  [webConsoleUI and hud](https://searchfox.org/mozilla-central/source/devtools/client/webconsole/actions/autocomplete.js#14-91) in a thunk to handle autocomplete


###Useful context:
DevTools helpers
- [thunkWithOptions](https://searchfox.org/mozilla-central/source/devtools/client/shared/redux/middleware/thunk-with-options.js)
- [shared Redux createStore helper with thunks middleware](https://searchfox.org/mozilla-central/source/devtools/client/shared/redux/create-store.js#54,104)
Redux docs
- [Async Actions in Redux](https://redux.js.org/advanced/async-actions)
- [dispatch() as default prop with redux-connect](https://react-redux.js.org/using-react-redux/connect-mapdispatch#default-dispatch-as-a-prop)

Differential Revision: https://phabricator.services.mozilla.com/D79556
2020-10-29 14:04:25 +00:00
Ben Delevingne 8f836b4a1e Bug 1673872 - [devtools] Remove defer usage in devtools/shared/security/cert.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94994
2020-10-29 13:02:59 +00:00
Ben Delevingne fd6f601334 Bug 1673918 - [devtools] Remove defer usage in devtools/client/shared/test/browser_dbg_listtabs-02.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95031
2020-10-29 13:02:03 +00:00
Hubert Boma Manilla f2eff26a41 Bug 1667370 - [devtools] Implement network request blocking in fission r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94449
2020-10-28 22:32:14 +00:00
Daisuke Akatsuka 473676fda0 Bug 1664941: Connect style actor and stylesheet watcher. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D90651
2020-10-29 06:26:20 +00:00
Cosmin Sabou 7a1d8770ac Backed out changeset 3b72cf9476d8 (bug 1667370) for xpc failures on test_protocol_index.js. CLOSED TREE 2020-10-28 23:35:36 +02:00
Hubert Boma Manilla 3d18cd113c Bug 1667370 - [devtools] Implement network request blocking in fission r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94449
2020-10-28 20:46:13 +00:00
Julian Descottes 7e7a9d78e0 Bug 1654998 - [devtools] Add a test to check the Add button is hidden for indexedDB r=ladybenko
Depends on D93082

New test to verify the bug fixed in the previous changeset

Differential Revision: https://phabricator.services.mozilla.com/D93083
2020-10-28 20:34:11 +00:00
Julian Descottes 148634a849 Bug 1654998 - [devtools] Check supports traits directly on individual storage fronts r=ladybenko
Depends on D93081

Differential Revision: https://phabricator.services.mozilla.com/D93082
2020-10-28 20:34:03 +00:00
Julian Descottes b5906333d9 Bug 1654998 - [devtools] Remove backward compatibility code from storage-ui::_readSupportsTraits r=ladybenko
Traits support was added to the storage actor in FF80.
Firefox release is now FF81 so we can cleanup the related backward compatibility code.

Differential Revision: https://phabricator.services.mozilla.com/D93081
2020-10-28 20:19:06 +00:00
Ben Delevingne 30a007f78c Bug 1673873 - [devtools] Remove defer usage in devtools/shared/security/auth.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94995
2020-10-28 15:41:22 +00:00
Ben Delevingne fc9a30b052 Bug 1673881 - Remove defer usage in devtools/client/storage/VariablesView.jsm. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94997
2020-10-28 15:40:08 +00:00
Ben Delevingne 44743fea0a Bug 1673724 - Remove defer usage in devtools/shared/qrcode/index.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94891
2020-10-28 11:33:21 +00:00
Nicolas Chevobbe 19b6059139 Bug 1672942 - [devtools] Remove devtools-launchpad_vx.x.x.js file. r=bomsy.
This file is only used for Flow, and since we're not requiring the launchpad anymore, we can safely remove it.

Differential Revision: https://phabricator.services.mozilla.com/D94575
2020-10-23 15:36:02 +00:00
Nicolas Chevobbe f6eb028f00 Bug 1672937 - [devtools] Remove l10n fixtures in accessibility jest tests. r=yzen.
Those fixtures aren't needed anymore since the l10n module supports
Node environment.
Tests and stubs were updated accordingly so we now have the actual
properties values instead of their keys.

Depends on D94571

Differential Revision: https://phabricator.services.mozilla.com/D94572
2020-10-24 06:05:07 +00:00
Nicolas Chevobbe adaeabc2bf Bug 1672935 - [devtools] Remove l10N fixtures in webconsole mocha tests. r=ladybenko.
Now that the l10n module handles node environment, we no
longer need the existing fixtures for the mocha tests.
A couple tests needed to be updated to pass.

Depends on D94570

Differential Revision: https://phabricator.services.mozilla.com/D94571
2020-10-27 17:23:57 +00:00
Nicolas Chevobbe 42ad3be65b Bug 1672932 - [devtools] Don't use devtool-launchpad l10n fixtures in debugger jest tests. r=ladybenko.
The l10n module works properly in Node environment now, so we can directly use it.

Depends on D94568

Differential Revision: https://phabricator.services.mozilla.com/D94570
2020-10-27 11:04:38 +00:00
Nicolas Chevobbe 8eb8c85437 Bug 1672930 - [devtools] Handle Node environment in l10n module. r=ladybenko.
In most of our node tests (jest and mocha), we need to rely on fixtures for the
l10n modules because in its current shape, the module couldn't load the properties
files properly.
This patch fixes that by detecting if we're in a Node environment, and in such
case load the file using `readFileSync`.
We are also able to remove the specific code we had for webpack as it doesn't
seem to be used anymore.

The Spectrum.js file needed to be updated to fix the paths it was using.

Differential Revision: https://phabricator.services.mozilla.com/D94568
2020-10-26 17:11:17 +00:00
Hubert Boma Manilla 891cb2a29f Bug 1556917 - [devtools] Wait for next tick to make sure toolbar mode has changed r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94710
2020-10-27 15:24:54 +00:00
Hubert Boma Manilla 66158e4209 Bug 1671869 - [devtools] Fix intermittent failures for stacktraces test r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94707
2020-10-27 15:26:06 +00:00
Nicolas Chevobbe f24966129e Bug 1673550 - [devtools] Destroy the thread actor when the worker target actor is destroyed. r=ochameau.
We have to manually call `ThreadActor#exit` as calling `destroy` won't completely
destroy it, since it does not call `Actor#destroy`, whereas `ThreadActor#exit` does.

Differential Revision: https://phabricator.services.mozilla.com/D94835
2020-10-27 15:10:46 +00:00
Sean Feng 37a638e521 Bug 1518999 - Refactor some performance.getEntries related tests r=mstange
Some tests made some assumptions about the number of returned entries
by performance.getEntries, and these assumptions are not valid
anymore once we added new entries.

Depends on D66463

Differential Revision: https://phabricator.services.mozilla.com/D68645
2020-10-27 16:25:50 +00:00
Tom Schuster 47d5c1a2d2 Bug 1673440 - Update devtools evaluationResult test after illegal character error message change r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D94823
2020-10-27 15:33:39 +00:00
Markus Stange af68ac4a30 Bug 1673132 - Use the -moz-default-appearance values "scrollbar-horizontal" and "scrollbar-vertical" on macOS and remove the now-unused value "scrollbar". r=emilio
Other platforms were already converted to scrollbar-horizontal and scrollbar-vertical in bug 1205643.

Differential Revision: https://phabricator.services.mozilla.com/D94674
2020-10-27 12:37:44 +00:00
Markus Stange cb8968058f Bug 1673132 - Remove "scrollbar-small" -moz-default-appearance value and replace its single use with scrollbar-width: thin. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D94673
2020-10-27 12:37:44 +00:00
Ben Delevingne c9aa53a1ec Bug 1673386 - remove defer from devtools/shared/tests/xpcshell/test_executeSoon.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94739
2020-10-27 15:23:22 +00:00
Razvan Maries d1cb2cdff6 Backed out 2 changesets (bug 1673440) for SM Bustages on testPrintError.cpp. CLOSED TREE
Backed out changeset c4448be58fcb (bug 1673440)
Backed out changeset 5a0e794b51bf (bug 1673440)
2020-10-27 16:46:54 +02:00
Tom Schuster 02172b3b7e Bug 1673440 - Update devtools evaluationResult test after illegal character error message change r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D94823
2020-10-27 13:53:44 +00:00
Naman Jain 035c7fa07e Bug 1671080 - [devtools] Remove unused devtools/client/shared/components/reps/reps/caption.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D94814
2020-10-27 12:44:59 +00:00
Julian Descottes 35b6450a6c Bug 1666815 - [devtools] Add dark theme support to new performance panel onboarding r=julienw
Depends on D94711

We might fold this in the first changeset after review.
Updated the links color of the whole panel to use a theme variable.
Used another theme variable for the button hover/active background color.

Differential Revision: https://phabricator.services.mozilla.com/D94747
2020-10-27 11:33:00 +00:00
Julian Descottes 626540c038 Bug 1666815 - [devtools] Add a test for new performance panel onboarding r=julienw
Depends on D94355

Differential Revision: https://phabricator.services.mozilla.com/D94711
2020-10-27 11:32:57 +00:00
Julian Descottes bb9e772655 Bug 1666815 - [devtools] Simple on-boarding UI for the new Performance panel r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D94355
2020-10-27 11:31:17 +00:00
Neil Deakin 46d6cc2f05 Bug 1672390, remove message manager use from browser_connectToFrame.js, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94667
2020-10-27 00:26:35 +00:00
Neil Deakin a1982d3e68 Bug 1672390, remove message manager use from about debugging tests, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94666
2020-10-27 00:26:33 +00:00
Neil Deakin 851cf6f453 Bug 1672390, remove frame script and message manager use from devtools/client/inspector tests, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94390
2020-10-27 00:26:24 +00:00
Neil Deakin 46d65ff561 Bug 1672390, remove frame script and message manager use in devtools/client/shared/sourceeditor, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94389
2020-10-27 00:26:22 +00:00
Neil Deakin 42167e0a0f Bug 1672390, remove message manager and frame scripts from devtools/client/performance, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94388
2020-10-27 00:26:14 +00:00
Neil Deakin c2792f5216 Bug 1672390, remove code_frame-script.js frame script and replace with SpecialPowers.spawn, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94387
2020-10-27 00:26:12 +00:00
Neil Deakin 0ad047845e Bug 1672390, remove message manager use from browser_layoutHelpers_getBoxQuads1.js, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94386
2020-10-27 00:26:04 +00:00
Julian Descottes 1310ab1a6f Bug 1673421 - [devtools] Remove double await in devtools codebase r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D94752
2020-10-27 08:34:33 +00:00
Fabien CASTERS 054244e95b Bug 1672433 - Remove backward compatibility method getDescription from devtools/client/fronts/device.js r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94731
2020-10-26 20:20:57 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bryce Seager van Dyk a861f9e347 Bug 1669570 - Rename MeidaController to MediaSupervisor for the profiler. r=alwu
Depends on D93806

Differential Revision: https://phabricator.services.mozilla.com/D93807
2020-10-16 18:18:46 +00:00
Alexandre Poirot a752734da8 Bug 1671926 - [devtools] Test EvaluationContext in the Browser Toolbox. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D94282
2020-10-26 16:46:07 +00:00
Nicolas Chevobbe d40666da1d Bug 1633712 - [devtools] Add a console message resource test for worker targets. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D88770
2020-10-26 12:55:06 +00:00
Nicolas Chevobbe 8470542b39 Bug 1633712 - [devtools] Add test cases to browser_target_list_tab_workers and remove the fission fail-if. r=jdescottes.
Check that when removing iframes, we're notified about the worker unregistration,
and check that the target list works as expected when we have multiple iframes
on same origin (both remote and same-origin as main document).

The test documents are modified so we can avoid spawning shared and/or service
workers (in the case of this test, this seems to prevent some memory leaks/crashes).

Differential Revision: https://phabricator.services.mozilla.com/D88769
2020-10-26 12:54:14 +00:00
Nicolas Chevobbe edca74234a Bug 1633712 - [devtools] Create WorkerTargets as soon as possible. r=ochameau,devtools-backward-compat-reviewers.
This patch adds support for dedicated worker targets in the Watcher actor.
Shared and Service workers are not handled yet.

In a similar manner to what we already have for frame targets, we add a worker-helper
file that will communicate with a JsWindowActor pair spawned on each document,
that will  manage workers (DevToolsWorkerParent/DevToolsWorkerChild).

For a given document, the DevToolsWorkerChild will enumerate the existing workers
related to it, as well as add an event listener to be notified when workers are
being registered and unregistered, and communicate that back to the DevToolsWorkerParent
on the main thread, so worker targets creation and destruction are notified by
the Watcher actor (via target-available-form and target-destroyed-form events).

When a worker is created, the DevToolsWorkerChild for the document the worker
was spawned from will create a WorkerTargetActor, that will live in the worker
thread (using worker-connector.js), passing it resources the Watcher is currently
listening for. It will also handle communication between the main thread and the
worker thread, when the watcher listen to new resources (or stop watching resources).

A WorkerTargetFront is created so the client can be notified about available
resources (via the resource-available-form event, emitted from the worker target).

Tests are added in the next patches of this queue.

Differential Revision: https://phabricator.services.mozilla.com/D85399
2020-10-26 12:53:43 +00:00
Nicolas Chevobbe 268a9bef36 Bug 1633712 - [devtools] Move shouldNotifyWindowGlobal and getAllRemoteBrowsingContexts to a util file. r=ochameau.
These functions will be used by the worker-helper.js module as well.

Differential Revision: https://phabricator.services.mozilla.com/D92751
2020-10-26 12:52:26 +00:00
Razvan Maries 0149b9e108 Bug 1582395 - Disabled browser_boxmodel_update-after-navigation.js on Windows and Linux x64. r=intermittent-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D94689
2020-10-26 13:28:27 +00:00
Bogdan Tara 2f86073059 Backed out changeset 9163c138b0ee (bug 1672433) for test_front_destroy failures CLOSED TREE 2020-10-26 18:42:00 +02:00
Razvan Maries 7285b514c0 Bug 1605107 - Disabled browser_browser_toolbox_fission_inspector.js on multiple platforms. r=intermittent-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D94683
2020-10-26 13:26:26 +00:00
Fabien CASTERS 96b7d5f1bb Bug 1672433 - Remove backward compatibility method getDescription from devtools/client/fronts/device.js r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94731
2020-10-26 14:29:28 +00:00
Alexandre Poirot ecca7cad66 Bug 1672778 - [devtools] Avoid trying to send new-source event if the thread actor has been destroyed. r=nchevobbe
This may prevent logging a few exception or error messages.
But thanks to the other patch of this bug, we should try to stop listening
for sources as soon as the thread actor is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D94484
2020-10-23 10:24:57 +00:00
Alexandre Poirot 2839b0697a Bug 1672778 - [devtools] Destroy the thread actor when the content process actor is destroyed. r=nchevobbe
We have to manually call `exit` as calling `destroy` won't completely destroy it.
ThreadActor.destroy do not call protocoljs.Actor.destroy, ThreadActor.exit does it.

Differential Revision: https://phabricator.services.mozilla.com/D94483
2020-10-26 11:00:05 +00:00
Josue 603ab065f5 Bug 1597248 - Fixed selected nodes are hard to read in markup view r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94399
2020-10-26 08:03:59 +00:00
Hubert Boma Manilla bdc732974d Bug 1672777 - [devtools] Only try to replace the mime-type when it is available r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94593
2020-10-25 09:13:26 +00:00
Ted Campbell e1d1f04395 Bug 1672172 - Make source notes relative to initial line/column. r=jandem
Update the SetLine / ColSpan source-notes to be relative to the script's
initial line and column number. This allows for more bytecode sharing.

Differential Revision: https://phabricator.services.mozilla.com/D94116
2020-10-24 01:12:57 +00:00
Bogdan Tara 7e2f80a26c Backed out changeset 0b27951e02d6 (bug 1672172) for browser_resources_* devtools failures CLOSED TREE 2020-10-24 04:10:13 +03:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ted Campbell 2189239f96 Bug 1672172 - Make source notes relative to initial line/column. r=jandem
Update the SetLine / ColSpan source-notes to be relative to the script's
initial line and column number. This allows for more bytecode sharing.

Differential Revision: https://phabricator.services.mozilla.com/D94116
2020-10-23 22:48:52 +00:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Sean Feng 5fc0b74bd2 Bug 1518999 - Refactor some performance.getEntries related tests r=mstange
Some tests made some assumptions about the number of returned entries
by performance.getEntries, and these assumptions are not valid
anymore once we added new entries.

Depends on D66463

Differential Revision: https://phabricator.services.mozilla.com/D68645
2020-10-23 19:44:11 +00:00
Mats Palmgren 0d4b979717 Bug 1672807 - [css-grid-3] Enable masonry layout by default in Nightly. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D94522
2020-10-23 09:10:56 +00:00
seunbayo d454e87ef4 Bug 1671163 - [devtools] Move object inspector out of reps folder. r=nchevobbe
require for files in this folder are updated accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D94582
2020-10-23 14:50:09 +00:00
Belén Albeza 73df559223 Bug 1666519 - Part 2: [devtools] Add fission test helpers + a test for localStorage r=jdescottes
NOTE: Depends on D92634

This patch adds:

- A simple test for `localStorage` working on Fission
- Adapts `openTab` and `finishTests` helpers on `head.js`, that are used by all the storage mochitests.

However, by enabling the `openTab` helper to work on Fission, some tests that were previously failing early that were marked with `fail-if = fission` were finishing their setup, but _not_ their cleanup, which messed with following tests, since some of the HTML pages are shared a lot. In order to fix that, I've modified the problematic HTML pages so before doing their setup, they run their cleanup just in case. We can probably remove this once Fission is fully working.

Differential Revision: https://phabricator.services.mozilla.com/D93808
2020-10-23 12:03:16 +00:00
Belén Albeza e6d07a37fa Bug 1666519 - Part 1: [devtools] Add localStorage resource r=ochameau
Tests are added in the next revision of the stack: D93808

Differential Revision: https://phabricator.services.mozilla.com/D92634
2020-10-23 11:58:45 +00:00
Ben Delevingne ac03414e88 Bug 1672245 - remove defer from browser_inplace-editor-01.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94147
2020-10-23 11:28:17 +00:00
Ben Delevingne 6070bcee96 Bug 1672220 - remove defer from browser_dbg_listtabs-01. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94130
2020-10-23 11:04:29 +00:00
Ben Delevingne 98ffa782b9 Bug 1672333 - remove defer from browser_inplace-editor-02.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94273
2020-10-23 11:01:42 +00:00
Ben Delevingne f3e01fb112 Bug 1672339 - remove defer from test_discovery.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94276
2020-10-23 11:00:02 +00:00
Ben Delevingne 4c645f7aaa Bug 1672364 - remove defer from devtools/server. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94296
2020-10-23 10:56:00 +00:00
Razvan Caliman 58bdf90e75 Bug 1623667 - [devtools] Update Storage panel to use Box Model Highlighter r=ladybenko
Depends on D92227

Update Storage panel to use Toolbox shortcut to highlighter introduced in D92222.

Differential Revision: https://phabricator.services.mozilla.com/D92228
2020-10-23 10:08:39 +00:00
Razvan Caliman 2adb4a2d1e Bug 1623667 - [devtools] Update Console to use Box Model Highlighter r=nchevobbe
Depends on D92226

Update Console tests to use the Toolbox shortcut to the highlighter. See D92222.
The Console itself [already uses that shortcut](https://searchfox.org/mozilla-central/rev/222e4f64b769413ac1a1991d2397b13a0acb5d9d/devtools/client/webconsole/webconsole.js#385-396).

Differential Revision: https://phabricator.services.mozilla.com/D92227
2020-10-20 14:43:28 +00:00
Razvan Caliman 8f9a0090e4 Bug 1623667 - [devtools] Update Frame selector to use Box Model Highlighter r=ochameau
Depends on D92225

Update Frame selector to use Toolbox shortcut to highlighter introduced in D92222

Differential Revision: https://phabricator.services.mozilla.com/D92226
2020-10-23 10:14:24 +00:00
Razvan Caliman b351f3fa35 Bug 1623667 - [devtools] Update Debugger to use Box Model Highlighter r=ochameau
Depends on D92224

Update Debugger tests to use the Toolbox shortcut to highlighters introduced in D92222.

Differential Revision: https://phabricator.services.mozilla.com/D92225
2020-10-22 16:16:35 +00:00
Razvan Caliman 47df8bb5cd Bug 1623667 - [devtools] Update extension panels to use Box Model Highlighter r=jdescottes
Depends on D92223

The Inspector sidebar extensions and corresponding tests have access to the Inspector client in order to access methods to invoke highlighters so there is no need for the Toolbox shortcut introduced in D92222.

Differential Revision: https://phabricator.services.mozilla.com/D92224
2020-10-20 14:43:41 +00:00
Razvan Caliman 8f2cbeb4df Bug 1623667 - [devtools] Update DOM panel to use Box Model Highlighter r=jdescottes
Depends on D92222

Update the DOM panel and tests to use the Toolbox shortcut to the highlighter introduced in D92222.

Differential Revision: https://phabricator.services.mozilla.com/D92223
2020-10-20 14:43:15 +00:00
Razvan Caliman 0e07d6ebe0 Bug 1623667 - [devtools] Update Toolbox shortcut to show/hide Box Model Highlighter r=ochameau
Depends on D92221

The `HighlighterActor/Front` was accessed by the Debugger, Web Console and other panels via a shortcut on the Toolbox: `toolbox.getHighlighter()`. This returned two helper methods: `highlight()` and `unhighlight()` scoped to `InspectorFront.HighlighterFront` so that consumers wouldn't have to handle that instantiation themselves.

This patch keeps the shortcut on Toolbox for consumers to use, but it updates it to point to `HighlightersOverlay` on the Inspector client. That is the new Fission-ready highlighter manager which can toggle highlighters in the appropriate browsing contexts. The `highlight()` and `unhighlight()` methods are proxies for showing/hiding the Box Model Highlighter, which is the same highlighter used within the Inspector to highlight nodes.

In addition to the `highlight()` and `unhighlight()` methods, we add two more helpers to react to the show/hide events fired by this highlighter. These are now used just in tests. The reason to add these is to avoid having individual non-Inspector tests go through the trouble of instantiating the Inspector client so they can listen to events themselves, like we did in D85862.

After migrating all highlighter accessors (ex: Grid, Flexbox, Shapes) from `HighlightersOverlay` to use the new process-agnostic approach introduced in D81526, we could potentially decouple `HighlightersOverlay` from Inspector client and put it directly on the Toolbox instance. Then, this shortcut wouldn't have to instantiate an Inspector client in order to invoke highlighters. But, for now, this works and is minimally invasive. The consumers in Debugger, Web Console, etc don't have to change their call signatures.

Differential Revision: https://phabricator.services.mozilla.com/D92222
2020-10-20 14:43:18 +00:00
Razvan Caliman 7feae1e668 Bug 1623667 - [devtools] Update CustomHighlighterActor comments and docs r=ochameau
Depends on D92220

Rephrasing of code comments and cleanup of documentation to reflect that `CustomHighlighterActor` is now the only actor which deals with highlighting stuff after removing `HighlighterActor` in D92220. No functionality is changed in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D92221
2020-10-20 14:43:20 +00:00
Razvan Caliman 8dacfff4f6 Bug 1623667 - [devtools] Remove HighlighterActor r=ochameau,devtools-backward-compat-reviewers
This patch completely removes the `HighlighterActor` and its accessors.

The rest of the patches in this commit series update the consumers and tests to use the new highlighter manager added to `HighlightersOverlay` in D81526. [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) updated all consumers within the **Inspector** panel to use this approach. Now, we're updating the rest of the consumers outside the Inspector.

### Why remove HighlighterActor?

The changes introduced in D81526 for [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) make it possible to  highlight nodes using the `CustomHighligtherActor` with the **Box Model Highlighter** implementation.

The `HighlighterActor` was itself a wrapper around **Box Model Highlighter** and Simple Outline Highlighter, and exposed node picking functionality. Simple Outline Highlighter was removed with [Bug 1650094](https://bugzilla.mozilla.org/show_bug.cgi?id=1650094). The node picking functionality was decoupled from `HighlighterActor`in [Bug 1607756](https://bugzilla.mozilla.org/show_bug.cgi?id=1607756).

After those changes, `HighlighterActor` is no longer special. It can be removed in favor of a single generic actor, `CustomHighligtherActor`, with the Box Model Highlighter implementation.

Differential Revision: https://phabricator.services.mozilla.com/D92220
2020-10-20 14:43:23 +00:00
Alexandre Poirot 8458fea935 Bug 1672660 - [devtools] Unregister docshell listeners only if we had time to register them. r=nchevobbe
It looks like we are destroying the target actor immediately, without having time
to call _watchDocshells. And given that removeObserver throws if there is no matching listener
already registered, it prevent detaching the target correctly, and, introduces a leak.

Differential Revision: https://phabricator.services.mozilla.com/D94452
2020-10-22 20:13:28 +00:00
Csoregi Natalia 22aaaaef5c Backed out changeset 77c34aa0aaf3 (bug 1669961) for causing crashtests. CLOSED TREE 2020-10-22 23:13:31 +03:00
Michael Kaply c7c4a35de5 Bug 1559181 - Switch about blocking to use new REJECT_POLICY and cleanup tests r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D93390
2020-10-22 19:36:52 +00:00
Kris Maglione 3cf334a80a Bug 1669961: Return null from `.contentWindow` when inner window is inactive. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93853
2020-10-22 19:05:04 +00:00
Fabien CASTERS 5905f5582a Bug 1664767 - Remove defer usage in devtools\client\fronts\device.js r=Honza
Finally, `screenshotToBlob` method is unused.

Differential Revision: https://phabricator.services.mozilla.com/D94439
2020-10-22 16:42:51 +00:00
Alexandre Poirot fe4803309b Bug 1620248 - [devtools] Rename content-process.jsm init method to initContentProcessTarget. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94373
2020-10-22 10:02:47 +00:00
Alexandre Poirot 01c64de783 Bug 1620248 - [devtools] Test content process console messages in a resource watcher test. r=nchevobbe
For now, resource watcher tests were only testing resources from a single tab.
This test targets the main process, like the browser toolbox and so will listen to all targets,
including content process targets.

Differential Revision: https://phabricator.services.mozilla.com/D93734
2020-10-22 10:02:44 +00:00
Alexandre Poirot 8cfdbef9f5 Bug 1620248 - [devtools] Create ContentProcessTarget from the server side via the Watcher Actor. r=nchevobbe,jdescottes
Before, targets were created on-demand, from the frontend, by calling ProcessDescriptor.getTarget
when the root actor informed the frontend of a creation of a content process via processListChanged event
and the notification of a new ProcessDescriptor.
This previous behavior was making so that the target actor was created very late and did not allow
recording for resources (console messages for ex), nor setting breakpoints very early during the process startup.

With this new implementation, the watcher actor allows knowing if the frontend cares about content process target or not.
We should only create these targets if the browser toolbox is opened, and typically not if we are only debugging a tab via a regular web toolbox.
We do that via WatcherActor.watchTarget and sharedData object.
content-process-script.js is loaded in all processes. Process script are loaded quite early during process startup.
Soonish after `sharedData` is passed to the content process.
So that it is hopefully executed before most privileged javascript runs.
Javascript code where we possibly want to debug/observe/set a breakpoint on.
This setup allows us to create the Content Process Target actor much earlier than the previous setup.
When created, the target actor immediately start listening for resources (console message and others) via its `addWatcherDataEntry` method.
In a near future, breakpoints will also be set via this method.

We should also followup to use something else than Process Script and sharedData
in order to create the target earlier, before any JS runs.

Differential Revision: https://phabricator.services.mozilla.com/D65529
2020-10-22 10:02:42 +00:00
Alexandre Poirot 23e54f0836 Bug 1620248 - [devtools] Make hooks.onClosed optional for all Transport classes. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D93193
2020-10-22 10:02:34 +00:00
Alexandre Poirot e1aa84044b Bug 1620248 - [devtools] Ensure destroying ContentProcess target when the target is destroyed before process shutdown. r=nchevobbe,jdescottes
For now, we were emitting the "tabDetached" event on message-manager-close (=process shutdown),
or when the DevToolsServerConnection closes (=client closes the connection).
But not when the target is being destroyed by the frontend when calling ResourceWatcher.unwatchTargets,
which is calling process-helper's destroyTargets.
This was introducing test failure (browser_target_list_watchTargets.js) with never resolving RDP requests.

Differential Revision: https://phabricator.services.mozilla.com/D91559
2020-10-22 10:02:31 +00:00
Nicolas Chevobbe cce1b01c95 Bug 1671916 - [devtools] Remove non-existing modules from debugger build config. r=bomsy.
fronts-device, devtools-connection and chrome-remote-interface don't
seem to be used, so we can safely remove them.

Differential Revision: https://phabricator.services.mozilla.com/D93999
2020-10-22 06:21:41 +00:00
Nicolas Chevobbe e6c080c894 Bug 1672197 - [devtools] Remove unused main.development.js file. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D94117
2020-10-22 06:21:15 +00:00
Nicolas Chevobbe 08f1de17a8 Bug 1672199 - [devtools] Remove unnecessary require on launchpad CSS file. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D94113
2020-10-22 06:20:46 +00:00
Nicolas Chevobbe e683c92820 Bug 1672180 - [devtools] Remove devtools-launchpad dependency in bin/bundle.js. r=jdescottes.
The two functions we were using, makeBundle and copyFile, were simple
enough so we could directly inline them in the script.
The task run as before, but for some reason the order of some modules
changed in the resulting bundles.

Differential Revision: https://phabricator.services.mozilla.com/D94108
2020-10-22 06:20:25 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Boris Chiou 8b4bc86a78 Bug 1672078 - Enable aspect-ratio on nightly. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D94061
2020-10-21 07:42:56 +00:00
Bogdan Tara 3f38cbb0f8 Backed out 2 changesets (bug 1666519) for devtools leaks and failures CLOSED TREE
Backed out changeset 94c066ab05dc (bug 1666519)
Backed out changeset 990b312b5abe (bug 1666519)
2020-10-21 18:42:25 +03:00
Emilio Cobos Álvarez 9944e5344c Bug 1634776 - Fix some cascade level checks in devtools. r=rcaliman
The regression was caused because it incorrectly started treating user
stylesheets as "system" sheets, which can't be modified.

Fix the regression by properly using SharedCssLogic.isAgentStylesheet
instead.

Also fix the check for whether chrome rules apply to handle user
stylesheets and inline style attributes in chrome documents correctly,
see the comment.

Differential Revision: https://phabricator.services.mozilla.com/D93088
2020-10-21 14:56:46 +00:00
Alexandre Poirot 17579d8c04 Bug 1267443 - [devtools] Wait for test function to be imported into browser toolbox. r=jdescottes
We weren't waiting for assertion function to be evaluated in the console.
This can later lead to ok/is functions being undefined when calling Toolbox.spawn.

Differential Revision: https://phabricator.services.mozilla.com/D94279
2020-10-21 09:48:22 +00:00
Belén Albeza bb0ea85edc Bug 1666519 - Part 2: [devtools] Add fission test helpers + a test for localStorage r=jdescottes
NOTE: Depends on D92634

This patch adds:

- A simple test for `localStorage` working on Fission
- Adapts `openTab` and `finishTests` helpers on `head.js`, that are used by all the storage mochitests.

However, by enabling the `openTab` helper to work on Fission, some tests that were previously failing early that were marked with `fail-if = fission` were finishing their setup, but _not_ their cleanup, which messed with following tests, since some of the HTML pages are shared a lot. In order to fix that, I've modified the problematic HTML pages so before doing their setup, they run their cleanup just in case. We can probably remove this once Fission is fully working.

Differential Revision: https://phabricator.services.mozilla.com/D93808
2020-10-21 14:05:14 +00:00
Belén Albeza 223b34efcf Bug 1666519 - Part 1: [devtools] Add localStorage resource r=ochameau
Tests are added in the next revision of the stack: D93808

Differential Revision: https://phabricator.services.mozilla.com/D92634
2020-10-21 14:05:14 +00:00
Ben Hearsum 2167d1b284 Bug 1638957: run 'mach devtools-css-db' under python 3. r=releng-reviewers,aki DONTBUILD
It's not 100% clear how long this command will live, but it doesn't look
immediately removable, and it was easy to add python3 support.

Differential Revision: https://phabricator.services.mozilla.com/D94179
2020-10-21 14:04:17 +00:00
Ben Delevingne 2dd4dbb9c9 Bug 1672347 - remove defer from devtools/shared/discovery/tests/xpcshell. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94283
2020-10-21 10:59:32 +00:00
Nicolas Chevobbe e88dedbbe0 Bug 1672132 - [devtools] Inline renderPanel into boostrapApp. r=jdescottes.
`boostrapApp` had a check for supporting the Launchpad, that we can now remove.
And since `renderPanel` is only called from there, we can safely inline it.

Differential Revision: https://phabricator.services.mozilla.com/D94083
2020-10-20 14:25:40 +00:00
Julian Descottes f78ea8ee85 Bug 1671676 - [devtools] Update browser_setupInParentChild.js to only test setupInParent r=ochameau
Depends on D93821

Differential Revision: https://phabricator.services.mozilla.com/D93822
2020-10-20 20:48:54 +00:00
Julian Descottes 138356ac36 Bug 1671676 - [devtools] Remove setupInChild from DevTools codebase r=ochameau
Depends on D93820

This is no longer used, except in one test which will be cleaned up in the next changeset.

Differential Revision: https://phabricator.services.mozilla.com/D93821
2020-10-20 20:48:35 +00:00
Julian Descottes 1ba86569a5 Bug 1671609 - [devtools] Remove swapBrowser methods from DevTools transports r=ochameau
Depends on D93819

Differential Revision: https://phabricator.services.mozilla.com/D93820
2020-10-20 17:02:31 +00:00
Julian Descottes 134032de33 Bug 1671609 - [devtools] Simplify message manager handling in storage actor r=ochameau,ladybenko
Depends on D93817

There should no longer be new message managers during the lifecycle of the actor.
We can simplify the storage actor thanks to this.

Differential Revision: https://phabricator.services.mozilla.com/D93819
2020-10-20 17:02:36 +00:00
Julian Descottes 23b2aef1c7 Bug 1671609 - [devtools] Remove browserSwap support from devtools r=ochameau
This method was only useful for the old RDM implementation and can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D93817
2020-10-20 17:02:34 +00:00
Tim Nguyen ce1d1adc9a Bug 1356031 - Remove toolkit error-16.png and replace usages with respective SVGs. r=Itiel
Differential Revision: https://phabricator.services.mozilla.com/D94173
2020-10-20 21:14:47 +00:00
Razvan Maries 3954e7eb5a Backed out 5 changesets (bug 1671676, bug 1671609) for Lint failure on frame.js. CLOSED TREE
Backed out changeset aba7c7caae10 (bug 1671676)
Backed out changeset 68449199cb9a (bug 1671676)
Backed out changeset 107e0c2f141a (bug 1671609)
Backed out changeset 02bc34c28501 (bug 1671609)
Backed out changeset 5efd9f6968ed (bug 1671609)
2020-10-20 19:59:11 +03:00
Julian Descottes 305bfc6182 Bug 1671676 - [devtools] Update browser_setupInParentChild.js to only test setupInParent r=ochameau
Depends on D93821

Differential Revision: https://phabricator.services.mozilla.com/D93822
2020-10-19 09:59:11 +00:00
Julian Descottes aef14fc3b4 Bug 1671676 - [devtools] Remove setupInChild from DevTools codebase r=ochameau
Depends on D93820

This is no longer used, except in one test which will be cleaned up in the next changeset.

Differential Revision: https://phabricator.services.mozilla.com/D93821
2020-10-19 19:34:25 +00:00
Julian Descottes 998b2a78f6 Bug 1671609 - [devtools] Remove swapBrowser methods from DevTools transports r=ochameau
Depends on D93819

Differential Revision: https://phabricator.services.mozilla.com/D93820
2020-10-19 09:54:17 +00:00
Julian Descottes 157cd2cea2 Bug 1671609 - [devtools] Simplify message manager handling in storage actor r=ochameau,ladybenko
Depends on D93817

There should no longer be new message managers during the lifecycle of the actor.
We can simplify the storage actor thanks to this.

Differential Revision: https://phabricator.services.mozilla.com/D93819
2020-10-20 16:23:08 +00:00
Julian Descottes 66b1914d6f Bug 1671609 - [devtools] Remove browserSwap support from devtools r=ochameau
This method was only useful for the old RDM implementation and can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D93817
2020-10-19 09:32:56 +00:00
Csoregi Natalia f9e58cacd1 Backed out 9 changesets (bug 1623667) for failures on devtools/client/*. CLOSED TREE
Backed out changeset 54ca4d13f54f (bug 1623667)
Backed out changeset ce62de8733f1 (bug 1623667)
Backed out changeset 4877c0c5ba2c (bug 1623667)
Backed out changeset d32decff7ea8 (bug 1623667)
Backed out changeset 53a2c44f955b (bug 1623667)
Backed out changeset 0addf3282b72 (bug 1623667)
Backed out changeset feeb0f0b3bb3 (bug 1623667)
Backed out changeset f90ccc4f5210 (bug 1623667)
Backed out changeset e18376ee942f (bug 1623667)
2020-10-20 17:39:28 +03:00
Razvan Caliman 6a415a3814 Bug 1623667 - [devtools] Update Storage panel to use Box Model Highlighter r=ladybenko
Depends on D92227

Update Storage panel to use Toolbox shortcut to highlighter introduced in D92222.

Differential Revision: https://phabricator.services.mozilla.com/D92228
2020-10-14 14:03:41 +00:00
Razvan Caliman a6a6ec172d Bug 1623667 - [devtools] Update Console to use Box Model Highlighter r=nchevobbe
Depends on D92226

Update Console tests to use the Toolbox shortcut to the highlighter. See D92222.
The Console itself [already uses that shortcut](https://searchfox.org/mozilla-central/rev/222e4f64b769413ac1a1991d2397b13a0acb5d9d/devtools/client/webconsole/webconsole.js#385-396).

Differential Revision: https://phabricator.services.mozilla.com/D92227
2020-10-08 07:15:56 +00:00
Razvan Caliman 1a58665f8a Bug 1623667 - [devtools] Update Frame selector to use Box Model Highlighter r=ochameau
Depends on D92225

Update Frame selector to use Toolbox shortcut to highlighter introduced in D92222

Differential Revision: https://phabricator.services.mozilla.com/D92226
2020-10-14 14:02:19 +00:00
Razvan Caliman c2c4bcebc3 Bug 1623667 - [devtools] Update Debugger to use Box Model Highlighter r=ochameau
Depends on D92224

Update Debugger tests to use the Toolbox shortcut to highlighters introduced in D92222.

Differential Revision: https://phabricator.services.mozilla.com/D92225
2020-10-20 13:35:17 +00:00
Razvan Caliman e94a8a04ad Bug 1623667 - [devtools] Update extension panels to use Box Model Highlighter r=jdescottes
Depends on D92223

The Inspector sidebar extensions and corresponding tests have access to the Inspector client in order to access methods to invoke highlighters so there is no need for the Toolbox shortcut introduced in D92222.

Differential Revision: https://phabricator.services.mozilla.com/D92224
2020-10-14 13:23:06 +00:00
Razvan Caliman 08c135a5d5 Bug 1623667 - [devtools] Update DOM panel to use Box Model Highlighter r=jdescottes
Depends on D92222

Update the DOM panel and tests to use the Toolbox shortcut to the highlighter introduced in D92222.

Differential Revision: https://phabricator.services.mozilla.com/D92223
2020-10-14 13:12:14 +00:00
Razvan Caliman cf0e836be4 Bug 1623667 - [devtools] Update Toolbox shortcut to show/hide Box Model Highlighter r=ochameau
Depends on D92221

The `HighlighterActor/Front` was accessed by the Debugger, Web Console and other panels via a shortcut on the Toolbox: `toolbox.getHighlighter()`. This returned two helper methods: `highlight()` and `unhighlight()` scoped to `InspectorFront.HighlighterFront` so that consumers wouldn't have to handle that instantiation themselves.

This patch keeps the shortcut on Toolbox for consumers to use, but it updates it to point to `HighlightersOverlay` on the Inspector client. That is the new Fission-ready highlighter manager which can toggle highlighters in the appropriate browsing contexts. The `highlight()` and `unhighlight()` methods are proxies for showing/hiding the Box Model Highlighter, which is the same highlighter used within the Inspector to highlight nodes.

In addition to the `highlight()` and `unhighlight()` methods, we add two more helpers to react to the show/hide events fired by this highlighter. These are now used just in tests. The reason to add these is to avoid having individual non-Inspector tests go through the trouble of instantiating the Inspector client so they can listen to events themselves, like we did in D85862.

After migrating all highlighter accessors (ex: Grid, Flexbox, Shapes) from `HighlightersOverlay` to use the new process-agnostic approach introduced in D81526, we could potentially decouple `HighlightersOverlay` from Inspector client and put it directly on the Toolbox instance. Then, this shortcut wouldn't have to instantiate an Inspector client in order to invoke highlighters. But, for now, this works and is minimally invasive. The consumers in Debugger, Web Console, etc don't have to change their call signatures.

Differential Revision: https://phabricator.services.mozilla.com/D92222
2020-10-13 16:07:53 +00:00
Razvan Caliman 1d2ad58af3 Bug 1623667 - [devtools] Update CustomHighlighterActor comments and docs r=ochameau
Depends on D92220

Rephrasing of code comments and cleanup of documentation to reflect that `CustomHighlighterActor` is now the only actor which deals with highlighting stuff after removing `HighlighterActor` in D92220. No functionality is changed in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D92221
2020-10-14 14:19:39 +00:00
Razvan Caliman e7d88cfad5 Bug 1623667 - [devtools] Remove HighlighterActor r=ochameau,devtools-backward-compat-reviewers
This patch completely removes the `HighlighterActor` and its accessors.

The rest of the patches in this commit series update the consumers and tests to use the new highlighter manager added to `HighlightersOverlay` in D81526. [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) updated all consumers within the **Inspector** panel to use this approach. Now, we're updating the rest of the consumers outside the Inspector.

### Why remove HighlighterActor?

The changes introduced in D81526 for [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) make it possible to  highlight nodes using the `CustomHighligtherActor` with the **Box Model Highlighter** implementation.

The `HighlighterActor` was itself a wrapper around **Box Model Highlighter** and Simple Outline Highlighter, and exposed node picking functionality. Simple Outline Highlighter was removed with [Bug 1650094](https://bugzilla.mozilla.org/show_bug.cgi?id=1650094). The node picking functionality was decoupled from `HighlighterActor`in [Bug 1607756](https://bugzilla.mozilla.org/show_bug.cgi?id=1607756).

After those changes, `HighlighterActor` is no longer special. It can be removed in favor of a single generic actor, `CustomHighligtherActor`, with the Box Model Highlighter implementation.

Differential Revision: https://phabricator.services.mozilla.com/D92220
2020-10-13 15:40:13 +00:00