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

22118 Коммитов

Автор SHA1 Сообщение Дата
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
Noemi Erli 0b32ab452c Backed out changeset 5cdea80e8600 (bug 1672132) for causing debugger failures CLOSED TREE 2020-10-20 16:45:26 +03:00
Nicolas Chevobbe cc072d9b86 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 12:35:24 +00:00
Sylvestre Ledru 71abba1805 no bug - Remove old DXR references r=andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D94076
2020-10-20 11:59:25 +00:00
Julian Descottes c745b4fa8e Bug 1671973 - [devtools] Add a test to check that DevTools forceReload bypasses the cache r=nchevobbe
This is a test for the bug fix that landed in https://bugzilla.mozilla.org/show_bug.cgi?id=1671959

A new test is added, forked from devtools/client/framework/test/browser_toolbox_window_reload_target.js
Most of the testReload helper from the original test is moved to the head.js of the folder.

The new test relies on a simple sjs file which simply prints the value of the cache-control header.

Differential Revision: https://phabricator.services.mozilla.com/D94041
2020-10-20 07:53:48 +00:00
Emilio Cobos Álvarez b44389f911 Bug 1671959 - Fix shift-reloading from the devtools toolbox. r=jdescottes
Not quite sure how to test it, didn't find an existing test to extend
off-hand.

Differential Revision: https://phabricator.services.mozilla.com/D94033
2020-10-19 16:34:36 +00:00
Ben Delevingne 541f51aabc Bug 1664769 - Remove defer usage from devtools\client\shared\test\helper_workers.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92479
2020-10-19 10:59:30 +00:00
Hubert Boma Manilla 3d1f26e2cd Bug 1663523 - [devtools] Add the network event stacktrace watcher r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D86809
2020-10-19 01:19:39 +00:00
Bogdan Tara 61728de827 Backed out changeset de71a00c6f68 (bug 1663523) for devtools/shared/ failures CLOSED TREE 2020-10-18 20:53:17 +03:00
Hubert Boma Manilla 403ec0015b Bug 1663523 - [devtools] Add the network event stacktrace watcher r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D86809
2020-10-18 17:11:36 +00:00
Michael Kaply f0ac540cc4 Bug 1279647 - Switch titlebar and tooltip separators to emdash. r=flod,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D93620
2020-10-15 20:00:28 +00:00
Hubert Boma Manilla 30aacc98e1 Bug 1670627 - [devtools] Pass the updateType to the data provider on the resource update event r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D93700
2020-10-16 09:42:48 +00:00
Alexandre Poirot be7dd39054 Bug 1671419 - [devtools] Avoid updating resource types if the list is empty. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D93657
2020-10-15 18:55:59 +00:00
Mihai Alexandru Michis 43951837ff Backed out changeset 6e63ffafb422 (bug 1279647) for causing multiple failures.
CLOSED TREE
2020-10-15 20:09:26 +03:00
Michael Kaply ba224a5ebc Bug 1279647 - Switch titlebar and tooltip separators to emdash. r=flod,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D93620
2020-10-15 15:42:59 +00:00
Julian Descottes 2bf491018d Bug 1667341 - [devtools] Return a descriptor from createTargetForTab r=ochameau
Depends on D91563

Differential Revision: https://phabricator.services.mozilla.com/D91613
2020-10-15 13:34:03 +00:00
Julian Descottes 5304f9f48e Bug 1667341 - [devtools] Move isDevToolsExtensionContext from the target to the descriptor r=ochameau,rpl
Differential Revision: https://phabricator.services.mozilla.com/D91563
2020-10-15 13:12:38 +00:00
Ben Delevingne ba70fdae23 Bug 1667634 - Order WS message column context menu consistently. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D93484
2020-10-15 10:36:58 +00:00
Csoregi Natalia e0eb861a18 Backed out 4 changesets (bug 1633712) for leaks. CLOSED TREE
Backed out changeset 03553b300b86 (bug 1633712)
Backed out changeset 19c8ea0b43df (bug 1633712)
Backed out changeset 6eaa4d12b58c (bug 1633712)
Backed out changeset 10f97f47c883 (bug 1633712)
2020-10-15 09:36:36 +03:00
Nicolas Chevobbe 4c0fda2660 Bug 1633712 - [devtools] Add a console message resource test for worker targets. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D88770
2020-10-15 05:18:58 +00:00
Nicolas Chevobbe 12e26edc41 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).

Differential Revision: https://phabricator.services.mozilla.com/D88769
2020-10-15 05:19:23 +00:00
Nicolas Chevobbe 1e17daf388 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-15 05:17:52 +00:00
Nicolas Chevobbe 54da2bd313 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-15 05:11:58 +00:00
Nicolas Chevobbe cc39cc39db Bug 1669956 - [devtools] Remove unused/unnecessary files from the reps folder. r=jdescottes.
There was an image folder, relic of an ancient time where
we needed to support the launchpad. We don't use those images anymore,
so the folder is removed.
The remaining files in the tset folder weren't used, so we remove
this folder as well.
Finally, there was a redux middleware folder, containing a thunk
and a waituntilService middleware. Those 2 modules already exist
in the codebase, so we can use those from the test that were using
the reps-specific version (with little adjustments).

This marks the end of the work for this bug.

Differential Revision: https://phabricator.services.mozilla.com/D93488
2020-10-14 14:40:09 +00:00
Nicolas Chevobbe b647f8cc2e Bug 1669956 - [devtools] Fix webconsole mocha tests. r=jdescottes.
Update babel config to transpile reps files.

Depends on D93480

Differential Revision: https://phabricator.services.mozilla.com/D93481
2020-10-14 13:19:38 +00:00
Nicolas Chevobbe d765e6f1c0 Bug 1669956 - [devtools] Fix compatibility jest tests. r=jdescottes.
The babel config needed to be tweaked in order to transpile the reps files.

Depends on D93395

Differential Revision: https://phabricator.services.mozilla.com/D93480
2020-10-14 12:00:07 +00:00
Nicolas Chevobbe bad5162eda Bug 1669956 - [devtools] Fix debugger jest tests. r=jdescottes.
Edit babel config to be able to parse reps file

Differential Revision: https://phabricator.services.mozilla.com/D93395
2020-10-14 11:57:54 +00:00
Nicolas Chevobbe 796b378898 Bug 1669956 - [devtools] Fix Reps support for the JSON Viewer. r=Honza.
This turns all the existing reps modules into AMD modules,
so they can be loaded in the JSON Viewer without trouble.
This means we had to change the test configuration so Reps
jest test can run.

Differential Revision: https://phabricator.services.mozilla.com/D93394
2020-10-14 14:52:11 +00:00
Nicolas Chevobbe 920274b3f6 Bug 1669956 - [devtools] Move object inspectors tests to devtools/client/shared/component/test/node. r=jdescottes.
For some reason the stubs needed to be updated (maybe an enzyme/jest update?)

Differential Revision: https://phabricator.services.mozilla.com/D93391
2020-10-14 11:49:57 +00:00
Nicolas Chevobbe 07807e84a1 Bug 1669956 - [devtools] Fix accessibility jest test. r=jdescottes.
Since the accessibility import the ObjectInspector, we need to add another
babel transformer to take care of it.

Differential Revision: https://phabricator.services.mozilla.com/D93389
2020-10-14 11:44:42 +00:00
Nicolas Chevobbe 49e674d823 Bug 1669956 - [devtools] Move reps test to the devtool/client/shared/component/test/node folder. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93378
2020-10-14 11:50:00 +00:00
Nicolas Chevobbe d750e62ad7 Bug 1669956 - [devtools] Run devtools shared components jest tests. r=jdescottes.
This allows the jest tests for the shared components to be run in the devtools-node task.

For some reason, the snapshots needed to be updated (it looked like we were
missing some bits?).

Differential Revision: https://phabricator.services.mozilla.com/D93376
2020-10-14 11:37:28 +00:00
Nicolas Chevobbe b90077d183 Bug 1669956 - [devtools] Update debugger bundles. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93375
2020-10-14 11:34:48 +00:00
Nicolas Chevobbe 6047021d99 Bug 1669956 - [devtools] Override bundled reps.css with the original one. r=jdescottes.
The file should now only impact reps, and not mention ObjectInspector or Tree.
The ObjectInspector.css and Tree.css files are added into jar.mn.
Panels using the object inspector component (console and debugger), need to import
all 3 css files, while panels only using reps benefit from a lighter reps.css file.

Differential Revision: https://phabricator.services.mozilla.com/D93374
2020-10-14 13:12:11 +00:00
Nicolas Chevobbe 021bd19c64 Bug 1669956 - [devtools] Fix loading reps from the debugger. r=jdescottes.
ObjectInspector-related flow types are migrated/merge into the debugger types
file.

Differential Revision: https://phabricator.services.mozilla.com/D93373
2020-10-14 11:36:38 +00:00
Nicolas Chevobbe 203fb1fd7f Bug 1669956 - [devtools] Move Tree component to devtools/client/shared and remove devtools-components. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93372
2020-10-14 11:32:58 +00:00
Nicolas Chevobbe cd1c9e51c2 Bug 1669956 - [devtools] Enable eslint for devtools/client/shared/components/reps. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93370
2020-10-14 11:33:16 +00:00
Nicolas Chevobbe 15547ae76c Bug 1669956 - [devtools] Fix require paths in reps folder. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93358
2020-10-14 11:24:21 +00:00
Nicolas Chevobbe 7d6dc35518 Bug 1669956 - [devtools] Remove classnames usage in ObjectInspector components. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93356
2020-10-14 11:24:29 +00:00
Nicolas Chevobbe c054be38ef Bug 1669956 - [devtools] Update require paths to reps modules. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93354
2020-10-14 11:24:17 +00:00
Nicolas Chevobbe af4bb5e2f6 Bug 1669956 - [devtools] Add moz.build in devtools/client/shared/components/reps. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93352
2020-10-14 11:24:14 +00:00
Nicolas Chevobbe c14ad4e144 Bug 1669956 - [devtools] Remove devtools-reps from debugger codebase. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93351
2020-10-14 11:24:07 +00:00
Nicolas Chevobbe 8ce3fd5303 Bug 1669956 - [devtools] Remove flow annotations from reps and object inspector. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93348
2020-10-14 11:20:32 +00:00
Nicolas Chevobbe 4bfc529b0d Bug 1669956 - [devtools] Remove reps bundle. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93347
2020-10-14 11:32:49 +00:00
Nicolas Chevobbe d959034890 Bug 1669956 - [devtools] Move reps to devtools/client/shared/components/reps . r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93345
2020-10-14 11:24:10 +00:00
Alexandre Poirot b5d324284b Bug 1667282 - [devtools] Fix browser_resources_network_events.js intermittent. r=bomsy
We should only assert `updates` attribute on resource-updated,
as we aren't guaranteed how many updates we will have in resource-available.
That's because of resource throttling. Updates may be coalesced into available,
but we can't predict how many.

Differential Revision: https://phabricator.services.mozilla.com/D93337
2020-10-14 13:03:31 +00:00
Daisuke Akatsuka 41e2c566d4 Bug 1662653: [devtools] Use other experimental properties instead of appearance. r=Honza
Depends on D93070

Differential Revision: https://phabricator.services.mozilla.com/D93297
2020-10-13 11:29:10 +00:00
Jan Odvarko da6a32c342 Bug 1662653: [devtools] Update MDN compat data r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D93070
2020-10-13 15:14:38 +00:00
Nicolas Chevobbe 0f899895ad Bug 1660609 - [devtool] Fix browser_console_devtools_loader_exception.js failure on Beta. r=ladybenko.
This test was failing on Beta because we are using the targetList to wait for
a given source to be available, in order to avoid pending connection to the
server (that were happening when the targetList was trying to attach the thread
of the target), but on Beta, for the browser console, we don't listen for anything
with the targetList if the Browser Toolbox fission pref is disabled.
To fix the test, we check the pref and wait for the target only if it's enabled.

Differential Revision: https://phabricator.services.mozilla.com/D92877
2020-10-13 16:42:22 +00:00
Nicolas Chevobbe 2a7a8a65bb Bug 1660609 - [devtools] Fix browser_jsterm_hide_when_devtools_chrome_enabled_false.js failures on Beta. r=ladybenko.
This test was using the browser console targetList to wait for a specific worker
target to be available. This was failing on Beta because for the Browser Console,
we only listen for workers if the browser toolbox fission pref is enabled, which
is the case on Nightly, but not on Beta.

To fix the test, we check the pref and wait for the target only if it's enabled.

Differential Revision: https://phabricator.services.mozilla.com/D92876
2020-10-13 16:41:48 +00:00
Narcis Beleuzu 0cc97d7a9e Backed out changeset f71a318e2dfc (bug 1662653) for dt failures on browser_rules_css-compatibility-check-add-fix.js CLOSED TREE 2020-10-13 18:07:04 +03:00
Julian Descottes e7e1ce40d9 Bug 1669000 - [devtools] Add fail-if=fission for browser_dbg_WorkerTargetActor.attach.js r=smaug,ochameau
This test perma fails on Fission since session-history-in-parent was enabled.
The test asserts workers retrieved from BrowsingContext targets as follows:
- go to page1, check we can get worker1
- go to page2, check we can get worker2
- go back to page1, check we can get worker1

On the last step, after navigating back, we are unable to retrieve the worker1 on page1

Differential Revision: https://phabricator.services.mozilla.com/D93251
2020-10-13 12:59:59 +00:00
JulianWels b88cf407ac Bug 1608074 - Set channel ReferrerInfo in privileged code instead of referrer header r=nchevobbe,mixedpuppy,valentin
Differential Revision: https://phabricator.services.mozilla.com/D59856
2020-10-13 12:27:26 +00:00
Mihai Alexandru Michis 55dd1dbe43 Backed out changeset b3fb1b5bbe34 (bug 1608074) for causing bustages in XMLHttpRequestMainThread.cpp
CLOSED TREE
2020-10-13 14:55:06 +03:00
JulianWels 2ae8134434 Bug 1608074 - Set channel ReferrerInfo in privileged code instead of referrer header r=nchevobbe,mixedpuppy,valentin
Differential Revision: https://phabricator.services.mozilla.com/D59856
2020-10-13 10:39:11 +00:00
Jan Odvarko d0ecf61755 Bug 1662653 - [devtools] Update MDN compat data r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D93070
2020-10-13 01:05:37 +00:00
Ben Delevingne 3dfaad2d7f Bug 1582699 - [devtools] Consolidate thunk middlewares. r=nchevobbe
Merge `thunk-with-options` behavior directly into `thunk`, update `thunk` and `thunk-with-options` callsites and finally remove now unused `thunk-with-options` (as well as netmonitor's own `thunk`)

Depends on D92888

Differential Revision: https://phabricator.services.mozilla.com/D93195
2020-10-13 07:45:52 +00:00
Ben Delevingne 14aa4fcf8e Bug 1582699 - [devtools] Update thunk actions to take an object as an argument. r=nchevobbe
In short, thunk actions are changing from a signature with 2 parameters (dispatch and getState): `(dispatch, getState)`, to an object that contains those properties: `({ dispatch, getState })`.
This is done so we can merge thunk and thunk-with-options

Differential Revision: https://phabricator.services.mozilla.com/D92888
2020-10-13 07:48:12 +00:00
Ben Delevingne db9a05f7cd Bug 1669693 - [devtools] fix WebSocket message keyboard navigation. r=Honza,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D92884
2020-10-12 11:46:51 +00:00
Ben Delevingne ff7ffd0451 Bug 1667751 - Parse STOMP within SockJS WebSocket messages. r=Honza,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D92374
2020-10-12 11:15:16 +00:00
Razvan Maries 3292353471 Bug 1667115 - Disabled browser_net_simple-request-data.js on multiple platforms. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D93129
2020-10-12 10:44:59 +00:00
Andreea Pavel b03f44cff7 Bug 1661641 - disable browser_net_fission_switch_target.js on fission win/linux 64 bits r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D93128
2020-10-12 10:34:55 +00:00
Andreea Pavel 3d18de3f43 Bug 1665482 - disable browser_inspector_fission_frame_navigation.js on fission win/linux 64 bits r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D93141
2020-10-12 10:36:19 +00:00
Julian Descottes 4d7f2e708f Bug 1669681 - [devtools] Ignore detach errors when purging Front requests r=ochameau
Depends on D92756

Detach errors can happen when a target is being destroyed.
Historically, those errors were swallowed in the TargetFront mixin.
However this logic became outdated when we started purging requests during Front::destroy.

This results in non-actionable error messages logged frequently while using DevTools.
This changeset updates the logic in target-mixin.js in order to swallow errors due to purged requests.

Differential Revision: https://phabricator.services.mozilla.com/D92757
2020-10-12 08:12:53 +00:00
Julian Descottes d4c1319148 Bug 1669681 - [devtools] Stop processing packet responses in destroyed Fronts r=ochameau
Depends on D93030

All Front requests are purged before the Front is destroyed.
In theory there is no reason to process packets after the Front has been destroyed.
It will only create cryptic error messages.

Differential Revision: https://phabricator.services.mozilla.com/D92756
2020-10-12 08:13:06 +00:00
Julian Descottes e1074b5ab6 Bug 1669681 - [devtools] Send tabDetached event before the forwardingCancelled event in content-process-connector r=ochameau
Depends on D93029

Emitting "forwardingCancelled" will result in purging requests on the target front, which almost equates to destroying the front.
We should emit the "tabDetached" event before that to avoid emitting events on already destroyed fronts.

Differential Revision: https://phabricator.services.mozilla.com/D93030
2020-10-12 08:13:19 +00:00
Julian Descottes a9480f8030 Bug 1669681 - [devtools] Send tabDetached event before the forwardingCancelled event in frame-connector r=ochameau
Emitting "forwardingCancelled" will result in purging requests on the target front, which almost equates to destroying the front.
We should emit the "tabDetached" event before that to avoid emitting events on already destroyed fronts.

Differential Revision: https://phabricator.services.mozilla.com/D93029
2020-10-12 08:13:29 +00:00
Miguel Roncancio d50a7cff43 Bug 1593933 - [devtools] Navigating should close existing console.group messages. r=nchevobbe
When a navigation message is added into the store, reset the currentGroup property
This adds a test to ensure the fix works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D92778
2020-10-12 08:36:19 +00:00
Julian Descottes 252349d915 Bug 1659969 - [devtools] Add Debugger test for sources from remote frames r=ochameau
Depends on D92687

Differential Revision: https://phabricator.services.mozilla.com/D87583
2020-10-12 07:59:23 +00:00
Alexandre Poirot 0206cdf1ec Bug 1659969 - [devtools] Pass TargetMixin.targetType to debugger codebase in order to distinguish the targets. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D92687
2020-10-12 07:08:16 +00:00
Alexandre Poirot 64d85172e7 Bug 1659969 - [devtools] Use isTopLevel attribute to know if a given target is the "main one". r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D92686
2020-10-12 07:08:14 +00:00
Miguel Roncancio 1a817a17ed Bug 1440068 - Fix filtering on console groups r=nchevobbe
Bug 1440068 - Fix filtering on console groups.

implement more thorough check of collapsed group messages

expand test suite

Differential Revision: https://phabricator.services.mozilla.com/D91065
2020-10-12 06:41:33 +00:00
Tim Nguyen 4dd07cd7c4 Bug 1632351 - Enable CSS conic-gradient by default and let it ride the trains. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D93024
2020-10-10 19:46:42 +00:00
Csoregi Natalia 3459200163 Backed out changeset 7576a306cce4 (bug 1632351) for failures on layout/style/test/test_value_cloning.html. CLOSED TREE 2020-10-10 17:37:40 +03:00
Tim Nguyen 25127ffb85 Bug 1632351 - Enable CSS conic-gradient by default and let it ride the trains. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D93024
2020-10-10 13:19:56 +00:00
Razvan Caliman 22dbe9a21d Bug 1668265 - [devtools] Ensure node picker reacts to inspector fronts as they become available or destroyed r=ochameau
When a page is refreshed, the inspector fonts associated with targets within are destroyed and recreated.

The node picker didn't observe for this behavior. When a page was refreshed, it kept picking against dead fronts and ignored the newly created fronts, thus leaving users confused. This is an issue in popular web dev workflows like Hot Module Reloading, where the page may end up being refreshed. See [Bug1352121#c4](https://bugzilla.mozilla.org/show_bug.cgi?id=1352121#c4)

This patch makes the node picker listen for targets and inspector fronts as they become available or get destroyed. If node picking isn't explicitly stopped by either clicking a node or pressing the Escape key, node picking continues onto the refreshed page or to new page (same behavior as in Firefox Release).

Differential Revision: https://phabricator.services.mozilla.com/D92779
2020-10-10 08:09:41 +00:00
Andreea Pavel 0b2240bc6e Bug 1657807 - disable browser_rules_css-compatibility-add-rename-rule.js on win/linux 64bits r=ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D92772
2020-10-09 19:03:21 +00:00
Brad Werth f99f295b79 Bug 1669628 Part 2: Removing fast enough timing checks on intermittent test browser/browser_touch_simulation.js. r=jdescottes
This is a timing test that includes checks on whether an event happened "fast
enough". Those checks are too hard to dial in between short enough to be
relevant and long enough to ensure it's never intermittent. This change takes
them out while preserving the rest of the test, including the checks that some
events happen after a "slow enough" delay.

Differential Revision: https://phabricator.services.mozilla.com/D92954
2020-10-09 08:06:15 +00:00
Alexandre Poirot 342c1ad0be Bug 1669545 - [devtools] Print internal error codes instead of only "Blocked" when there is not explicit blocking reason. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92657
2020-10-09 13:45:55 +00:00
Julian Descottes d7ae84a6e5 Bug 1670191 - [devtools] Remove mentions about remote debugging in target-mixin r=nchevobbe
Remote debugging in those method names and comments refered to e10s.
Nowadays remote debugging is rather used to talk about remote "browser" debugging, via about:debugging.
The comments give the false impression that those events are only used for about:debugging, which is not true.

Differential Revision: https://phabricator.services.mozilla.com/D93063
2020-10-09 12:22:28 +00:00
Emilio Cobos Álvarez 4d89ea6d7c Bug 1654866 - Make style inspector account for UA/chrome sheets and quirks properly. r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D92633
2020-10-09 11:56:18 +00:00
Itiel 98722ba7f7 Bug 1668624 - Fix the arrow part of the Profiler panel not being colored the same as the header when the info section is expanded r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D92126
2020-10-08 20:32:59 +00:00
Jasleen Kaur 9452c31bd1 Bug 1669334 - Fixed a typo. r=emilio DONTBUILD
Depends on D92931

Differential Revision: https://phabricator.services.mozilla.com/D92979
2020-10-08 18:48:10 +00:00
Sylvestre Ledru cad53f4804 Bug 1588458 - Replace dxr links by searchfox in the code/test r=kats,sparky
Differential Revision: https://phabricator.services.mozilla.com/D92792
2020-10-08 14:02:40 +00:00
Kershaw Chang 883455945d Bug 1668851 - Try to write data to socket directly without waiting r=necko-reviewers,dragana,remote-protocol-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D92442
2020-10-08 13:26:03 +00:00
Christoph Kerschbaumer faf05f7d19 Bug 1552168: Remove pref security.data_uri.unique_opaque_origin. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92087
2020-10-08 16:55:25 +00:00
Cosmin Sabou 4c74d16c6b Backed out changeset 553b8374fcc2 (bug 1668265) for devtools failures on browser_keybindings_01.js. CLOSED TREE 2020-10-09 00:44:02 +03:00
Razvan Caliman 0bf9df40be Bug 1668265 - [devtools] Ensure node picker reacts to inspector fronts as they become available or destroyed r=ochameau
When a page is refreshed, the inspector fonts associated with targets within are destroyed and recreated.

The node picker didn't observe for this behavior. When a page was refreshed, it kept picking against dead fronts and ignored the newly created fronts, thus leaving users confused. This is an issue in popular web dev workflows like Hot Module Reloading, where the page may end up being refreshed. See [Bug1352121#c4](https://bugzilla.mozilla.org/show_bug.cgi?id=1352121#c4)

This patch makes the node picker listen for targets and inspector fronts as they become available or get destroyed. If node picking isn't explicitly stopped by either clicking a node or pressing the Escape key, node picking continues onto the refreshed page or to new page (same behavior as in Firefox Release).

Differential Revision: https://phabricator.services.mozilla.com/D92779
2020-10-08 12:51:06 +00:00
Alexandre Poirot af7666a292 Bug 1669527 - [devtools] Ensure destroying the NetworkMonitorActor spawn in the parent process. r=Honza,jdescottes
The WebConsoleActor tries to destroy it via a debug:destroy-network-monitor.
But as it is done during the destruction of the target actor, typically when there is a
top level target switching, this message doesn't reach the parent process.
So, ensure destroying this actor from the parent process side, when we see that the
frame target is being destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D92654
2020-10-07 13:39:48 +00:00
Farooq AR 69ce838809 Bug 1668985 - Incorrect order of message columns in Response Panel. r=Honza
With more tests in `browser_net_ws-sse-persist-columns.js`

Differential Revision: https://phabricator.services.mozilla.com/D92882
2020-10-08 11:33:07 +00:00
Sylvestre Ledru 1edb1e71c0 Bug 1588458 - Replace dxr links by searchfox in the md doc r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D92790
2020-10-08 08:11:59 +00:00
Alexandre Poirot e11f76a190 Bug 1669473 - [devtools] Fix a typo around event timings. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92605
2020-10-07 16:00:50 +00:00
Alexandre Poirot e69ee12648 Bug 1669473 - [devtools] add built-in logging for platform events in NetworkObserver. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92604
2020-10-07 16:00:47 +00:00
Nicolas Chevobbe 37873fd6f8 Bug 1669655 - [devtools] Cleanup worker-connector.js and startup/worker.js. r=ochameau.
- Rename `id` to a more explicit `forwardingPrefix` property
- Add comments to why we need to handle a list of connections
- Remove the `rpcs` property from the connections object
- Turn `rpcDeferred` from an array to an object, as it's used like one.

Differential Revision: https://phabricator.services.mozilla.com/D92752
2020-10-08 05:54:18 +00:00
Razvan Caliman 9ff9f666b0 Bug 1667368 - [devtools] Prevent accidentally creating multiple highlighter instances r=jdescottes
When requesting a highlighter instance, the inspector front returns one from its cache if present, otherwise it sends a request to the server create a new one.

But if multiple requests come in very quickly before the server responds to the original request, the cache is still empty so the front fires a few more requests. How many? It's arbitrary. As many as fit before the original request's promise resolves and the cache is set. This is the root cause for the issue of seeing duplicate highlighters.

The issue is more pronounced when there is congestion: many microtasks in the queue, for example when loading a heavy tool like the Inspector on a complex page.

To solve this, we store the unsettled promise to create a highlighter and explicitly wait for it to resolve while ignoring subsequent requests.

Differential Revision: https://phabricator.services.mozilla.com/D92802
2020-10-07 20:30:44 +00:00
Julian Descottes 1d736794aa Bug 1669353 - [devtools] Tweak about:debugging main process test to check no target is created r=ochameau
Depends on D92499
Tweak an existing mock in the main process about:debugging test to check that we are not creating any target.

Differential Revision: https://phabricator.services.mozilla.com/D92553
2020-10-07 10:54:16 +00:00
Alexandre Poirot a73761a538 Bug 1669353 - [devtools] Stop instantiating main process target front from about:debugging. r=jdescottes
We can let about:devtools-toolbox instantiate it, as we do for most other target types.

Differential Revision: https://phabricator.services.mozilla.com/D92499
2020-10-07 21:22:32 +00:00
Alexandre Poirot 68f928fc97 Bug 1669353 - [devtools] Remove unused processId attribute from about:debugging on process targets. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D92498
2020-10-07 21:22:24 +00:00
Alexandre Poirot c6c98b8cbc Bug 1669592 - [devtools] Cleanup debugger/package.json dependencies list r=jdescottes
This changeset focuses on dependencies, but surprisingly, it has an impact on bundles.
Looks like one dependency uses another revision.

Differential Revision: https://phabricator.services.mozilla.com/D92736
2020-10-07 15:51:36 +00:00
Alexandre Poirot 6bc39d4810 Bug 1669592 - [devtools] Cleanup debugger/package.json. r=jdescottes
This changeset focus on devDependencies, but a similar work can probably be done on dependencies.
Many dependencies are justifies solely because of jest.
In order to run flow, we only need flow, and we need very few things for bin/bundle.
For me, the three things to keep working are:
* flow
* jest
* bin/bundle to rebuild vendors, reps, worker modules
The debugger frontend itself (src/ folder) is built without involving yarn/package.json.

Differential Revision: https://phabricator.services.mozilla.com/D92735
2020-10-07 15:51:05 +00:00
Brad Werth 5f931bfe75 Bug 1669628: Restrict a timing test to optimized builds, to avoid intermittency. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D92769
2020-10-07 14:45:23 +00:00