Commit Graph

24269 Commits

Author SHA1 Message Date
Alexandre Poirot
d2db0a255a Bug 1745240 - [devtools] Unify target helpers and JS Window actors to use a shared method to filter BrowsingContext/WindowGlobal's. r=nchevobbe,jdescottes
Popup debugging (bug 1569859) will force to revisit how we filter out the BrowsingContext
that are meant to be debugged. We won't only accept BrowsingContext based on their browserId.
This would force us to carefuly review all the codes where we filter BrowsingContexts.
And if we later have to tweak this, do this again.

It would be nice to have a unique method to filter things out.
It will also be beneficial once we add new debuggable contexts like workers
as we would only have to tweak this method.

For now, this patch focuses only on Target helpers and JSWindowActor's,
but I'll followup to other server modules.

Note that I'm changing the behavior of getAllRemoteBrowsingContexts
in order to also return the top browsing context by default.
We were having a few places where we were re-adding it after,
but that's not trivial. It is easier to remove it in the rare function that need that.

Differential Revision: https://phabricator.services.mozilla.com/D134422
2022-01-10 17:42:09 +00:00
Alexandre Poirot
f64039933c Bug 1745240 - [devtools] Move WatcherActor.isServerTargetSwitchingEnabled into session's context. r=nchevobbe,jdescottes
This boolean helps know for which BrowsingContext we should create a target or track resources.
So that it is part of what defines the context we should debug and will be handy to have
in all filtering functions we use to filter browsing context or platform objects.

Differential Revision: https://phabricator.services.mozilla.com/D134421
2022-01-10 17:42:08 +00:00
Greg Tatum
81b009eef2 Bug 1580599 Add a Fluent string helper to shared-head.js - r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D135358
2022-01-10 17:09:17 +00:00
Greg Tatum
302855c2a4 Bug 1580599 - Add pseudo-locale configuration to the browser toolbox; r=platform-i18n-reviewers,devtools-reviewers,fluent-reviewers,nchevobbe,dminor
This commit adds support for setting the pseudo-locale for the browser
UI directly from the Browser Toolbox. This places the icons in the same
place as the "Disable Popup Autohide" command. This will make it easier
for Firefox developers to test that their UI is properly localized.

The SVGs were optimized for size using an optimizer that dropped the
path precision and any extra tags. I tested that they work correctly in
both light and dark modes.

Pseudo-localization is documented here:
https://firefox-source-docs.mozilla.org/l10n/fluent/tutorial.html#pseudolocalization

After this patch lands I'll follow-up with updating that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D134420
2022-01-10 17:09:17 +00:00
Greg Tatum
c6eeab3adf Bug 1580599 - Migrate DevTools toolbox meatball menu to fluent; r=devtools-reviewers,fluent-reviewers,nchevobbe,flod
Differential Revision: https://phabricator.services.mozilla.com/D134419
2022-01-10 17:09:16 +00:00
Nicolas Chevobbe
260704f2d1 Bug 1748589 - [devtools] Fix event listener breakpoints toggling. r=bomsy.
In target-actor-mixin, we were calling `setActiveEventBreakpoints` only with the
new events we were receiving, which mean if the user was clicking a first event in
the UI, and then a second one, only the second one would have a functioning event breakpoint.
Also, we were not handling removing event breakpoints at all.
We're adding `(add|remove)EventBreakpoints` to the thread actor so it's easier
to update the list of event breakpoints.

The existing event breakpoints test is modified to ensure we don't regress such behaviour.

The call to `setEventListenerBreakpoints` is moved before dispatch the `UPDATE_EVENT_LISTENERS`
action so we can properly wait for the breakpoint to be set in tests.

Differential Revision: https://phabricator.services.mozilla.com/D135216
2022-01-10 14:10:23 +00:00
Alexandre Poirot
6cd7bcb3bc Bug 1747816 - [devtools] Always use reducer's source's isOriginal attribute to know if a source is an original one. r=bomsy
"original" here refers to not being generated.
It overlaps with pretty printed sources, which are considered as original sources.

Differential Revision: https://phabricator.services.mozilla.com/D134751
2022-01-10 13:10:37 +00:00
Oriol Brufau
1da3a93991 Bug 1749013 - Fix browser_jsonview_save_json.js checking disk data too early. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D135446
2022-01-10 10:14:55 +00:00
Sai Hemanth B
8a196d598a Bug 1737968 - Replace lodash difference usage with filter. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D135443
2022-01-10 09:30:10 +00:00
Butkovits Atila
7411a18abf Bug 1701439 - disable browser_jsterm_screenshot_command_warnings.js on Linux_64_opt for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D135439
2022-01-10 06:37:58 +00:00
Alexandre Poirot
618f997097 Bug 1747815 - [devtools] Document sources and source-actors reducers. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D134752
2022-01-09 22:16:50 +00:00
Alexandre Poirot
da27f388fa Bug 1747815 - [devtools] Remove unused focusedItem attribute from sources reducer. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D134787
2022-01-09 22:16:50 +00:00
Alexandre Poirot
6c350b4a42 Bug 1747815 - [devtools] Use a single method to create all reducer's source objects. r=bomsy
And better document all types of source objects:
* generated
* source map original sources
* pretty printed sources

As well as source object attributes!

Differential Revision: https://phabricator.services.mozilla.com/D134786
2022-01-09 22:16:49 +00:00
criss
e2948093fb Backed out 2 changesets (bug 371900) for causing bug 1749182 . CLOSED TREE
Backed out changeset e59035c65af3 (bug 371900)
Backed out changeset 6434bce9c7d4 (bug 371900)
2022-01-09 16:26:02 +02:00
Neil Deakin
64a4726936 Bug 371900, remove more now-unneeded empty oncommand attributes, r=bgrins,preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D135243
2022-01-08 18:07:21 +00:00
Julian Descottes
f8849e5bf5 Bug 1748405 - [devtools] Update all storage cache tests to properly wait for setup and clear steps r=Honza
Depends on D135054

Differential Revision: https://phabricator.services.mozilla.com/D135314
2022-01-07 18:08:39 +00:00
Julian Descottes
849351229b Bug 1748405 - [devtools] Wait for caches and cell count in browser_storage_cache_overflow r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D135054
2022-01-07 18:08:38 +00:00
Hubert Boma Manilla
471efce1da Bug 1747494 - [devtools] Should display only one request per URL for images from the cache r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D135038
2022-01-07 15:18:48 +00:00
Hubert Boma Manilla
985ea76fd5 Bug 1747494 - [devtools] Small cleanups r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D135037
2022-01-07 15:18:47 +00:00
Oriol Brufau
fa4f6cdf2d Bug 1748688 - Improve browser_jsonview_save_json.js. r=Honza
Avoids using context menu, affected by bug 1478596, so that the test can be
re-enabled in Linux WebRender.

Replaces deprecated OS.File with IOUtils.

Adds try..catch as an attempt to investigate timeouts like bug 1650268.

Adds some extra checks, and some refactorings.

Differential Revision: https://phabricator.services.mozilla.com/D135146
2022-01-07 12:36:25 +00:00
wartmanm
93d857cb3c Bug 1653779 - Lazily create parent map r=nchevobbe,bomsy
parentMap appears to only be used when pressing the left arrow key to navigate
to the parent folder in the source tree.  If this is too slow it could be
replaced with a traverseTree search.

Differential Revision: https://phabricator.services.mozilla.com/D115318
2022-01-07 09:54:21 +00:00
nchevobbe
6f6df94e79 Bug 1748864 - [devtools] Update webidl-deprecated-list.js. r=bomsy.
The file was generated via devtools/shared/webconsole/GenerateDataFromWebIdls.py.

Differential Revision: https://phabricator.services.mozilla.com/D135235
2022-01-07 08:35:37 +00:00
Nicolas Chevobbe
fc7bec2470 Bug 1748628 - [devtools] Remove event listener level in the EventTooltipHelper. r=ochameau.
The information it provides is unclear and I don't see how this could be valuable.
We take this opportunity to move the tags before the "capturing" label to get
better alignment between mixed events (e.g. regular and React ones).

Differential Revision: https://phabricator.services.mozilla.com/D135130
2022-01-07 07:50:03 +00:00
Nicolas Chevobbe
3a498acde6 Bug 1748631 - [devtools] Refactor Node event listeners server codepath. r=ochameau.
- Remove `NodeActor#getEventListeners` which was simply a proxy to `EventCollector#getEventListeners`
- Change signature of `EventCollector#processHandlerForEvent` to make code easier to follow

Differential Revision: https://phabricator.services.mozilla.com/D135128
2022-01-07 07:50:02 +00:00
Nicolas Chevobbe
face640fe2 Bug 1748431 - [devtools] Remove unnecessary setEventTooltip function. r=ochameau.
The function was only creating an EventTooltip instance, so we can directly modify
the only call site to do the same thing.

Since the EventTooltip isn't responsible for showing the tooltip itself, and given
that the consumer code already does some work when the tooltip gets hidden, we
let the consumer call EventTooltip#destroy instead of having the EventTooltip
register the event listener on the tooltip.

Differential Revision: https://phabricator.services.mozilla.com/D135127
2022-01-07 07:50:02 +00:00
Nicolas Chevobbe
a98fcc09e6 Bug 1748431 - [devtools] Fold EventTooltip#init into the constructor. r=ochameau.
The method was only called from one place, just after creating the object.

Differential Revision: https://phabricator.services.mozilla.com/D135042
2022-01-07 07:50:02 +00:00
Nicolas Chevobbe
4b2a8b0d23 Bug 1748431 - [devtools] Turn EventTooltip into an ES class. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D135041
2022-01-07 07:50:01 +00:00
Jonathan Watt
2a9a0b264a Bug 1702501 - Remove print.tab_modal.enabled pref and old frontend print preview code. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D134699
2022-01-06 18:55:38 +00:00
Julian Descottes
759d0d82f3 Bug 1746334 - [devtools] node tests: Suffix yarn command with .cmd on Windows r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D135051
2022-01-06 16:49:40 +00:00
Andreas Pehrson
159966b6d1 Bug 1746347 - Add ipcmessages feature to the profiler's media preset. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D135026
2022-01-05 15:26:24 +00:00
Andreas Pehrson
34655d82ae Bug 1746347 - Simplify the profiler's media preset's thread-set. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D135025
2022-01-05 15:26:23 +00:00
Julian Descottes
4e06581e39 Bug 1720371 - [devtools] Fix eyedropper on pages with CSP r=nchevobbe
Load the png dataURL in a blob instead of an image to avoid CSP issues.

Differential Revision: https://phabricator.services.mozilla.com/D134969
2022-01-05 13:46:22 +00:00
Butkovits Atila
a2b23f44a9 Bug 1703465 - disable browser_rules_color_scheme_simulation.js on Win_64_opt for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D135112
2022-01-05 13:29:33 +00:00
Emilio Cobos Álvarez
24dc10c691 Bug 1748174 - Remove touch-action pref. r=hiro
It's been enabled by default since ~forever.

Differential Revision: https://phabricator.services.mozilla.com/D134935
2022-01-05 12:28:07 +00:00
Butkovits Atila
64c8533f75 Backed out 7 changesets (bug 1746361, bug 1748280, bug 1746347) for causing failures at browser_interaction-between-interfaces.js. CLOSED TREE
Backed out changeset eccba94506f0 (bug 1748280)
Backed out changeset baf39ae53772 (bug 1748280)
Backed out changeset 775843562f7e (bug 1748280)
Backed out changeset 0987c68e9683 (bug 1748280)
Backed out changeset 58dd008520da (bug 1746361)
Backed out changeset 6f9e800877a6 (bug 1746347)
Backed out changeset f78e794a9c2f (bug 1746347)
2022-01-05 13:53:57 +02:00
Andreas Pehrson
5124203ce6 Bug 1746347 - Add ipcmessages feature to the profiler's media preset. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D135026
2022-01-05 10:54:20 +00:00
Andreas Pehrson
d61adf4a7f Bug 1746347 - Simplify the profiler's media preset's thread-set. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D135025
2022-01-05 10:54:19 +00:00
Joaquín Serna
fab9432277 Bug 1737971 - Remove lodash flatten/flattenDeep usage r=nchevobbe
Depends on D135081

Differential Revision: https://phabricator.services.mozilla.com/D135092
2022-01-05 08:58:46 +00:00
Joaquín Serna
45e4c02ec6 Bug 1737983 - Remove lodash remove usage r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D135081
2022-01-05 08:58:46 +00:00
Alexandre Poirot
a8f78a3769 Bug 1747804 - [devtools] Fix har export when some requests can't be retrieved. r=nchevobbe
HAR export was still producing empty har files if any of the request
currently displayed in the netmonitor can't be completely retrieved.
This includes all lazy data. But if any request has been destroyed in the server
fetching any lazy data will throw.

Differential Revision: https://phabricator.services.mozilla.com/D134789
2022-01-04 21:37:11 +00:00
Alexandre Poirot
e3c4a93028 Bug 1747805 - [devtools] Fix NETWORK_EVENT's innerWindowID and clear requests of iframe when they get destroyed. r=nchevobbe
This also fixes the targetFront attribute for NETWORK_EVENT resources of iframes.

Differential Revision: https://phabricator.services.mozilla.com/D134788
2022-01-04 21:37:11 +00:00
Oriol Brufau
6b44c1166c Bug 1747542 - Avoid intermittent failure in browser_jsonview_expand_collapse.js. r=Honza
It seems synthesizeMouseAtCenter() caused the problem.
clickJsonNode() was fixed in bug 1739320.

Differential Revision: https://phabricator.services.mozilla.com/D134991
2022-01-04 12:06:19 +00:00
Alexandre Poirot
6df6f6816a Bug 1651527 - [devtools] Remove now unused Toolbox's switch-target event. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D134776
2022-01-04 10:27:43 +00:00
Julian Descottes
e01a3953b9 Bug 1745242 - [devtools] Cache not showing more than 50 items r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D134946
2022-01-03 15:51:52 +00:00
Nicolas Chevobbe
9384bbbb92 Bug 1737973 - [devtools] Remove lodash groupBy usage. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D134942
2022-01-03 14:17:59 +00:00
Oriol Brufau
70dff99a81 Bug 1720898 - Reenable most JSON Viewer tests in Linux. r=Honza
Only skip browser_jsonview_save_json.js because of bug 1478596.

Differential Revision: https://phabricator.services.mozilla.com/D134674
2022-01-03 13:38:39 +00:00
Nicolas Chevobbe
0c5fb61788 Bug 1737981 - [devtools] Remove lodash range usage. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D134617
2022-01-03 13:25:48 +00:00
Nicolas Chevobbe
652751c863 Bug 1737995 - [devtools] Remove lodash zip usage. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D134615
2022-01-03 13:25:47 +00:00
Nicolas Chevobbe
0577bf26d6 Bug 1747404 - [devtools] Remove unused timings.js. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D134614
2022-01-03 13:25:47 +00:00
Oriol Brufau
80d8efe286 Bug 1739320 - Replace synthesizeMouseAtCenter() with click() in clickJsonNode(). r=Honza
This approach seemed to fix bug 1734940.

Differential Revision: https://phabricator.services.mozilla.com/D134660
2022-01-03 13:24:29 +00:00