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

22325 Коммитов

Автор SHA1 Сообщение Дата
Tim Nguyen 1cc2986424 Bug 1691314 - Use DOM hidden property instead of attribute methods in devtools/client. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D104339
2021-02-09 17:32:07 +00:00
Butkovits Atila a9371fd893 Backed out changeset b2d82e87b557 (bug 1691314) for causing failures on browser_styleeditor_copyurl.js. CLOSED TREE 2021-02-09 19:02:15 +02:00
Tim Nguyen 36960fb87f Bug 1691315 - Replace .setAttribute("hidden", X) usages in devtools/startup. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D104338
2021-02-09 15:40:06 +00:00
Tim Nguyen 44e8c4d637 Bug 1691314 - Use DOM hidden property instead of attribute methods in devtools/client. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D104339
2021-02-09 15:36:12 +00:00
Nicolas Chevobbe b59ceb6a45 Bug 1691349 - [devtools] Fix screenshot node on about:preferences. r=bomsy.
The context menu action was freezing because of an infinite
loop in getRect: since we weren't passing a boundary window,
the function uses the top window, which can be the windowRoot.
But then, we walk up through the window using window.parent,
which would never get us the windowRoot, hence the infinite loop.
We fix this by providing the boundary window to getReact.
A test is added to ensure we don't regress in the future.

Differential Revision: https://phabricator.services.mozilla.com/D104388
2021-02-09 14:36:25 +00:00
smolnar b957b53e50 Bug 1689000 - add missing indent. r=test-fix CLOSED TREE 2021-02-09 10:49:19 +02:00
Dorel Luca b850ece2f9 Bug 1689000 - Disable browser_console_webconsole_private_browsing.js on Linux debug and macosx webrender. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104305
2021-02-09 07:47:19 +00:00
Jan Varga 89ca2a95fb Bug 1690515 - Add missing do_get_profile calls to appropriate tests; r=dom-workers-and-storage-reviewers,necko-reviewers,sg,valentin
Differential Revision: https://phabricator.services.mozilla.com/D103886
2021-02-09 05:30:57 +00:00
Yura Zenevich c72349ac1a Bug 1689445 - revert EventUtils.sendMouseEvent back to being sync. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D104127
2021-02-09 01:30:08 +00:00
Alexandre Poirot 3c74a1c5d5 Bug 1665716 - [devtools] Listen to all resources only from one place in the debugger frontend. r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103876
2021-02-08 10:12:49 +00:00
Alexandre Poirot f9e7f781e5 Bug 1665716 - [devtools] Get rid of unused connection object. r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103875
2021-02-08 10:12:46 +00:00
Alexandre Poirot 47ca651e3d Bug 1665716 - [devtools] Merge client/index.js into main.js. r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103874
2021-02-08 12:22:53 +00:00
Alexandre Poirot a392dee16d Bug 1665716 - [devtools] initialize and destroy debugger workers from the same module. r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103873
2021-02-08 10:12:42 +00:00
Alexandre Poirot ad3b8ac843 Bug 1665716 - [devtools] initialize and destroy source queue from the same module. r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103872
2021-02-08 10:12:36 +00:00
Alexandre Poirot b6ecb792bc Bug 1665716 - [devtools] initialize and destroy ReactDOM from the same module. r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103871
2021-02-08 10:12:34 +00:00
Alexandre Poirot 3cab69176a Bug 1665716 - [devtools] Remove unused traits attribute passed around debugger frontend. r=nchevobbe
If we need trait, we can access it from the targetFront directly.

Differential Revision: https://phabricator.services.mozilla.com/D103870
2021-02-08 10:12:29 +00:00
Nicolas Chevobbe 0d3a7b32b4 Bug 1568831 - [devtools] Make eyedropper fission compatible. r=ladybenko.
The current implementation of the eyedropper was using drawWindow, which does
not handle remote frames.
To make the tool fission compatible, we re-use the screenshot-content actor which
do support remote frames. We had to do a few modification on it though so the
eyedropper would work the same as it does at the moment:
- add a `disableFlash` property to the screenshot options, so we don't play the
  flash animation for the eyedropper
- retrieve the page current zoom level from the screenshot-content actor so we
  can adjust the size of the resulting image
- split the `dpr` screenshot option into 2 distinct ones:
  - `snapshotScale`, which will be the scale passed to `drawSnapshot`. By default,
    this will be the dpr of the window, so the screenshot is as crisp as it can be.
  - `fileScale`, which will be the scale of the resulting file.
- we control the fileScale that is sent to the server with the `ignoreDprForFileScale`
  on the client. This is needed by the eyedropper so it doesn't draw images that are
  too big when the dpr is > 1.

With all those changes, browser_inspector_highlighter-eyedropper-frames.js is passing
with fission enabled, so we can remove the `fail-if` annotation it had.

Differential Revision: https://phabricator.services.mozilla.com/D103879
2021-02-08 07:02:02 +00:00
Nicolas Chevobbe 08409aaf66 Bug 1568831 - [devtools] Add a test for the eyedropper when the page is zoomed-in. r=ladybenko.
The behaviour of the eyedropper is impacted when the page is zoomed-in, but we
didn't have a test for that, so we're adding one here.

Differential Revision: https://phabricator.services.mozilla.com/D103878
2021-02-08 07:01:50 +00:00
Nicolas Chevobbe e1603a2405 Bug 1568831 - [devtools] Turn EyeDropper into an class. r=ladybenko.
Differential Revision: https://phabricator.services.mozilla.com/D103877
2021-02-08 07:01:42 +00:00
Nicolas Chevobbe 70b4510ac5 Bug 1690217 - [devtools] Add test for eyedropper on page with iframes. r=ladybenko.
This adds a test that checks that the eyedropper displays the expected
colors when hovering iframes (same origin and remote).
Since we're going to do extra work from the client in Bug 1568831 to
actually get the screenshot, we can't simply use the regular inspector
test highlighter helper, as it spawns an eyedropper eyelighter on its
own, without calling the inspector client code.
And since we can't use the helper, we can't use the testActor method
that the other tests use, as we don't have an highlighter front for
the eyedropper.
We create new methods on the testActor which will retrieve the eyedropper
instance that is created by the inspector actor.
The new test expectedly fails on fission and is tagged as fail-if.
We take this as an opportunity to enhance the simple eyedropper test
so we actually uses the button in the ui instead of only manipulating it
through the test actor.

Differential Revision: https://phabricator.services.mozilla.com/D103746
2021-02-08 07:01:34 +00:00
Mihai Alexandru Michis 6da97a654e Backed out 2 changesets (bug 1689445) for causing bc failures in browser_search.js
Backed out changeset 2b1ec882c4c1 (bug 1689445)
Backed out changeset bcb4ba398ee0 (bug 1689445)
2021-02-06 05:33:02 +02:00
Yura Zenevich d3beb62c1d Bug 1689445 - revert EventUtils.sendMouseEvent back to being sync. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D104127
2021-02-05 21:26:54 +00:00
Julian Descottes 7315eeca9f Bug 1690789 - [devtools] Memoize breakpoint-list & networkParent getters in WatcherActor r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D104073
2021-02-05 12:30:29 +00:00
Daisuke Akatsuka 050c861da0 Bug 1690974: Update MDN compat data. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D104148
2021-02-05 10:55:13 +00:00
Nicolas Chevobbe ad6157dae7 Bug 1474006 - [devtools] Enable screenshots for Browser Console and Browser Toolbox. r=jdescottes.
In order to enable screenshots from the browser console and browser toolbox, we
make a small change in the `simulateCameraFlash`, as the browsing context we
pass to it does not have a `topFrameElement` property (so we use the top chrome window
document element instead).

We also have to register browser actors when starting the browser console so it
can have access to the screenshot actor.

A simple test is added for `:screenshot` in the Browser Console.

Differential Revision: https://phabricator.services.mozilla.com/D104004
2021-02-05 09:25:05 +00:00
Nicolas Chevobbe 272aaf670a Bug 1678483 - [devtools] Make capture-screenshot fission compatible. r=jdescottes,devtools-backward-compat-reviewers.
This is done by using the `WindowGlobal#drawSnapshot` function that, unlike `Canvas#drawWindow`,
handles remote frame.
Since drawSnapshot is only available on the parent process, we re-purpose the
current ScreenshotActor to a parent process one, that only calls drawSnapshot
with a passed rect on a given browsing context, and return a data url of the
screenshot.

A new target-scoped actor, ScreenshotContentActor, is added so we can retrieve
the information of the window needed to take the screenshot (the relative area
to the browsing context, the dpr), but also run pre and post screenshot tasks,
like scrolling to the top and then resettting the scroll position once the screenshot
is taken.

On the client, we add an helper function that handles all the client/server communication
and actually save the screenshot. All previous consumers of the screenshot front
use that function, that also handles backward compatibility, when connection to a server
where the screenshot actor is still living in the content process.
This allows us to remove the captureScreenshot method from the responsive actor
and its reference to the screenshot actor.

Some tests that were failing on Fission now pass, so we can remove their fail-if
annotation.

Differential Revision: https://phabricator.services.mozilla.com/D103613
2021-02-05 09:25:02 +00:00
Alexandre Poirot 489f535e46 Bug 1690269 - [devtools] Stops maintaining a maps of source actorID to debugger frontend source id in commands. r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103869
2021-02-04 16:33:40 +00:00
Alexandre Poirot 4955111437 Bug 1690269 - [devtools] Fix waitForSelectedSource for debugger connect to many targets. r=nchevobbe,jdescottes
I think we were only trying to assert the URL of the selected source. That's what I'm doing here.
Using findSource, which picks the first matching source by URL breaks
the support of the debugger with many targets.
With many targets, the debugger will start spawning one source per URL, per target.
Leading to many sources with the same URL.

Differential Revision: https://phabricator.services.mozilla.com/D103933
2021-02-04 16:33:38 +00:00
Alexandre Poirot c6cd46687c Bug 1690269 - [devtools] Set a unique source ID per URL and per target type for frontend source objects. r=nchevobbe,bomsy
This code was designed for when the debugger was only supporting service workers as additional target.
Now that we can have many: regular workers, content process, addons...
We should ensure that each target type gets its own source set.

Differential Revision: https://phabricator.services.mozilla.com/D103868
2021-02-04 16:32:30 +00:00
Sylvestre Ledru c9c024db93 Bug 1690785 - Update of the contribution doc wrt check-in needed r=jwalker,aryx DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104057
2021-02-04 21:52:38 +00:00
Alexandre Poirot 22f652b35a Bug 1690221 - [devtools] Remove unused Connector.setPreferences method. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D103751
2021-02-04 09:06:41 +00:00
Alexandre Poirot a212b7b7b5 Bug 1690221 - [devtools] Merge FirefoxConnector into Connector. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D103750
2021-02-04 10:37:20 +00:00
Alexandre Poirot 1e919fbc8d Bug 1690221 - [devtools] Remove unused chrome connector. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D103749
2021-02-04 00:16:31 +00:00
Sebastian Zartner 9266c8e32e Bug 1655412 - Vertically centered 'Start performance analysis' button in Network Monitor. r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D103599
2021-02-03 14:32:32 +00:00
Hubert Boma Manilla dda1fd88b9 Bug 1690506 - [devtools] Show full stacktrace in AppErrorBoundary r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D103885
2021-02-03 15:57:54 +00:00
Emilio Cobos Álvarez 063f86bbb1 Bug 1591120 - Fix ESLint / clang-format nits.
MANUAL PUSH: Orange fix on a CLOSED TREE
2021-02-03 12:08:25 +01:00
Emilio Cobos Álvarez cc05572301 Bug 1655967 - Fix ESLint. 2021-02-03 12:08:17 +01:00
Emilio Cobos Álvarez bfe77f303a Bug 1591120 - Move print and color-scheme simulation to browsingContext. r=ochameau,nika,devtools-backward-compat-reviewers
We keep mMedium in nsPresContext rather than just looking it up in the
browsing context because that's used quite more frequently.

Differential Revision: https://phabricator.services.mozilla.com/D103782
2021-02-03 10:38:09 +00:00
Emilio Cobos Álvarez 635e3580e3 Bug 1655967 - Move serviceWorkersTestingEnabled to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103757
2021-02-03 10:38:43 +00:00
Hubert Boma Manilla f5e3af838a Bug 1688590 - Use more specific rules to determine 'action cable' payloads r=Honza
Identifying json `Action cable` payloads is tricky. Currently we parse the json again in `parseActionCable` to determine if
it is an `Action cable` payload.

Instead lets check using a possible criteria before attempting to call `parseActionCable`.
See https://medium.com/codequest/actioncable-in-rails-api-f087b65c860d for `Action cable` details.

Differential Revision: https://phabricator.services.mozilla.com/D103086
2021-02-02 11:41:57 +00:00
Julian Descottes 4d919308ba Bug 1686950 - [devtools] Add test for opening RDM on non-selected tab r=nchevobbe
Depends on D103687

Differential Revision: https://phabricator.services.mozilla.com/D103688
2021-02-02 19:48:02 +00:00
Julian Descottes 98d054740b Bug 1686950 - [devtools] Remove string concatenation to toggle RDM from toolbox r=nchevobbe
Depends on D103326

Spotted while writing the patch, makes the code unnecessarily hard to navigate.

Differential Revision: https://phabricator.services.mozilla.com/D103687
2021-02-02 19:08:45 +00:00
Julian Descottes 36fd4f01e4 Bug 1686950 - [devtools] RDM should stop watching resources and targets after performing cleanup r=nchevobbe
Depends on D103325

When we stop watching for resources, if there are no other watchers currently in activity, we will unregister the JSWindowActors, with following stack:
```
unregisterJSWindowActor@resource://devtools/server/actors/watcher/WatcherRegistry.jsm:344:17
maybeUnregisteringJSWindowActor@resource://devtools/server/actors/watcher/WatcherRegistry.jsm:280:7
unwatchTargets@resource://devtools/server/actors/watcher.js:199:21
handler@resource://devtools/shared/protocol/Actor.js:172:37
onPacket@resource://devtools/server/devtools-server-connection.js:379:58
send/<@resource://devtools/shared/transport/local-transport.js:68:25
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
DevToolsUtils.executeSoon*exports.executeSoon@resource://devtools/shared/DevToolsUtils.js:54:21
send@resource://devtools/shared/transport/local-transport.js:56:21
send@resource://devtools/shared/protocol/Front.js:272:30
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:42:14
stopListening@resource://devtools/shared/resources/target-list.js:363:29
destroy@resource://devtools/shared/resources/target-list.js:612:10
```

This will lead to destroy all the currently created JSWindowActors, which will also destroy the corresponding target actors.
However RDM will still try to perform some cleanups on the current target after destroying the target-list. These calls will fail as soon as RDM uses a JSWindowActor based target.
This will only start happening in Bug 1644397, but then it will make the test browser_tab_remoteness_change_fission_switch_target.js fail on shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D103326
2021-02-02 19:08:22 +00:00
Julian Descottes 20122a5d0a Bug 1686950 - [devtools] Update RDM tab target creation to rely on a local tab target descriptor r=nchevobbe
RDM uses a dedicated client, target-list etc. Which means that we can use a local tab descriptor and remove the target switching logic from RDM.
New test is added in D103688

Differential Revision: https://phabricator.services.mozilla.com/D103325
2021-02-02 19:08:20 +00:00
Alexandre Poirot 9fe04a85c9 Bug 1683139 - [devtools] Avoid setting the same breakpoint more than once. r=nchevobbe,jdescottes,devtools-backward-compat-reviewers
This was causing _priorPause to be reset unexpectedly,
leading to lastPausedPacket being null and missing "paused" THREAD_STATE resource.

Differential Revision: https://phabricator.services.mozilla.com/D103068
2021-02-02 12:16:11 +00:00
Alexandre Poirot 533c3911b5 Bug 1683139 - [devtools] Test setting many breakpoints on the same line. r=nchevobbe
I'm also cleaning up things in debugger tests in order to reuse the same helper to check for breakpoints info in the gutter.

Differential Revision: https://phabricator.services.mozilla.com/D103201
2021-02-02 10:33:49 +00:00
Alexandre Poirot 9554affa8a Bug 1683139 - [devtools] Implement breakpoint resource on server side via the watcher actor. r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D100046
2021-02-02 10:33:42 +00:00
Alexandre Poirot a074b07792 Bug 1683139 - [devtools] Rename BREAKPOINT resource to THREAD_STATE. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103067
2021-02-02 10:33:39 +00:00
Nicolas Chevobbe 7430a7d93b Bug 1689954 - [devtools] Use sphinx directives instead of hints in documentation. . DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D103769
2021-02-02 13:27:43 +00:00
Alexandre Poirot a3675acec3 Bug 1690251 - [devtools] Prepare enabling NETWORK_EVENT for all target types. r=bomsy,Honza
This patch fixes everything in order to be able to toggle NETWORK_EVENT
and NETWORK_EVENT_STACKTRACE resources for all target types.
But this doesn't change the trait as CSP blocked request would no longer appear.
Before being able to toggle the trait, we have to implement bug 1689644.

Differential Revision: https://phabricator.services.mozilla.com/D103451
2021-02-02 13:00:12 +00:00