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

24582 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Chevobbe 7032fd4fcc Bug 1737974 - [devtools] Remove lodash has usage. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D136167
2022-01-20 07:21:10 +00:00
Nicolas Chevobbe 95d313e862 Bug 1750514 - [devtools] Remove lodash-move. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D136166
2022-01-20 07:21:09 +00:00
Nicolas Chevobbe 49d84414bf Bug 1750505 - [devtools] Remove lodash uniqBy usage. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D136165
2022-01-20 07:21:09 +00:00
Nicolas Chevobbe c00196fd3f Bug 1737980 - [devtools] Remove lodash omit usage. r=bomsy.
It was only used in storeExpressions, where we can replace it by storing only the input property
instead of removing the value property from the object we store.

Differential Revision: https://phabricator.services.mozilla.com/D136164
2022-01-20 07:21:09 +00:00
Marian-Vasile Laza 5e48e30b98 Backed out 10 changesets (bug 1746090) for causing build bustages on TestingFunctions.cpp. CLOSED TREE
Backed out changeset edbf96722e4b (bug 1746090)
Backed out changeset f4e4bf6ba8ff (bug 1746090)
Backed out changeset c288fe1c6c84 (bug 1746090)
Backed out changeset 2b0caa13d0fc (bug 1746090)
Backed out changeset 1ed9d77885c6 (bug 1746090)
Backed out changeset 54a60388fb11 (bug 1746090)
Backed out changeset a9c16e721533 (bug 1746090)
Backed out changeset 774bdb9939a9 (bug 1746090)
Backed out changeset 5c5742535301 (bug 1746090)
Backed out changeset ff509fe4671d (bug 1746090)
2022-01-20 02:39:17 +02:00
Steve Fink aea0c2fa07 Bug 1746090 - Switch RootList::init from taking an AutoCheckCannotGC token to returning one r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D135297
2022-01-20 00:23:10 +00:00
Dana Keeler b543bb3a2a Bug 1750089 - remove weak certificate signature error console message r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D135943
2022-01-19 21:24:47 +00:00
Henrik Skupin 8fae55637f Bug 1750915 - [devtools] Remove backward compatible code for WebExtension targets supporting the watcher. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D136348
2022-01-19 19:15:20 +00:00
Henrik Skupin b497281e7f Bug 1750915 - [devtools] Remove backward compatible comment for new "parentInnerWindowId" attribute. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D136347
2022-01-19 19:15:20 +00:00
Henrik Skupin f46fac8cad Bug 1750915 - [devtools] Remove backward compatible code for windowGlobalTarget.attach. r=jdescottes,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D136346
2022-01-19 19:15:19 +00:00
Henrik Skupin 4b14e24467 Bug 1750915 - [devtools] Remove backward compatible code for frame.isTopLevel. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D136345
2022-01-19 19:15:19 +00:00
Alexandre Poirot c29b020b4a Bug 1571212 - [devtools] Wait for resume to complete in all xpcshell tests. r=bomsy
test_stepping-12.js wasn't correctly waiting for thread to be resumed between each of its sub test.

Similarly, other tests weren't waiting for thread front's resume request to be resume.
I'm also spreading the usage of resumeAndWaitForPause to better ensure we resume and wait for next paused event
without any race condition. Listening to "paused" after calling "resume" is subject to race conditions.

Differential Revision: https://phabricator.services.mozilla.com/D136125
2022-01-19 17:43:00 +00:00
Nicolas Chevobbe a73d337ea1 Bug 1750227 - [devtools] Register cleanup function in initBrowserToolboxTask. r=ochameau.
If a test involving the Browser Toolbox times out, the Browser Toolbox
would not close and could have impact on next tests.
In this patch we register a cleanup function to make sure we always
close the Browser Toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D136096
2022-01-19 12:51:51 +00:00
Nicolas Chevobbe 7dfca66f06 Bug 1737969 - [devtools] Remove lodash findIndex/findLastIndex usages. r=jdescottes.
We take this opportunity to rename `removeInnerLocations` to `getInnerLocations`
and make it return an array of inner locations rather than returning the list
of original locations with inner locations stripped.
This makes the function easier to understand (not having to deal with indexes
+ splicing), and doesn't harm the only callsite where we can handle those inner
locations into the filter call that was done on the array returned from `removeInnerLocations`

The parser-worker was updated.

Differential Revision: https://phabricator.services.mozilla.com/D136095
2022-01-19 12:51:51 +00:00
Nicolas Chevobbe 6fb80883a7 Bug 1737986 - [devtools] Replace lodash throttle usage with devtools/shared/throttle. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D136094
2022-01-19 12:51:50 +00:00
Hubert Boma Manilla 1735d72fec Bug 1750613 - [devtools] Rename underRoot to isDescendantOfRoot r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D136174
2022-01-19 10:58:32 +00:00
Iulian Moraru d8fce573b5 Backed out 2 changesets (bug 1750089) for causing mochitest failures on browser_webconsole_certificate_messages.js.
Backed out changeset 7ebb345a9293 (bug 1750089)
Backed out changeset 40bd1975208d (bug 1750089)
2022-01-19 04:07:44 +02:00
Dana Keeler e8ae7a370c Bug 1750089 - remove weak certificate signature error console message r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D135943
2022-01-18 23:54:12 +00:00
Henrik Skupin 0eb950d9a0 Bug 1750726 - [devtools] Never enable Marionette for the multi-process browser toolbox process. r=jdescottes
If the browser toolbox is started from a Marionette enabled process,
Marionette should never be started for the browser toolbox process.
If we do as right now the browser toolbox process will immediately
shutdown because Marionette cannot listen on the already in-use
socket port and forces a process shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D136220
2022-01-18 15:57:57 +00:00
Jan Odvarko 21b3090758 Bug 1750190 - [devtools] Fix MDN links in DevTools user docs r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D135992
2022-01-18 12:34:57 +00:00
Oriol Brufau 2ea2ba189e Bug 1688168 - Isolate bidi text in the console. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D135458
2022-01-18 11:47:50 +00:00
Claudia e54f4ec3cc Bug 1744786 - [devtools] Default select the new request that was sent by edit and resend panel r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D135729
2022-01-18 08:23:09 +00:00
Gerald Squelart 18d4946ed0 Bug 1744670 - New feature: "Process CPU Utilization" aka "processcpu" - r=florian,canaltinova
The actual implementation is in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D133599
2022-01-17 23:01:29 +00:00
Cristian Tuns e30bd08994 Bug 1701439 - correct disabling condition. 2022-01-17 17:43:48 -05:00
Cristian Tuns b83ef4ef99 Backed out changeset 0ba397633624 (bug 1747261) as requested by sparky CLOSED TREE 2022-01-17 14:22:09 -05:00
Hubert Boma Manilla 651cc06518 Bug 1750560 - Update the code to run damp on try r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D136126
2022-01-17 18:18:04 +00:00
Norisz Fay 6b29538a17 Backed out changeset 5284347025e8 (bug 1748621) for causing dt failures on browser_dbg-blackbox.js CLOSED TREE 2022-01-17 17:12:50 +02:00
Hubert Boma Manilla 7dd7e33a94 Bug 1748621 - [devtools] Add tests for blackboxing a source r=nchevobbe
The tests covers most of the blackbox functionality
Notably it covers issues fixed in D135393 and D135614

Differential Revision: https://phabricator.services.mozilla.com/D135496
2022-01-17 14:01:13 +00:00
Alexandre Poirot 94728aa1d9 Bug 1749527 - [devtools] Setup blackboxing information as a SessionData. r=bomsy,devtools-backward-compat-reviewers
This helps:
* registering blackboxing before the page starts loading.
  So that blackboxing better work if we break early during the page load.
* transfert the blackboxing information only once per URL instead of once per source actor.
  We now communicate the ranges once to the BlackboxingActor.
  Also, we can pass a list of ranges instead of range per range.

Differential Revision: https://phabricator.services.mozilla.com/D135614
2022-01-17 13:50:12 +00:00
Nicolas Chevobbe 20feb9a6d2 Bug 1748620 - [devtools] Update "Ignore Source" icon and ignored lines background. r=bomsy.
The icon is now a crossed-out file and is displayed in red.
We set the background for ignored line to a red-ish grey that will hopefully
better convey the fact that those lines are ignored.

Differential Revision: https://phabricator.services.mozilla.com/D135974
2022-01-17 13:27:24 +00:00
Emilio Cobos Álvarez b651bfe99a Bug 1744009 - Simplify combobox <select> code. r=mconley,dholbert
With this patch on its own we get some a11y tests failures, but those
are fixed on a later patch.

Combobox select no longer creates frames for its <options>, nor an
nsListControlFrame. Instead, it computes its right intrinsic size using
the largest size of the options. This is better, because we render the
option text using the select style so if the select and option styles
are mismatched it'd cause changes in the size of the select when text
changes. See the following in a build without the patch, for example:

  <select>
    <option>ABC</option>
    <option style="font-size: 1px">Something long</option>
  </select>

This seems like a rather obscure case, but it's important to get it
right, see bug 1741888.

With this patch we use the same setup in content and parent processes
(this needs bug 1596852 and bug 1744152). This means we can remove a
bunch of the native view and popup code in nsListControlFrame. A couple
browser_* tests are affected by this change and have been tweaked
appropriately (the changes there are trivial).

Not creating an nsListControlFrame for dropdown select means that we
need to move a bunch of the event handling code from nsListControlFrame
to a common place that nsComboboxControlFrame can also use. That place
is HTMLSelectEventListener, and I think the setup is much nicer than
having the code intertwined with nsListControlFrame. It should be
relatively straight-forward to review, mostly moving code from one part
to another.

Another thing that we need to do in HTMLSelectEventListener that we
didn't use to do is listening for DOM mutations on the dropdown. Before,
we were relying on changes like text mutations triggering a reflow of
the listcontrolframe, which also triggered a reflow of the
comboboxcontrolframe, which in turn updated the text of the anonymous
content. Now we need to trigger that reflow manually.

There are some further simplifications that can be done after this
lands (cleanup naming of openInParentProcess and so on, among others),
but I'd rather land this first (after the merge of course) and work on
them separately.

Differential Revision: https://phabricator.services.mozilla.com/D132719
2022-01-17 11:10:05 +00:00
Marian-Vasile Laza 35a88d897e Backed out 2 changesets (bug 1744009) for causing reftest failures on select-3.html.
Backed out changeset 3e44e31d3d12 (bug 1744009)
Backed out changeset 619389788775 (bug 1744009)
2022-01-17 11:14:27 +02:00
Nicolas Chevobbe 90b92483e3 Bug 1750182 - [devtools] Clear FontHighlighter reference on will-navigate. r=jdescottes.
This will cause a new highlighter to be created when onToggleFontHighlight
is called next.
Ideally, we wouldn't have a reference to the highlighter as this is probably
not working for Fission, and we would use the HighlightersOverlay like the
other inspector panel, but that probably requires its own bug.
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D135998
2022-01-17 08:02:38 +00:00
Emilio Cobos Álvarez a8d469a8d0 Bug 1744009 - Simplify combobox <select> code. r=mconley,dholbert
With this patch on its own we get some a11y tests failures, but those
are fixed on a later patch.

Combobox select no longer creates frames for its <options>, nor an
nsListControlFrame. Instead, it computes its right intrinsic size using
the largest size of the options. This is better, because we render the
option text using the select style so if the select and option styles
are mismatched it'd cause changes in the size of the select when text
changes. See the following in a build without the patch, for example:

  <select>
    <option>ABC</option>
    <option style="font-size: 1px">Something long</option>
  </select>

This seems like a rather obscure case, but it's important to get it
right, see bug 1741888.

With this patch we use the same setup in content and parent processes
(this needs bug 1596852 and bug 1744152). This means we can remove a
bunch of the native view and popup code in nsListControlFrame. A couple
browser_* tests are affected by this change and have been tweaked
appropriately (the changes there are trivial).

Not creating an nsListControlFrame for dropdown select means that we
need to move a bunch of the event handling code from nsListControlFrame
to a common place that nsComboboxControlFrame can also use. That place
is HTMLSelectEventListener, and I think the setup is much nicer than
having the code intertwined with nsListControlFrame. It should be
relatively straight-forward to review, mostly moving code from one part
to another.

Another thing that we need to do in HTMLSelectEventListener that we
didn't use to do is listening for DOM mutations on the dropdown. Before,
we were relying on changes like text mutations triggering a reflow of
the listcontrolframe, which also triggered a reflow of the
comboboxcontrolframe, which in turn updated the text of the anonymous
content. Now we need to trigger that reflow manually.

There are some further simplifications that can be done after this
lands (cleanup naming of openInParentProcess and so on, among others),
but I'd rather land this first (after the merge of course) and work on
them separately.

Differential Revision: https://phabricator.services.mozilla.com/D132719
2022-01-16 23:31:22 +00:00
Claudia 4650e8c828 Bug 1745383 - [devtools] Adds basic functionality for the new HTTP Custom request panel r=bomsy
Depends on D135241

Differential Revision: https://phabricator.services.mozilla.com/D135039
2022-01-14 22:33:59 +00:00
Alexandre Poirot 65cecb5a83 Bug 1749769 - [devtools] Lazy load target legacy listeners. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D135832
2022-01-14 17:03:35 +00:00
Alexandre Poirot 3c7dc514f2 Bug 1749769 - [devtools] Lazy load all resource legacy listeners. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D135831
2022-01-14 17:03:35 +00:00
Alexandre Poirot 719c84fb16 Bug 1749769 - [devtools] Lazy load all resource transformers. r=nchevobbe
Doing this helps load resource-command module from jest tests
which were throwing when loading the transformers.
And it probably is a small performance improvement.

Differential Revision: https://phabricator.services.mozilla.com/D135719
2022-01-14 17:03:34 +00:00
Alexandre Poirot be162a1fe8 Bug 1569859 - [devtools] Automagically move the toolbox between the original tab we debug and its popups. r=nchevobbe
This is also behind "devtools.popups.debug", to be set to true manually.

This special mode break the old fundamental principal where a given toolbox
is bound to one unique given tab. Now one toolbox starts being shared between
many tabs.

When we select the original tab we debug, or any of its popups opened in distinct tabs,
we will move the toolbox between each of these tabs.
We will have one toolbox instance, one toolbox iframe, which will be moved
around each tab's host. This is somewhat similar to host switching within the same tab.
This is all based on the same trick where we swap the toolbox iframe to another location.

Differential Revision: https://phabricator.services.mozilla.com/D131802
2022-01-14 12:02:25 +00:00
Alexandre Poirot e515c00f2a Bug 1569859 - [devtools] Fix SourceActor's url having stack trace in it. r=nchevobbe
Debugger.Source.url attribute may be of the form:
   "http://example.com/foo line 10 > inlineScript"
because of the following function `js::FormatIntroducedFilename`:
https://searchfox.org/mozilla-central/rev/253ae246f642fe9619597f44de3b087f94e45a2d/js/src/vm/JSScript.cpp#1816-1846
This isn't so easy to reproduce, but in next changeset, browser_dbg-breakpoints-popup.js's testPausedInTwoPopups covers this

Differential Revision: https://phabricator.services.mozilla.com/D135145
2022-01-14 12:02:25 +00:00
Alexandre Poirot b42e2fdedc Bug 1569859 - [devtools] Always return sync content when using SourcesManager.urlContents with partial=true. r=nchevobbe
With popup debugging (next patches), we trigger a race condition in this code
where `SourcesManager.urlContents` is called *after* `devtools-html-content` is fired.
i.e. after the HTML document is parsed.
This lead to return an async promise instead of an immediate value.
This confuses `SourceActor._getStartLineColumnDisplacement` which no longer apply breakpoints right away.
We miss early breakpoint support for popups.

This isn't easy to reproduce beyond popup debugging,
in next changeset, browser_dbg-breakpoints-popup.js's testPausedByBreakpoint covers this.

Differential Revision: https://phabricator.services.mozilla.com/D135144
2022-01-14 12:02:25 +00:00
Alexandre Poirot 8f7f623182 Bug 1569859 - [devtools] Spawn WindowGlobal targets for popup opened by the currently debugged tab r=nchevobbe,devtools-backward-compat-reviewers
For now, we only do that when "devtools.popups.debug" is manually set to true.

This is introducing some complexity in the way we filter out the WindowGlobal
we should consider or not. Before this patch it was quite straightforward.
We accepted all WindowGlobal's matching the tab's `browserId`.
Now we also accept the WindowGlobal whose `opener`'s `browserId` matches.

With this patch only, popups start appearing in the iframe dropdown.
You still have to manually switch to the popup via the dropdown to debug it in the inspector or console.
In the debugger, you will already start seeing the popup source and break on it.

Differential Revision: https://phabricator.services.mozilla.com/D133350
2022-01-14 12:02:24 +00:00
Nicolas Chevobbe f1670e6b04 Bug 1737972 - [devtools] Remove usage of lodash fromPairs/toPairs from debugger. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D135709
2022-01-14 11:22:16 +00:00
Nicolas Chevobbe c70fae1218 Bug 1737985 - [devtools] Remove lodash sortBy usage. r=bomsy.
This patch replaces sortBy calls by good old Array#sort.

Differential Revision: https://phabricator.services.mozilla.com/D135601
2022-01-14 11:22:16 +00:00
Nicolas Chevobbe 647c857c5f Bug 1749550 - [devtools] Add distinct style to event badge in markup view when an event listener is disabled. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D135680
2022-01-14 10:21:14 +00:00
Claudia f6d60d9cd8 Bug 1745383 - [devtools] Clean up the selected request reducer and adds a new selector to get clicked request r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D135241
2022-01-14 10:04:56 +00:00
Hubert Boma Manilla c150b0a2c0 Bug 1746368 - [devtools] Add blackbox checks for specfic paused frame location lines r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D135393
2022-01-12 23:44:19 +00:00
Nicolas Chevobbe eec59321db Bug 1492497 - [devtools] Add a way to disable (and re-enable) event listener for a given node. r=ochameau,devtools-backward-compat-reviewers,bomsy.
This patch adds a checkbox at the end of each event listeners in the EventTooltip,
which allow the user to disable/re-enable a given event listener.

This is done by managing a Map of nsIEventListenerInfo object in the NodeActor,
which we populate from `getEventListenerInfo`. Each `nsIEventListenerInfo` is
assigned a generated id, which can then be used to call the new NodeActor
methods, `(enable|disable)EventListener`.

We don't support disabling jquery/React event listeners at the moment, so we
display the checkbox for them as well, but disabled.

Differential Revision: https://phabricator.services.mozilla.com/D135133
2022-01-12 18:36:23 +00:00
Hubert Boma Manilla 5eb7f48c3c Bug 1748618 - [devtools] Add blackbox line context menu item r=nchevobbe
This patch adds context menu item to ignore single lines in the editor and in the gutter

Differential Revision: https://phabricator.services.mozilla.com/D135116
2022-01-12 14:26:31 +00:00
Cristian Tuns 52254e1b6b Backed out changeset 5a82b7a2951e (bug 1492497) for causing leaks CLOSED TREE 2022-01-12 09:29:06 -05:00
Alexandre Poirot dc913e4b3e Bug 1749512 - [devtools] Create all SessionContext objects from a single module. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D135603
2022-01-12 13:33:20 +00:00
Nicolas Chevobbe a232d2448c Bug 1492497 - [devtools] Add a way to disable (and re-enable) event listener for a given node. r=ochameau,devtools-backward-compat-reviewers,bomsy.
This patch adds a checkbox at the end of each event listeners in the EventTooltip,
which allow the user to disable/re-enable a given event listener.

This is done by managing a Map of nsIEventListenerInfo object in the NodeActor,
which we populate from `getEventListenerInfo`. Each `nsIEventListenerInfo` is
assigned a generated id, which can then be used to call the new NodeActor
methods, `(enable|disable)EventListener`.

We don't support disabling jquery/React event listeners at the moment, so we
display the checkbox for them as well, but disabled.

Differential Revision: https://phabricator.services.mozilla.com/D135133
2022-01-12 12:42:48 +00:00
Neil Deakin 5f1ff58926 Bug 371900, remove more now-unneeded empty oncommand attributes, r=bgrins,preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D135243
2022-01-11 20:02:30 +00:00
Alexandre Poirot 83e6733608 Bug 1749519 - [devtools] Prevent exception when reloading a page while having devtools opened. r=nchevobbe
Unfortunately, I haven't find any useful attribute on JSWindowActorChild/WindowGlobalChild/BrowsingContext
to detect that things are destroyed, or to be destroyed and avoid calling sendAsyncMessage,
or detect in the exception handler that we got destroyed.

So I'm falling back to ignore the exception based on its message...

Differential Revision: https://phabricator.services.mozilla.com/D135608
2022-01-11 16:16:33 +00:00
Nicolas Chevobbe 19bf4f97d1 Bug 1749449 - [devtools] Cleanup hasNativeConsoleAPI state through the codebase. r=jdescottes,devtools-backward-compat-reviewers.
This removes all the mention of this property which aren't
actually used to display the warning message in the end.

Differential Revision: https://phabricator.services.mozilla.com/D135587
2022-01-11 15:17:24 +00:00
Nicolas Chevobbe 4b0411240e Bug 1749123 - [devtools] Include hasNativeConsoleAPI in documentEvent. r=jdescottes,devtools-backward-compat-reviewers.
In the Browser Console, document-event resources are retrieved from a
legacy listener built on top of the documentEvent event, sent by the
webconsole actor.
documentEvent wasn't including hasNativeConsoleAPI, and we were displaying
a misleading overriden console API message there.
This patch fixes this and adds a test case to make sure we don't regress.
Funnily, the mochitest test harness _does_ override the global's console
property, and we have to reset it in the test to make sure the warning message
is not displayed.

Differential Revision: https://phabricator.services.mozilla.com/D135585
2022-01-11 15:17:23 +00:00
Nicolas Chevobbe 4b03a1cb7a Bug 1749025 - [devtools] Re-generate debugger bundles. r=ochameau.
Looks like some past commits had impact on bundles, let's update them.

Differential Revision: https://phabricator.services.mozilla.com/D135360
2022-01-11 12:54:40 +00:00
Randell Jesup cae53dc9cc WIP: Bug 1747261: enable ServiceWorker process-isolation for all domains r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D134505
2022-01-11 11:48:48 +00:00
James Graham 1501d682e7 Bug 1748845 - Update source-relative links in devtools docs, r=firefox-source-docs-reviewers,Honza,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D135382
2022-01-11 10:48:20 +00:00
Kershaw Chang f159addb13 Bug 1741425 - Enable more xpcshell tests with socket process, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D134484
2022-01-11 09:50:14 +00:00
Kershaw Chang 5d806765a0 Bug 1741425 - Enable more mochitest with socket process, r=ahal,webdriver-reviewers,preferences-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D134485
2022-01-11 09:49:45 +00:00
Alexandre Poirot b3b44589a8 Bug 1745240 - [devtools] Factorize some more code around isBrowsingContextPartOfContext. r=nchevobbe,jdescottes
Track all code which may filter BrowsingContext or WindowGlobal in the server codebase
in order to use a unique filtering method.

Differential Revision: https://phabricator.services.mozilla.com/D134423
2022-01-10 17:42:10 +00:00
Alexandre Poirot 6343e9ad93 Bug 1745240 - [devtools] Use only one method to filter both BrowsingContext and WindowGlobals. r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D135098
2022-01-10 17:42:09 +00:00
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
Emilio Cobos Álvarez 6b5a53d800 Bug 1747595 - Make color-adjust an alias of print-color-adjust as per spec. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D134779
2021-12-29 21:52:25 +00:00
Oriol Brufau add8020c67 Bug 1746303 - Fix browser_jsonview_expand_collapse.js test. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D134094
2021-12-24 06:57:22 +00:00
Daisuke Akatsuka 2696bcc736 Bug 1746832: Update MDN compat data. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D134379
2021-12-24 00:49:34 +00:00
Nicolas Chevobbe eb4b5c901f Bug 1737970 - [devtools] Refactor getBabelFrameIndexes so it does not use lodash. r=jdescottes.
The function was slightly simplified and shouldn't
iterate on frames as much as before.

Differential Revision: https://phabricator.services.mozilla.com/D134612
2021-12-23 15:56:31 +00:00
criss 11de1afc51 Backed out changeset 1c006c34b55d (bug 1746832) for causing failures on browser_rules_css-compatibility-toggle-rules.js 2021-12-23 14:45:34 +02:00
Daisuke Akatsuka 7cfcfad328 Bug 1746832: Update MDN compat data. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D134379
2021-12-23 11:52:55 +00:00
colin_czb 36e240b0dd Bug 1736412 - [devtools] Fix 'Add new rule' button when style node is deleted or moved. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D134447
2021-12-23 06:36:15 +00:00
Gijs Kruitbosch 65e85facbc Bug 1719939 - remove other mentions of browser.proton.enabled, r=jaws
Depends on D134310

Differential Revision: https://phabricator.services.mozilla.com/D134311
2021-12-22 21:41:41 +00:00
Sandor Molnar b1e67de63f Backed out changeset cbfea5546158 (bug 1746832) for causing dt failures. CLOSED TREE 2021-12-22 20:39:02 +02:00
Daisuke Akatsuka 3c2566042c Bug 1746832: Update MDN compat data. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D134379
2021-12-22 14:51:04 +00:00
Alexandre Poirot f1d437953a Bug 1745238 - [devtools] Use context in NetworkEventActor to know if we are debugging a tab. r=nchevobbe
This is more reliable check and it feels more common type of check
we already do elsewhere.
It also helps expose less convoluted objects to NetworkEventActor and so simplify it.

Differential Revision: https://phabricator.services.mozilla.com/D133474
2021-12-22 13:17:12 +00:00
Alexandre Poirot 2435b208e5 Bug 1745238 - [devtools] Use watcher actor context or target actor to filter out network event requests r=nchevobbe
This will help always use context to filter out resources.

Differential Revision: https://phabricator.services.mozilla.com/D133473
2021-12-22 13:17:11 +00:00
Alexandre Poirot 58dffa20e2 Bug 1745238 - [devtools] Pass watcher actor's `context` down to WindowGlobalTargetActor r=nchevobbe
This will be useful in next patch to know what is the overall debugged context.
We can finally know if that's the browser context/toolbox from almost any part of the server codebase!

Differential Revision: https://phabricator.services.mozilla.com/D133472
2021-12-22 13:17:11 +00:00
Alexandre Poirot d7e364c932 Bug 1745238 - [devtools] Rename WatcherActor and SessionData "context" to "sessionContext". r=nchevobbe
In prevision of a broader use of this existing "context" object,
I'm renaming it in order to make this important object clearer and more easily identifiable.

SessionContext object defines what we are debugging (everything, only one tab, an addon,...)
and so controls which platform data we should expose back to the client.

Differential Revision: https://phabricator.services.mozilla.com/D134411
2021-12-22 13:17:11 +00:00
Alexandre Poirot 5d0f3d320e Bug 1746952 - [devtools] Avoid notifying about same-process storage values when EFT is enabled. r=nchevobbe
We were notifying about same-process storage values twice.
Once with the top document target and another time via the iframe target.
This was probably invisible from the UI. We were probably only updating things twice without any visible breakage.

But this also highlighted that the test was quite wrong.
It was only asserting about the last resource for each storage type.
Luckily, the last resource to be notified was the one from the top document.
So that it contained all the storage values about all the iframes.

When I fix EFT implementation, now, iframe data is only visible in the iframe's related storage resource.
I tweaked the test to correctly assert data against the many resources for a single storage type.

Differential Revision: https://phabricator.services.mozilla.com/D134378
2021-12-22 09:59:09 +00:00
Alexandre Poirot eb9c8a8584 Bug 1746952 - [devtools] Fix targetFront attribute of all storage resources. r=nchevobbe
Most children of the target fronts are target scoped actors,
like console, inspector, thread,...
All these target scoped actor's fronts are created via:
https://searchfox.org/mozilla-central/rev/7d17fd1fe9f0005a2fb19e5d53da4741b06a98ba/devtools/shared/protocol/types.js#539-540
And so aren't going throught this `types.addActorType` inner function.

So fix the targetFront attribute for all fronts created via this `read` method
where the immediate parent is the targetFront.

Differential Revision: https://phabricator.services.mozilla.com/D134377
2021-12-22 09:59:09 +00:00
Alexandre Poirot 589bdcc457 Bug 1746952 - [devtools] Acknowledge the distinct storage resource for each target in browser_storage_dynamic_windows.js. r=nchevobbe
This test was brittle as it was assuming that only one resource was notified per storage type.
But this wasn't the case since fission or EFT!
We were lucky that the assertion were correct only against the latest resource
and not against the aggregate of the many resource (one per target).

Differential Revision: https://phabricator.services.mozilla.com/D134376
2021-12-22 09:59:08 +00:00
Gijs Kruitbosch b095cb0969 Bug 1747065 - remove plugin.load_flash_only setters which are no-ops r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D134398
2021-12-21 14:34:48 +00:00
Julian Descottes e7ba7fca64 Bug 1746461 - [devtools] Add mochitest for color scheme simulation and meta color-scheme r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D134306
2021-12-21 12:54:07 +00:00
Alexandre Poirot 40721e174c Bug 1746370 - [devtools] Pass SOURCE resources down to newGeneratedSources. r=nchevobbe
Actually I was wrong in bug 1745795.
This wasn't SourceFront but SOURCE resources, which are SourceActor's form and not a Front.

Let's make it clear and simplify the code some more.
Also stop calling makeSourceId from create.js
as we already have the reducer's source id via the reducer's source-actor's source attribute.

Differential Revision: https://phabricator.services.mozilla.com/D134006
2021-12-21 09:15:32 +00:00
Alexandre Poirot f326ca5ca0 Bug 1746370 - [devtools] Remove stringToSourceActorId as this was a workaround for flow. r=nchevobbe
This was only useful when flow was used.

Differential Revision: https://phabricator.services.mozilla.com/D134005
2021-12-21 09:15:32 +00:00
Alexandre Poirot 1c6546e6c4 Bug 1746370 - [devtools] Simplify SourceQueue as it only handles original sources. r=nchevobbe
SourceQueue used to throttle both generated and original sources.
But since we migrated to ResourceCommand, and it comes with a builtin throttling,
we only use SourceQueue for original sources.

So we can acknowledge that and simplify this a bit.

Differential Revision: https://phabricator.services.mozilla.com/D134004
2021-12-21 09:15:31 +00:00
Alexandre Poirot 6dad0dbd64 Bug 1746366 - [devtools] Remove outdated backward compat code from debugger frontend. r=nchevobbe
* SourceActor's introductionUrl has been removed in Fx77 in bug 1607639.
* getBreakableLines has been added in Fx68 in bug 1537779.
* getAvailableEventBreakpoints changed to return an array in Fx69 in bug 1549999.

Differential Revision: https://phabricator.services.mozilla.com/D134003
2021-12-21 09:15:31 +00:00
Gerald Squelart 1144535227 Bug 1729815 - Remove unnecessary profiler feature "threads" - r=julienw,perftest-reviewers,AlexandruIonescu
This feature doesn't have any effect anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133860
2021-12-20 21:03:09 +00:00
Emilio Cobos Álvarez c005576535 Bug 1746685 - Fix eye dropper contrast on dark pages. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D134198
2021-12-20 15:25:25 +00:00
Emilio Cobos Álvarez 461f89a0bb Bug 1746683 - Remove hwba since it's not a thing (hwb function supports alpha).
Partially backs out the previous patch.

Differential Revision: https://phabricator.services.mozilla.com/D134256
2021-12-20 02:53:31 +00:00
Sebastian Zartner 87f408eb47 Bug 1743107 - Fixed color incrementation for color functions without commas. r=jdescottes
Color incrementation now also works for color functions following the CSS Color 4 specification, i.e. with spaces as separators and the alpha value separated by a slash.

The test case related to incrementation of color values also got extended to cover this change plus the color functions hsl(), hsla() and hwb().

Differential Revision: https://phabricator.services.mozilla.com/D132993
2021-12-19 12:56:02 +00:00
Sebastian Zartner 3a67d45dd3 Bug 1743107 - Added support for HWB colors. r=jdescottes,kpatenio
This change doesn't cover auto-completion for "hwb" yet because it isn't added automatically when generating the properties-db.js.

Differential Revision: https://phabricator.services.mozilla.com/D132992
2021-12-19 12:56:01 +00:00
Emilio Cobos Álvarez 61ea030cc4 Bug 1746683 - Add hwb/a to devtools autocomplete lists. r=dholbert
The changes to the devtools directory were written automatically via ./mach devtools-css-db

Differential Revision: https://phabricator.services.mozilla.com/D134197
2021-12-18 20:09:29 +00:00
Sandor Molnar e45ac2363d Backed out changeset e9782fd301cc (bug 1746683) for causing mochitest failures in layout/inspector/tests/test_bug877690.html CLOSED TREE 2021-12-18 05:58:39 +02:00
Emilio Cobos Álvarez bd470ae24f Bug 1746683 - Add hwb/a to devtools autocomplete lists. r=dholbert
The changes to the devtools directory were written automatically via ./mach devtools-css-db

Differential Revision: https://phabricator.services.mozilla.com/D134197
2021-12-18 01:09:00 +00:00
Nicolas Chevobbe 4a5cfe7c65 Bug 1745932 - [devtools] Move highlighters.properties to fluent. r=fluent-reviewers,flod,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D133741
2021-12-17 16:19:04 +00:00
Nicolas Chevobbe f47f462297 Bug 1746150 - [devtools] Reset vertical scroll position when updating HTMLTooltip container. r=jdescottes.
This fixes issues with the iframe dropdown when it overflows and targets are
added/removed.

Differential Revision: https://phabricator.services.mozilla.com/D134039
2021-12-17 16:00:11 +00:00
Nicolas Chevobbe c33cb4b2ec Bug 1743594 - [devtools] Fix browser_styleinspector_tooltip-background-image.js intermittent. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D134130
2021-12-17 15:52:58 +00:00
Nicolas Chevobbe 997279c94d Bug 1746149 - [devtools] Remove OSX-specific Cmd+G shortcut in debugger. r=jdescottes.
The keyboard shortcut was supposed to move to the next search
result, but was only working on OSX. As you can already cycle
through search results with Enter, and given that Cmd+G only (barely)
work on OSX, it's safe to remove it.

Differential Revision: https://phabricator.services.mozilla.com/D134128
2021-12-17 13:53:55 +00:00
Markus Stange b9622a7b8f Bug 1745978 - Add the ability to fetch source code from disk to the Profiler WebChannel's querySymbolicationApi method. r=canaltinova
This updates profiler-get-symbols to the latest version.
The new /source/v1 entry point was implemented in
edb78205d1

Furthermore, this update also picks up a fix for macOS 12 system library symbolication.

Differential Revision: https://phabricator.services.mozilla.com/D133757
2021-12-17 11:11:48 +00:00
Nicolas Chevobbe 96fd8e5787 Bug 1736183 - [devtools] Add test for reset of node picker hovered node reference. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D133879
2021-12-17 07:18:18 +00:00
Julian Descottes 0b7fd00802 Bug 1736183 - [devtools] Reset hovered node reference when cancelling node picker r=nchevobbe
Quick patch, but needs test coverage

Differential Revision: https://phabricator.services.mozilla.com/D131375
2021-12-17 07:18:17 +00:00
Patrick ab5ce94360 Bug 1743102 Added color-scheme meta tag to remaining about: pages r=Gijs,necko-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D133743
2021-12-17 00:42:23 +00:00
Cristian Tuns 348796281f Backed out changeset f90cb649f371 (bug 1729815) for causing mochitest failures on Mutex_posix.cpp CLOSED TREE 2021-12-16 19:45:55 -05:00
Hubert Boma Manilla 1490eb2f73 Bug 1745940 - [devtools] Implement blackboxing lines UI functionality r=nchevobbe
Basic UI functionality for blackboxing

Enable this feature pref `devtools.debugger.features.blackbox-lines`

This is mainly to gather feeback from the team and webcompat, things
like the selection colors will likely change, maybe we can add a context menu
to the editor gutter as well etc.

Differential Revision: https://phabricator.services.mozilla.com/D132368
2021-12-16 23:53:26 +00:00
Hubert Boma Manilla f1fedb6b37 Bug 1745940 - [devtools] Add blackbox line support for actions and reducers r=ochameau
This patch includes the following:-
- The reducer logic to store the blackbox url and range info matches that on the
  server here https://searchfox.org/mozilla-central/rev/dfc0dea63a16b73078a46b6ae49b2a626b8c11b5/devtools/server/actors/utils/sources-manager.js#289-335
  Note: The client logic supports multiple ranges whhile the server supports one range (maybe we can add support for multiple to the server).
- Added jest tests for some edge cases
- Changed the asyncStore pref from `tabsBlackBoxed` to `blackboxedTabs` for readability ease
  and to avoid and errors as the format of the data stored changes.

  Before: `asyncStore.tabsBlackBoxed = ["foo.com", "bar.com"...]`
  After:  `asyncStore.blackboxedTabs = { "foo.com": [], "bar.com": [range, range, ...] }`


  The range sturcture

  ```
  const range = {
    start: { line: 1, column: 5 },
    end: { line: 3, column: 4 },
  }
  ```

Differential Revision: https://phabricator.services.mozilla.com/D132774
2021-12-16 23:53:26 +00:00
Gerald Squelart c40dcd12b5 Bug 1729815 - Remove unnecessary profiler feature "threads" - r=julienw,perftest-reviewers,AlexandruIonescu
This feature doesn't have any effect anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133860
2021-12-16 23:46:18 +00:00
Alexandre Poirot 4aac2bc737 Bug 1740116 - [devtools] Fix fetching extra data about cancelled navigation request. r=nchevobbe
These exception may happen when some pending request from the previous page
are received lated by the netmonitor, which tries to fetch extra data about these
old requests.
On the server side, these requests are destroyed when devtools.netmonitor.persistlog=false.
(which is the default behavior)

Differential Revision: https://phabricator.services.mozilla.com/D132495
2021-12-16 21:59:09 +00:00
Butkovits Atila c408716df0 Backed out changeset f2f23757c34f (bug 1743102) for causing node failures. CLOSED TREE 2021-12-16 19:23:43 +02:00
Patrick 7aeecb4714 Bug 1743102 Added color-scheme meta tag to remaining about: pages r=Gijs,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133743
2021-12-16 16:30:30 +00:00
Tom Ritter 47d1ab15d8 Bug 1746239: Load netmonitor devtools scripts via an absolute uri rather than relative r=Honza
Depends on D133931

Differential Revision: https://phabricator.services.mozilla.com/D133932
2021-12-16 15:24:54 +00:00
Alexandre Poirot 6c77e27255 Bug 1689459 - [devtools] Enable server side NETWORK resources for the browser toolbox. r=bomsy
In this patch we need to ensure that all NETWORK resources work correctly for the browser toolbox.

The main fix was to ensure that all Network resources were emitted by browsingContextID set to -1,
otherwise the ResourceCommand may try to lookup for the related target and won't find it.
That's because the browser toolbox uses a unique target for all parent process requests,
and still doesn't use EFT. So same-process iframe should still be debugged by their parent document target.

Also ResourceCommand used isServerTargetSwitchingEnabled on descriptor front,
but for now, only TabDescriptorFront exposes this method.

Differential Revision: https://phabricator.services.mozilla.com/D103770
2021-12-16 14:57:10 +00:00
Alexandre Poirot 5fcf60819d Bug 1689459 - [devtools] Always use matchRequest to filter out channels in the content process. r=bomsy
This watcher wasn't filtering request from http-on-image-cache-response
And request froms http-on-failed-opening-request were using a different filtering code
compared to network-events-stacktraces.js

So now, all network event related resources should be using the exact same filtering.
Then may be filtering by window isn't the best. It might actually be better to filter
by innerWindowId or browsingContextID. But this is another story and thanks
to this match, it will be easier to migrate all these codes to a new filtering.

Also, I had to tweak getWindowForRequest in order to correctly return the window
for the CSS request done in test_network_get.html.
This will probably fix some missing stack trace for some requests like this one!

Differential Revision: https://phabricator.services.mozilla.com/D132989
2021-12-16 14:57:10 +00:00
Jonathan Kew 20ec7ce89f Bug 1746187 - Add CSS support for the hyphenate-character property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133889
2021-12-16 13:47:55 +00:00
Hubert Boma Manilla 543d221bf6 Bug 1733420 - [devtools] Migrate the remaining tests to http-first r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D133663
2021-12-16 10:03:03 +00:00
Marian-Vasile Laza e3ec8630b1 Backed out 4 changesets (bug 1746187) for causing xpcshell failures on test_css-properties-db.js.
Backed out changeset fa4f889dd0d3 (bug 1746187)
Backed out changeset e3fce2273109 (bug 1746187)
Backed out changeset 6733677ad35d (bug 1746187)
Backed out changeset a4375ff93414 (bug 1746187)
2021-12-16 04:51:13 +02:00
Ting-Yu Lin 8b1e02f532 Bug 1715112 Part 3 - Enable CSS scrollbar-gutter by default. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133696
2021-12-16 01:01:46 +00:00
Jonathan Kew 83df1246c1 Bug 1746187 - Add CSS support for the hyphenate-character property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133889
2021-12-15 23:16:49 +00:00
Marian-Vasile Laza cf9f173039 Backed out 3 changesets (bug 1715112) for causing xpcshell failures on test_css-properties-db.js.
Backed out changeset 6b91412c20e3 (bug 1715112)
Backed out changeset b7cbd5b59fc5 (bug 1715112)
Backed out changeset 9b7d73b6d81e (bug 1715112)
2021-12-16 02:06:25 +02:00
Ting-Yu Lin e2cfa1e52c Bug 1715112 Part 3 - Enable CSS scrollbar-gutter by default. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133696
2021-12-15 22:40:57 +00:00
Nicolas Chevobbe c2d8af4d9e Bug 1745466 - [devtools] Hide highlighter immediately when picking a node. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D133727
2021-12-15 16:39:34 +00:00
Alexandre Poirot f9dcfd4d71 Bug 1745944 - [devtools] Use new ChromeUtils.getXPCOMErrorName() method to get platform error names. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D133758
2021-12-15 16:12:33 +00:00
Alexandre Poirot ca69083589 Bug 1745944 - [devtools] Make browser_resources_network_events.js generic enough to be used for other test pages. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D133769
2021-12-15 16:12:33 +00:00
Alexandre Poirot 3368fee725 Bug 1745944 - [devtools] Clarify the two tests against ResourceCommand cache for NETWORK_EVENT's. r=nchevobbe
In this test, there is two that are actually dedicated to cover ResourceCommand internal cache
and the precise behavior of ignoreExistingResources: true/false.

I pulled them off in a dedicated test file and tried to simplified them a bit.

Because the server doesn't really support fetch request done before calling watchResources,
this test is a bit hard to understand. So I tried to make it clear via extensive comments.

Then, my goal is to reuse the third and simplier test to extend the coverage of NETWORK_EVENT
with many other assertions.

Differential Revision: https://phabricator.services.mozilla.com/D133768
2021-12-15 16:12:33 +00:00
Alexandre Poirot c7d855b0b4 Bug 1745795 - [devtools] Avoid confusion between "reducer source" and "SourceFront" objects. r=bomsy
I'm also removing the `isBlackBoxed` boolean from source actor in the reducer
in order to ensure we always only use the source reducer one.

And I dropped some comment here and there to help understand where all these sources objects are coming from.

Differential Revision: https://phabricator.services.mozilla.com/D133658
2021-12-15 16:11:23 +00:00
Claudia 1563d9dc45 Bug 1744783 - [devtools] Add new context menu for the New Custom Request panel r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D133649
2021-12-15 15:59:06 +00:00
Claudia 993ac25bd2 Bug 1744782 - [devtools] Add new toolbar button for the New Custom Request panel r=bomsy
This is the first part of this bug, the next patch will include the context menu item

Differential Revision: https://phabricator.services.mozilla.com/D133506
2021-12-15 15:59:05 +00:00
Claudia f90f2e8dc0 Bug 1744790 - [devtools] Add new Edit and resend panel in the left side panel r=bomsy
This patch creates an HTTP Custom request component without functionality, only shows the new panel on the left. Also, it adds a simple test, that will be uptaded as new features are added.

Differential Revision: https://phabricator.services.mozilla.com/D133390
2021-12-15 15:59:05 +00:00
Alexandre Poirot 9650c11691 Bug 1729674 - [devtools] Re-enable browser_aboutdebugging_devtoolstoolbox_navigate_back_forward.js for BFCache. r=nchevobbe
This has been made possible thanks to bug 1675456.

Differential Revision: https://phabricator.services.mozilla.com/D133874
2021-12-15 13:30:57 +00:00
Alexandre Poirot 0f16876834 Bug 1729675 - [devtools] Re-enable browser_aboutdebugging_devtoolstoolbox_navigate_to_url for BFCache. r=nchevobbe
This has been made possible thanks to bug 1675456.

Differential Revision: https://phabricator.services.mozilla.com/D133873
2021-12-15 13:30:56 +00:00
nchevobbe 6072b8f064 Bug 1746142 - [devtools] Fix keyboard shortcut for showing ShortcutsModal on non-OSX OSes. r=ochameau.
The keyboard shortcut was not set properly (and wasn't unset).
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D133862
2021-12-15 11:22:44 +00:00
Emilio Cobos Álvarez dae5c87696 Bug 1699220 - Add support for the revert-layer keyword. r=boris
This patch looks bigger than it is, but it's mostly because
of plumbing.

To implement revert-layer we need not only the cascade origin of the
declaration, but the whole cascade level, plus also the layer order.

In order to do this, encapsulate these two things inside a 32-bit
`CascadePriority` struct and plumb it through the rule tree and so on.
This allows us to remove the packing and unpacking of CascadeLevel,
though I kept the ShadowCascadeOrder limit for now in case we need to
reintroduce it.

Fix `!important` behavior of layers while at it (implementing it in
`CascadeLevel::cmp`, spec quote included since it was tricky to find)
since some revert-layer tests were depending on it.

The style attribute test is failing now, but follow-up commit fixes
it, see spec issue.

In terms of the actual keyword implementation, it's sort of
straight-forward: We implement revert and revert-layer in a shared
way, by storing the cascade priority that reverted it.

Differential Revision: https://phabricator.services.mozilla.com/D133372
2021-12-14 15:38:34 +00:00
Nicolas Chevobbe 6f823dffcc Bug 1745881 - [devtools] Fix backward-compat comment version number. r=bomsy.
frame.isTopLevel was added in 96, not in 95.

Differential Revision: https://phabricator.services.mozilla.com/D133721
2021-12-14 13:48:15 +00:00
Paul Adenot dd157dc0a0 Bug 1745176 - Add profiler markers to MediaTransportHandler.cpp. r=pehrsons,gerald
Initial patch by Michael Froman <mfroman@mozilla.com>.

Differential Revision: https://phabricator.services.mozilla.com/D133348
2021-12-14 13:40:52 +00:00
Hubert Boma Manilla 63495d728e Bug 1745921 - [devtools] Remove unused tabBlackboxed pref r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D133095
2021-12-14 12:50:17 +00:00
Norisz Fay 333caceb64 Backed out 5 changesets (bug 1742865, bug 1744397) for causing wpt failures on attr-meta-http-equiv-refresh/parsing.html CLOSED TREE
Backed out changeset 7b01edc5a0e0 (bug 1744397)
Backed out changeset 41abd4b7d2c0 (bug 1744397)
Backed out changeset 634641e3a05a (bug 1744397)
Backed out changeset 6e7755177481 (bug 1744397)
Backed out changeset e9fc94b33da9 (bug 1742865)
2021-12-14 13:25:58 +02:00
Peter Van der Beken a538f42b2d Bug 1744397 - Simplify refresh code: clean up meta refresh code in nsDocShell. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132862
2021-12-14 10:13:59 +00:00
Nicolas Chevobbe 737bcdbb0c Bug 1129488 - [devtools] Make it possible to pick elements with pointer-events: none. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D133070
2021-12-14 09:33:49 +00:00
Nick Alexander 33b7a096e7 Bug 1737117 - Pre: Add a reason to "should process updates at startup" logic. r=bytesized
I've elected to rename the function from `Should...` to
`ShouldNot...`, but not to rename the various test files.  The
functionality under test is both "should" and "should not", so I think
the churn of renaming is not justified.

This rearranges the deck chairs to accommodate testing the new
functionality in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D133556
2021-12-14 07:00:59 +00:00
Butkovits Atila 0a28019a1d Backed out 2 changesets (bug 1737117) for causing bustages at nsAppRunner.cpp. CLOSED TREE
Backed out changeset b78709bc0d0c (bug 1737117)
Backed out changeset b3be1a6a5e3f (bug 1737117)
2021-12-14 06:30:49 +02:00
Nick Alexander 61521bf00c Bug 1737117 - Pre: Add a reason to "should process updates at startup" logic. r=bytesized
I've elected to rename the function from `Should...` to
`ShouldNot...`, but not to rename the various test files.  The
functionality under test is both "should" and "should not", so I think
the churn of renaming is not justified.

This rearranges the deck chairs to accommodate testing the new
functionality in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D133556
2021-12-14 03:44:14 +00:00
Alexandre Poirot 032cb8a737 Bug 1744556 - [devtools] Avoid exception about server sent events when opening the browser toolbox. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D132988
2021-12-13 15:21:57 +00:00
criss 615b164b26 Backed out changeset 227dd11a65eb (bug 1745176) for causing bustages on MediaTransportHandler.cpp. CLOSED TREE 2021-12-13 15:58:44 +02:00
Paul Adenot 4a5e4c886e Bug 1745176 - Add profiler markers to MediaTransportHandler.cpp. r=pehrsons,gerald
Initial patch by Michael Froman <mfroman@mozilla.com>.

Differential Revision: https://phabricator.services.mozilla.com/D133348
2021-12-13 11:14:11 +00:00
Claudia 90864a0bd8 Bug 1675762 - [devtools] Use AppErrorBoundary component in the Console panel r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D129946
2021-12-13 08:23:46 +00:00
Andreea Pavel aaa1799be4 Bug 1742672 - disable browser_toolbox_fission_navigation.js on win10_2004 and linux64 r=intermittent-reviewers,MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D133564
2021-12-11 17:07:06 +00:00
Nicolas Chevobbe ab7531ceed Bug 1531311 - [devtools] Add more visibility for node picker when debugging remote pages. r=jdescottes,devtools-backward-compat-reviewers.
This patch does a couple things to tell users they can use the node picker when
debugging a remote page:
- changes the node picker button icon (arrow -> hand) when connected to an android phone,
  as well as its tooltip
- adds a notice in the content page (i.e. on the phone) when the picker starts

Differential Revision: https://phabricator.services.mozilla.com/D132705
2021-12-11 10:58:35 +00:00
Jonathan Watt 91da4bcb58 Bug 1745325 - Remove unnecessary setting of `print.tab_modal.enabled=true` in tests. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D133449
2021-12-10 22:56:09 +00:00
Alexandre Poirot f71b6141a2 Bug 1744942 - [devtools] Convert browser_dbg-chrome-debugging.js into a resource command test. r=bomsy
This test was using legacy Thread actor APIs whereas sources are meant
to be received via ResourceCommand.

Differential Revision: https://phabricator.services.mozilla.com/D133189
2021-12-10 11:56:45 +00:00
Alexandre Poirot 50ecc431c2 Bug 1744942 - [devtools] Expose CommandsFactory.spawnClientToDebugSystemPrincipal to easily span Browser Toolbox-like DevToolsClient's. r=nchevobbe
This code could be useful in other places, especially in tests. (See next changeset)

I'm even wondering if `forMainProcess` should be using such type of client by default?
Concretely, in production, when we debug the main process, I think we always use such special client/server.

Differential Revision: https://phabricator.services.mozilla.com/D133188
2021-12-10 11:56:44 +00:00
Iulian Moraru a5854b43a4 Backed out changeset 01eb21de6aef (bug 1745325) for causing mochitest failures on browser_preview_print_coop.js. CLOSED TREE 2021-12-10 07:28:02 +02:00
Jonathan Watt cccfc1962d Bug 1745325 - Remove unnecessary setting of `print.tab_modal.enabled=true` in tests. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D133449
2021-12-10 03:11:13 +00:00
Boris Chiou 7c8078f842 Bug 1388931 - Unship SVGPathSeg APIs behind a preference. r=emilio
Add the preference, dom.svg.pathSeg.enabled, so let
SVGPathElement::getPathSegAtLength(), SVGAnimatedPathData::pathSegList,
and SVGAnimatedPathData::animatedPathSegList behind the preference, and
set the preference to false by default on all channels.

Differential Revision: https://phabricator.services.mozilla.com/D133289
2021-12-10 01:01:40 +00:00
Noemi Erli 6d98163517 Backed out 2 changesets (bug 1744942) for causing failures in browser_resources_sources.js CLOSED TREE
Backed out changeset 7cf66bf11b1b (bug 1744942)
Backed out changeset d42bdc0b8496 (bug 1744942)
2021-12-09 17:33:41 +02:00
Alexandre Poirot f6451dc5cb Bug 1744942 - [devtools] Convert browser_dbg-chrome-debugging.js into a resource command test. r=bomsy
This test was using legacy Thread actor APIs whereas sources are meant
to be received via ResourceCommand.

Differential Revision: https://phabricator.services.mozilla.com/D133189
2021-12-09 13:59:38 +00:00
Alexandre Poirot 1ef558b1b4 Bug 1744942 - [devtools] Expose CommandsFactory.spawnClientToDebugSystemPrincipal to easily span Browser Toolbox-like DevToolsClient's. r=nchevobbe
This code could be useful in other places, especially in tests. (See next changeset)

I'm even wondering if `forMainProcess` should be using such type of client by default?
Concretely, in production, when we debug the main process, I think we always use such special client/server.

Differential Revision: https://phabricator.services.mozilla.com/D133188
2021-12-09 13:59:37 +00:00
Nicolas Chevobbe 3daf92c702 Bug 1743594 - [devtools] Add a readyPromise property to the RuleView panel and wait for it in test helpers. r=ochameau.
The RuleView calls `onSelected` from its constructor, which might call `CssRuleView#selectElement`,
which returns a Promise that is resolved when the view gets populated.
So far tests weren't waiting for this specific Promise, which could lead to failures
as test would query the DOM for the CssRuleView (which might not exist yet).
In order to fix this, we expose a `readyPromise` on the RuleView panel and await
on it in the `openRuleView` test helper.

Differential Revision: https://phabricator.services.mozilla.com/D132930
2021-12-09 06:48:14 +00:00
Alexandre Poirot 007b9e3bdd Bug 1744565 - [devtools] Fork browser_resources_sources.js to test GC-ed sources explicitely. r=bomsy
But the miss of target attaching wasn't the sole reason why it fails.
The `resurrectSource` function is still failing for javascriptURL and domTimer sources.
I'm also seeing exception about not being unable to load sources.js, but that doesn't seem to break anything in this test.

So I'm forking this test in two. One, as before, which will assert that we
catch absolutely all the sources when we reload the page *after* we started watching.
And a new test, which ensure testing GC-ed sources and better highlights
which are the one that we fail resurrecting.

(I'm also removing target related assertions as they aren't really relevant for this test)
(And migrate to CommandsFactory to simplify the test a bit)

Differential Revision: https://phabricator.services.mozilla.com/D133094
2021-12-08 15:54:58 +00:00
Alexandre Poirot 25d52b47b7 Bug 1744565 - [devtools] Attach the thread actor to intercept future sources when watching for sources. r=bomsy
In this test, we weren't setting breakpoints, nor watching fot thread states.
So nothing was "attaching" the thread actor and so we would miss all sources created
after calling SourceWatcher.watch. (we only catched already existing sources)

Thus leading to many intermittents.

Differential Revision: https://phabricator.services.mozilla.com/D133093
2021-12-08 15:54:57 +00:00
Emilio Cobos Álvarez db7a3c1c0e Bug 1744009 - Deal with destruction a bit better in the animation inspector. r=nchevobbe
My patch above causes select change events in the parent process to be a
bit more async so we hit an exception here like:

    TEST-UNEXPECTED-FAIL | devtools/client/inspector/animation/test/browser_animation_pause-resume-button_end-time.js | A promise chain failed to handle a rejection: can't access property "store", this.inspector is null - stack: get state@resource://devtools/client/inspector/animation/animation.js:218:5
    setAnimationStateChangedListenerEnabled@resource://devtools/client/inspector/animation/animation.js:562:31
    setAnimationsPlaybackRate@resource://devtools/client/inspector/animation/animation.js:516:12
    Async*onChange@resource://devtools/client/inspector/animation/components/PlaybackRateSelector.js:70:30
    invokeGuardedCallbackImpl@resource://devtools/client/shared/vendor/react-dom.js:74:10
    invokeGuardedCallback@resource://devtools/client/shared/vendor/react-dom.js:111:29
    invokeGuardedCallbackAndCatchFirstError@resource://devtools/client/shared/vendor/react-dom.js:125:25
    executeDispatch@resource://devtools/client/shared/vendor/react-dom.js:346:42
    executeDispatchesInOrder@resource://devtools/client/shared/vendor/react-dom.js:365:20
    executeDispatchesAndRelease@resource://devtools/client/shared/vendor/react-dom.js:462:29
    executeDispatchesAndReleaseTopLevel@resource://devtools/client/shared/vendor/react-dom.js:470:10
    forEachAccumulated@resource://devtools/client/shared/vendor/react-dom.js:444:8
    runEventsInBatch@resource://devtools/client/shared/vendor/react-dom.js:598:21
    runExtractedEventsInBatch@resource://devtools/client/shared/vendor/react-dom.js:606:19
    handleTopLevel@resource://devtools/client/shared/vendor/react-dom.js:4272:30
    batchedUpdates$1@resource://devtools/client/shared/vendor/react-dom.js:15752:12
    batchedUpdates@resource://devtools/client/shared/vendor/react-dom.js:1882:12
    dispatchEvent@resource://devtools/client/shared/vendor/react-dom.js:4351:19
    receiveMessage@resource://gre/actors/SelectChild.jsm:272:21
    receiveMessage@resource://gre/actors/SelectChild.jsm:475:21
    JSActor query*handleEvent@resource://gre/actors/SelectParent.jsm:340:21
    EventListener.handleEvent*_registerListeners@resource://gre/actors/SelectParent.jsm:389:11
    open@resource://gre/actors/SelectParent.jsm:224:10
    receiveMessage@resource://gre/actors/SelectParent.jsm:792:28
    JSActor query*showDropDown@resource://gre/actors/SelectChild.jsm:128:16
    SelectContentHelper@resource://gre/actors/SelectChild.jsm:64:8
    handleEvent@resource://gre/actors/SelectChild.jsm:451:29
    synthesizeMouseAtPoint@chrome://mochikit/content/tests/SimpleTest/EventUtils.js:644:13
    synthesizeMouse@chrome://mochikit/content/tests/SimpleTest/EventUtils.js:562:10
    synthesizeMouseAtCenter@chrome://mochikit/content/tests/SimpleTest/EventUtils.js:735:10
    clickOnPlaybackRateSelector@chrome://mochitests/content/browser/devtools/client/inspector/animation/test/head.js:303:14
    @chrome://mochitests/content/browser/devtools/client/inspector/animation/test/browser_animation_pause-resume-button_end-time.js:43:9
    Async*Tester_execTest/<@chrome://mochikit/content/browser-test.js:1091:34
    Tester_execTest@chrome://mochikit/content/browser-test.js:1131:11
    nextTest/<@chrome://mochikit/content/browser-test.js:939:14
    SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1041:13

Other code around is already dealing with an already-destroyed inspector
so do the same here.

Differential Revision: https://phabricator.services.mozilla.com/D133097
2021-12-08 14:07:48 +00:00
Emily McDonough c4d55a9374 Bug 1741973 - Implement parsing of the page property r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131531
2021-12-07 22:11:53 +00:00
Alexandre Poirot 388c98ecac Bug 1741708 - [devtools] Also fix CSS error message filtering. r=jdescottes
See previous changeset.

Differential Revision: https://phabricator.services.mozilla.com/D132340
2021-12-07 14:00:04 +00:00
Alexandre Poirot b87af75014 Bug 1741708 - [devtools] Fix exception message filtering for Web extension debugging. r=jdescottes
The original report isn't against Nightly and so is before bug 1675456 landed.
It means that on current release, we are still going throught the WebConsole actor
and use ConsoleServiceListener, which isn't filtering anything:
this.window is null because targetActor.isRootActor=true:
 https://searchfox.org/mozilla-central/rev/65d4d3399afa79c8de5a0cc11752d2ba7c31edc1/devtools/server/actors/webconsole/listeners/console-service.js#72-102)
=> on release we log all exception, like the MBT.

Whereas on Nightly, bug 1675456 kicks in and we are going using ErrorMessageWatcher.
This time, this class filter out message and only include the one related to the target's current top window.
So it is slightly better, but we may miss messages of other documents of the add-on.
For example, if a popup window is opened after having opened the DevTools.

This patch addresses the watcher class codepath. Only tests should be using the console actor and ConsoleServiceListener.
We may later drop this code once we start spawning one target for each individual document
used by an add-on. For now, the WebExtensionTargetActor is a unique target that debugs all extension's documents.

Differential Revision: https://phabricator.services.mozilla.com/D132230
2021-12-07 14:00:04 +00:00
Alexandre Poirot 4d979348c9 Bug 1741708 - [devtools] From the WebExtensionTargetActor, ensure debugging only the documents related to the add-on. r=jdescottes
We were iterating over all parent process docshells...
so debugging one web extension would probably have side effects on the whole browser
instead of only the web extension itself!

It is a bit hard to cover this with a test as that's some server side only data,
but the following patch and test only works with this being fixed.

Differential Revision: https://phabricator.services.mozilla.com/D132465
2021-12-07 14:00:03 +00:00
Alexandre Poirot e221961f02 Bug 1741708 - [devtools] Pass the add-on's BrowsingContext group ID down to the WebExtension target actor. r=jdescottes
This will be used in following changeset to better identify docshells related to the add-on.

Differential Revision: https://phabricator.services.mozilla.com/D132464
2021-12-07 14:00:03 +00:00
Kershaw Chang 0d043867db Bug 1734573 - Fix failed test, r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D127825
2021-12-07 11:45:38 +00:00
Hubert Boma Manilla e87214968d Bug 1739382 - [devtools] Display a console warning instead of throwing error (causing a debugger crash) r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D132917
2021-12-06 23:24:04 +00:00
Alexandru Michis 40430b0cce Backed out changeset 66eb52e5da74 (bug 1741973) for causing mochitest failures in test_animation-type-longhand.html
CLOSED TREE
2021-12-07 00:01:55 +02:00
Emily McDonough bd3b879775 Bug 1741973 - Implement parsing of the page property r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131531
2021-12-06 19:34:43 +00:00
Alexandre Poirot e6ef16a3bd Bug 1743044 - [devtools] Avoid instantiating duplicated Debugger.Source/SourceActor for inline scripts. r=bomsy CLOSED TREE
Regression from bug 1643540.
Debugger.findSourceURLs is recording all sources except the one having an `introductionScript` defined.
i.e. the one being added dynamically and not part of the original HTML content (at least that the expectation of findSourceURLs)
It is important to use the same filtering in ThreadActor, otherwise we may not populate `urlMap`
correctly and call resurrectSource for sources that were recorded by findSourceURLs.
This would introduce duplicated Debugger.Source and SourceActor for the same URL.

Differential Revision: https://phabricator.services.mozilla.com/D132218
2021-12-06 16:54:29 +00:00
Alexandre Poirot 5a85f1bd27 Bug 1743044 - [devtools] Expand source's introductionType coverage. r=bomsy
I'm adding one test for each Debugger.Source's introductionType
which was not covered yet.
Except for eventHandler and domTimer, which require some additional fix (see next changeset).

Differential Revision: https://phabricator.services.mozilla.com/D132217
2021-12-06 16:54:29 +00:00
Noemi Erli d99b4a414c Backed out 2 changesets (bug 1743044) for causing failures in browser_resources_sources.js
Backed out changeset dd0d0dabb482 (bug 1743044)
Backed out changeset 1ec7edd8a8e6 (bug 1743044)
2021-12-06 19:36:51 +02:00
Alexandre Poirot ed3fd8a0d8 Bug 1743044 - [devtools] Avoid instantiating duplicated Debugger.Source/SourceActor for inline scripts. r=bomsy
Regression from bug 1643540.
Debugger.findSourceURLs is recording all sources except the one having an `introductionScript` defined.
i.e. the one being added dynamically and not part of the original HTML content (at least that the expectation of findSourceURLs)
It is important to use the same filtering in ThreadActor, otherwise we may not populate `urlMap`
correctly and call resurrectSource for sources that were recorded by findSourceURLs.
This would introduce duplicated Debugger.Source and SourceActor for the same URL.

Differential Revision: https://phabricator.services.mozilla.com/D132218
2021-12-06 16:54:29 +00:00
Alexandre Poirot 52ae8ecb09 Bug 1743044 - [devtools] Expand source's introductionType coverage. r=bomsy
I'm adding one test for each Debugger.Source's introductionType
which was not covered yet.
Except for eventHandler and domTimer, which require some additional fix (see next changeset).

Differential Revision: https://phabricator.services.mozilla.com/D132217
2021-12-06 16:54:29 +00:00
Joel Maher 63bf096aef Bug 1743907 - Remove webrender annotation from manifestparser manifests. r=ahal,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D132682
2021-12-03 16:04:29 +00:00
Nicolas Chevobbe 322a2131b6 Bug 1744179 - [devtools] Add doctype to all webconsole test pages.
Now what we show a warning message on pages with invalid/no doctype,
a lot of tests were failing because of it.
This patch only adds doctype on all webconsole test pages.

Differential Revision: https://phabricator.services.mozilla.com/D132793
2021-12-03 15:41:06 +00:00
Sandor Molnar 0d095a62b5 Backed out changeset 8fac157c354a (bug 1741973) for causing xpc failures in devtools/shared/tests/xpcshell/test_css-properties-db. CLOSED TREE 2021-12-03 04:17:36 +02:00
Emily McDonough 1de10c57f2 Bug 1741973 - Implement parsing of the page property r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131531
2021-12-02 23:37:28 +00:00
nchevobbe 3bb7e3b525 Bug 1238861 - [devtools] Add DOCTYPE to test pages. r=ochameau.
The new warning message was messing up with some tests using doctype-less pages.

Differential Revision: https://phabricator.services.mozilla.com/D132558
2021-12-02 22:46:23 +00:00
nchevobbe a6d4805a31 Bug 1238861 - Add webconsole mochitest to assert doctype error messages. r=bomsy.
In the previous patch of this stack, we started to emit error messages for
documents with non-standards doctype.
This patch makes it so we also add a Learn More link to the MDN page about
doctype modes, and adds a test to check that everything is displayed as
we expect.

Differential Revision: https://phabricator.services.mozilla.com/D131890
2021-12-02 22:46:22 +00:00
Gerald Squelart a1bb77b57e Bug 1742522 - New profiler feature to discover unregistered threads and capture some data - r=florian
The profiler uses GetProcInfoSync to discover unregistered threads, and record their CPU utilization. This data is captured in markers on the main thread track.
On Windows, because this work takes much longer than the usual sampling interval, it is done on its own thread.

Differential Revision: https://phabricator.services.mozilla.com/D132213
2021-12-02 08:52:40 +00:00
nchevobbe be70bb4001 Bug 1580394 - [devtools] Don't wait for document to be ready to show PausesDebuggerOverlay. r=ochameau.
We're using the new `force` parameter for `insertAnonymousContent` to force creating a container
for the anonymous content, and we add a new option to the CanvasAnonymousHelper so highlighter
can choose to not wait for the dom to load.
For now we only use it for the paused debugger overlay as the other highlighters might need
an inspector front, which may require the dom to be ready.
We enable the assertions in  browser_dbg-paused-overlay-loading.js to check that the
highlighter is visible.
This required a few changes in the highlighter test actor.
First, it was waiting for an inspector front in its initialize method, which was
waiting indefinitely in our test as the document is paused. As this was only done
to retrieve the inspector actorID, we simply remove it and retrieve the actorID
through the connection and the target form when it's needed (for the eye dropper).
Secondly, the isPausedDebuggerOverlayVisible method was returning true even when
the highlighter wasn't displayed, so we check a few additional attributes.

Depends on D132034

Differential Revision: https://phabricator.services.mozilla.com/D132116
2021-12-02 08:39:23 +00:00
Nicolas Chevobbe 1fc2098688 Bug 1591025 - [devtools] Display PausedDebuggerOverlay images in remote debugged Fenix. r=jdescottes.
The resume and stepOver images are moved to devtools/shared so they can be accessed
by both the debugger UI and the PausedDebuggerOverlay.

Differential Revision: https://phabricator.services.mozilla.com/D132224
2021-12-02 07:10:28 +00:00
Nicolas Chevobbe 4773f76cb9 Bug 1743347 - [devtools] Check whyPaused text in mochitests. r=bomsy.
While working around those strings, I realized we didn't
check the text of the component in the different situations
it handles, so I added a few assertions.

Differential Revision: https://phabricator.services.mozilla.com/D132338
2021-12-02 07:10:28 +00:00
Nicolas Chevobbe 6773640c8e Bug 1743347 - [devtools] Move whyPaused.* string to a ftl file in devtools/shared. r=bomsy,jdescottes,fluent-reviewers,flod
Since those strings can be consumed by the PausedDebuggerOverlay, on the server,
we need to put them in devtools/shared.
As this will create some work for the l10n team, we migrate them to Fluent so we're
feeding 2 birds with 1 scone.
The `<LocalizationProvider>` is added directly in `<WhyPaused>` (and not in `<App>`,
as it's messing up with the React context (See Bug 1743155).
Some snapshots are updated. It's unfortunate that we don't see the translated
strings there anymore, but we can't have nice things in Jest.

Differential Revision: https://phabricator.services.mozilla.com/D132260
2021-12-02 07:10:27 +00:00
criss d4d26fc3cc Backed out 3 changesets (bug 1743347, bug 1591025) for causing mochitest failures on browser_metrics_debugger.js. CLOSED TREE
Backed out changeset 48c568e6d4d4 (bug 1591025)
Backed out changeset cf7717dfbd7c (bug 1743347)
Backed out changeset fd097d484cfb (bug 1743347)
2021-12-02 08:53:06 +02:00
Nicolas Chevobbe df24547e2c Bug 1591025 - [devtools] Display PausedDebuggerOverlay images in remote debugged Fenix. r=jdescottes.
The resume and stepOver images are moved to devtools/shared so they can be accessed
by both the debugger UI and the PausedDebuggerOverlay.

Differential Revision: https://phabricator.services.mozilla.com/D132224
2021-12-02 05:57:56 +00:00
Nicolas Chevobbe 2ca97441ba Bug 1743347 - [devtools] Check whyPaused text in mochitests. r=bomsy.
While working around those strings, I realized we didn't
check the text of the component in the different situations
it handles, so I added a few assertions.

Differential Revision: https://phabricator.services.mozilla.com/D132338
2021-12-02 05:57:56 +00:00
Nicolas Chevobbe a559921b50 Bug 1743347 - [devtools] Move whyPaused.* string to a ftl file in devtools/shared. r=bomsy,jdescottes,fluent-reviewers,flod
Since those strings can be consumed by the PausedDebuggerOverlay, on the server,
we need to put them in devtools/shared.
As this will create some work for the l10n team, we migrate them to Fluent so we're
feeding 2 birds with 1 scone.
The `<LocalizationProvider>` is added directly in `<WhyPaused>` (and not in `<App>`,
as it's messing up with the React context (See Bug 1743155).
Some snapshots are updated. It's unfortunate that we don't see the translated
strings there anymore, but we can't have nice things in Jest.

Differential Revision: https://phabricator.services.mozilla.com/D132260
2021-12-02 05:57:55 +00:00
Valentin Gosu d408e4a4e1 Bug 1741190 - Add a profiler preset for necko r=necko-reviewers,kpatenio,dragana,julienw
Differential Revision: https://phabricator.services.mozilla.com/D132380
2021-12-01 16:09:22 +00:00
Emilio Cobos Álvarez 9d96116e13 Bug 1743803 - Regenerate devtools property-database.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2021-12-01 16:13:09 +01:00
Nicolas Chevobbe d5b6cf4e96 Bug 1740914 - [devtools] Check custom user agent is used to get resources. r=ochameau.
Depends on D132192

Differential Revision: https://phabricator.services.mozilla.com/D132363
2021-12-01 09:23:32 +00:00
Sandor Molnar 41e90a1bee Backed out 2 changesets (bug 1580394) for causing dt failures in browser_dbg-paused-overlay-loading. CLOSED TREE
Backed out changeset e692ec7d440f (bug 1580394)
Backed out changeset 0ceda05fc737 (bug 1580394)
2021-12-01 11:20:15 +02:00
nchevobbe 6fe08ad946 Bug 1580394 - [devtools] Don't wait for document to be ready to show PausesDebuggerOverlay. r=ochameau.
We're using the new `force` parameter for `insertAnonymousContent` to force creating a container
for the anonymous content, and we add a new option to the CanvasAnonymousHelper so highlighter
can choose to not wait for the dom to load.
For now we only use it for the paused debugger overlay as the other highlighters might need
an inspector front, which may require the dom to be ready.
We enable the assertions in  browser_dbg-paused-overlay-loading.js to check that the
highlighter is visible.
This required a few changes in the highlighter test actor.
First, it was waiting for an inspector front in its initialize method, which was
waiting indefinitely in our test as the document is paused. As this was only done
to retrieve the inspector actorID, we simply remove it and retrieve the actorID
through the connection and the target form when it's needed (for the eye dropper).
Secondly, the isPausedDebuggerOverlayVisible method was returning true even when
the highlighter wasn't displayed, so we check a few additional attributes.

Depends on D132034

Differential Revision: https://phabricator.services.mozilla.com/D132116
2021-12-01 08:11:23 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Sandor Molnar e8e67d3eb4 Backed out 2 changesets (bug 1741190, bug 1644983) for causing browser-chrome failures in browser_xpcom_graph_wait. CLOSED TREE
Backed out changeset ddf74f877a92 (bug 1644983)
Backed out changeset 817dd8236d41 (bug 1741190)
2021-12-01 08:34:10 +02:00
Narcis Beleuzu 4c87b2e488 Backed out 12 changesets (bug 1721217) for bc failures on browser_TopLevelNavigationDelegate.js
Backed out changeset 5fe3c617d521 (bug 1721217)
Backed out changeset c131e4a6d9d5 (bug 1721217)
Backed out changeset a59210a5b400 (bug 1721217)
Backed out changeset 74362b0c39c0 (bug 1721217)
Backed out changeset c8075b91d660 (bug 1721217)
Backed out changeset 46512deaf0e5 (bug 1721217)
Backed out changeset b38bc569d227 (bug 1721217)
Backed out changeset ee9bd012fda8 (bug 1721217)
Backed out changeset 7aa2726a0982 (bug 1721217)
Backed out changeset 885ced5f4bb4 (bug 1721217)
Backed out changeset 7d3f99ca3f44 (bug 1721217)
Backed out changeset 2f5a0164679a (bug 1721217)
2021-12-01 03:38:10 +02:00
Valentin Gosu 21d0427075 Bug 1644983 - Register CacheIOThread thread with profiler r=necko-reviewers,dragana
Depends on D132380

Differential Revision: https://phabricator.services.mozilla.com/D132381
2021-11-30 22:20:01 +00:00
Valentin Gosu dea27253e4 Bug 1741190 - Add a profiler preset for necko r=necko-reviewers,kpatenio,dragana,julienw
Differential Revision: https://phabricator.services.mozilla.com/D132380
2021-11-30 22:20:00 +00:00
Julian Descottes b993f77c16 Bug 1743617 - [devtools] Fix backward compat for getParentTarget with webextension targets in FF95 or older r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D132497
2021-11-30 17:28:22 +00:00
Anny Gakhokidze a2ec84dc5c Bug 1721217 - Part 5: Change the error code when we cancel loads due to another one starting, r=nika
This allows us to move away from using IsNavigating field in parent-controlled
paths.  Use a new distinct error code in cases when we cancel loads in
Canonical BC due to another load starting. This way, we know to not reset the
urlbar if we are doing another load.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1721217#c10 for longer
explanation of what is going on here.

Differential Revision: https://phabricator.services.mozilla.com/D126845
2021-11-30 16:31:36 +00:00
Emilio Cobos Álvarez 44e44eaf46 Bug 1743310 - Remove paint flashing support from DevTools. r=nchevobbe,devtools-backward-compat-reviewers
It doesn't do anything useful except on a niche WebRender fallback code-path,
so it's confusing.

Differential Revision: https://phabricator.services.mozilla.com/D132311
2021-11-30 11:46:07 +00:00
Butkovits Atila 724754167c Backed out 2 changesets (bug 1580394) for causing failures at browser_dbg-paused-overlay-loading.js. CLOSED TREE
Backed out changeset 6d96da07e581 (bug 1580394)
Backed out changeset db068d3108a2 (bug 1580394)
2021-11-30 12:44:44 +02:00
nchevobbe 3a85747d5c Bug 1580394 - [devtools] Don't wait for document to be ready to show PausesDebuggerOverlay. r=ochameau.
We're using the new `force` parameter for `insertAnonymousContent` to force creating a container
for the anonymous content, and we add a new option to the CanvasAnonymousHelper so highlighter
can choose to not wait for the dom to load.
For now we only use it for the paused debugger overlay as the other highlighters might need
an inspector front, which may require the dom to be ready.
We enable the assertions in  browser_dbg-paused-overlay-loading.js to check that the
highlighter is visible.
This required a few changes in the highlighter test actor.
First, it was waiting for an inspector front in its initialize method, which was
waiting indefinitely in our test as the document is paused. As this was only done
to retrieve the inspector actorID, we simply remove it and retrieve the actorID
through the connection and the target form when it's needed (for the eye dropper).
Secondly, the isPausedDebuggerOverlayVisible method was returning true even when
the highlighter wasn't displayed, so we check a few additional attributes.

Depends on D132034

Differential Revision: https://phabricator.services.mozilla.com/D132116
2021-11-30 09:33:20 +00:00
Andreea Pavel 9818dd6ab2 Bug 1726270 - update disabling condition to include linux debug r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D132305
2021-11-30 05:04:36 +00:00
Hubert Boma Manilla ab1612a464 Bug 1690450 - [devtools] Rename the getSourceId to getBlackboxRangeForSource r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D132138
2021-11-29 16:41:42 +00:00
Hubert Boma Manilla b61faccdb5 Bug 1690450 - [devtools] Add pref for blackboxing lines r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D132052
2021-11-29 16:41:42 +00:00
Hubert Boma Manilla 7d72a95487 Bug 1742829 - [devtools] Remove the original-blackbox feature flag r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D132050
2021-11-29 16:41:42 +00:00
Alexandre Poirot e3f02185b6 Bug 1709267 - [devtools] Add support for target switching in about:debugging. r=jdescottes
The challenges here are:
* xpcshell tests still don't support the watcher actor and server side targets. So we have to ensure still using client side target fetched via Descriptor.getTarget RDP request. (We still also need that for WebExtension)
* some tests weren't spawning the TargetCommand while querying TabDescriptor.getTarget. I tuned them to call TargetCommand.startListening so that we start instantiating server side targets, including the top level one retrieved via TabDescriptor.getTarget.

Otherwise, thanks to this patch a few check can now be moved from `if (isLocalTab)` to `if (isTabDescriptor)`.

Differential Revision: https://phabricator.services.mozilla.com/D130761
2021-11-26 16:36:33 +00:00
Alexandre Poirot 357e274350 Bug 1709267 - [devtools] Fix duplicated transports when detaching the top target. r=nchevobbe
We ended up having duplicated JSWindowActorTransport's when detaching the target.
This only reproduces in case of remote debugging, where we detach/destroy the top target
when closing the toolbox. And we later reuse the same DevToolsClient to spawn a new
WindowGlobalTargetActor, with a new Transport.
But as the old transport was still around, we ended up duplicating the packets.

In this patch, I'm also tuning WindowGlobalTargetActor.destroy to avoid crashing
if the target wasn't attached when we destroy it, and avoid trying to destroy
twice if destroy is reentrant.

Differential Revision: https://phabricator.services.mozilla.com/D131914
2021-11-26 16:36:33 +00:00
Alexandre Poirot b555d2142a Bug 1709267 - [devtools] Remove unused "target" query parameter from toolbox location. r=jdescottes
This wasn't used except for a test and wasn't working with server side targets.
Making this compatible with SST wasn't trivial, so I went for removing this.

Differential Revision: https://phabricator.services.mozilla.com/D130919
2021-11-26 16:36:32 +00:00
Narcis Beleuzu a322582a00 Backed out 11 changesets (bug 1721217) for bc failures on browser_scrollPositions.js . CLOSED TREE
Backed out changeset 750f4a84b30e (bug 1721217)
Backed out changeset c4eb4ad769ad (bug 1721217)
Backed out changeset 81af11d67439 (bug 1721217)
Backed out changeset 548f2441b7c6 (bug 1721217)
Backed out changeset cd584129321a (bug 1721217)
Backed out changeset f5f5291d1da8 (bug 1721217)
Backed out changeset 9ad66ceec1e2 (bug 1721217)
Backed out changeset 10b53a21bb23 (bug 1721217)
Backed out changeset 3755cfbe22fe (bug 1721217)
Backed out changeset 71436dc6c4c4 (bug 1721217)
Backed out changeset ecf33b73ae60 (bug 1721217)
2021-11-26 01:51:03 +02:00
Hubert Boma Manilla 5facb6d63a Bug 1737252 - [devtools] Escaping back tick signs r=nchevobbe
This patch escapes the back ticks properly. There may need to be further
thoughts on having seperate context menu items for powershell versus cmd.exe
enabling us to efficiently handles those differently.

Differential Revision: https://phabricator.services.mozilla.com/D131033
2021-11-25 21:54:15 +00:00
Emilio Cobos Alvarez efe2305b8d Bug 1742696 - Opt-in a bunch of about:pages to dark system colors / form controls. r=Gijs,preferences-reviewers,webcompat-reviewers,twisniewski
Privileged pages do this automatically via:

  https://searchfox.org/mozilla-central/rev/aa8c75b83f636948f708986173965c84cae8c25f/widget/nsXPLookAndFeel.cpp#1179-1183

So this makes everything more consistent. Known exceptions:

 * Pocket panels (as those don't seem to support dark mode)
 * about:reader (because it has its own dark mode handling)

Differential Revision: https://phabricator.services.mozilla.com/D132019
2021-11-25 21:24:43 +00:00
Anny Gakhokidze 5a620b3dd9 Bug 1721217 - Part 5: Change the error code when we cancel loads due to another one starting, r=nika
This allows us to move away from using IsNavigating field in parent-controlled
paths.  Use a new distinct error code in cases when we cancel loads in
Canonical BC due to another load starting. This way, we know to not reset the
urlbar if we are doing another load.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1721217#c10 for longer
explanation of what is going on here.

Differential Revision: https://phabricator.services.mozilla.com/D126845
2021-11-25 20:40:58 +00:00
Markus Stange 116861e876 WIP: Bug 1742855 - Update profiler-get-symbols wasm to d1500c1e935db352eeb97170459d16a20bcddf08. r=canaltinova
This version aligns the FileHandle API with the new IOUtils SyncReadFile API, which saves a few lines of code.
It also fixes a panic which could occur if symbolication tried to do a large out-of-bounds file read.
This bad read range was computed due to incorrect parsing of the macOS 12 dyld shared cache format.

Depends on D132076

Differential Revision: https://phabricator.services.mozilla.com/D132077
2021-11-25 15:54:55 +00:00
Markus Stange 3a8e5688df Bug 1742855 - Report errors from the symbolication worker even if they don't propagate to the main await call. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D132076
2021-11-25 15:54:55 +00:00
Nicolas Chevobbe 9cf2c0002f Bug 1741804 - [devtools] Fix getPropNamesFromObject + storage performance issues. r=jdescottes.
The function, which is only used from previewers.js to retrieve
the first then interesting properties of an object, has a special
case for (local|session)Storage so we loop through their entries
and not their properties.
We're using storage#key to achieve this, but the problem is that
the function is quite slow, and if the storage object has a lot
of entries, it can end up freezing Firefox.
In order to avoid such freeze, for storage object, we're not returning
an array but an iterable object, which most of the time will only be
called 10 times and prevent any perf issue.

Differential Revision: https://phabricator.services.mozilla.com/D131913
2021-11-25 15:03:19 +00:00
Claudia fad8547640 Bug 1731770 - [devtools] Persit expanded nodes state in the Response Panel. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D128190
2021-11-25 14:56:48 +00:00
Nicolas Chevobbe 3509ad57ad Bug 1605330 - [devtools] Enable context selector on Nightly. r=ochameau.
We take this opportunity to merge the browser toolbox and content toolbox preferences
into a single one.

Depends on D131600

Differential Revision: https://phabricator.services.mozilla.com/D131770
2021-11-25 13:05:39 +00:00
Nicolas Chevobbe 459fde3136 Bug 1742541 - [devtools] Don't try to show PausedDebuggerOverlay if document isn't ready. r=ochameau.
At the moment, the overlay can't be displayed if the DOM isn't loaded,
and we were waiting for that state before trying to show the overlay.
But we can't move forward in the document loading process until we resume,
which mean we could end up in weird state with the overlay, where the
page wasn't paused anymore, but we'd display it.
In this patch, we simply bail out if the document isn't ready.

Differential Revision: https://phabricator.services.mozilla.com/D131884
2021-11-25 06:24:12 +00:00
Cosmin Sabou f8f59c4e24 Backed out 2 changesets (bug 1742332, bug 1742541) for causing assertion failures on htmlparser/nsExpatDriver.cpp. CLOSED TREE
Backed out changeset 333fa37b4df2 (bug 1742332)
Backed out changeset 762649eb6709 (bug 1742541)
2021-11-25 11:26:14 +02:00
Christoph Kerschbaumer 4e687e9b41 Bug 1742786: Update test devtools/.../browser_resources_document_events.js to work with https-first enabled r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D132008
2021-11-25 07:23:18 +00:00
Nicolas Chevobbe 50f18c0c83 Bug 1742541 - [devtools] Don't try to show PausedDebuggerOverlay if document isn't ready. r=ochameau.
At the moment, the overlay can't be displayed if the DOM isn't loaded,
and we were waiting for that state before trying to show the overlay.
But we can't move forward in the document loading process until we resume,
which mean we could end up in weird state with the overlay, where the
page wasn't paused anymore, but we'd display it.
In this patch, we simply bail out if the document isn't ready.

Differential Revision: https://phabricator.services.mozilla.com/D131884
2021-11-25 06:24:12 +00:00
Julian Descottes 6cc1d8eb14 Bug 1590317 - [devtools] Fix keyboard navigation for about:profiling range inputs r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D131937
2021-11-24 13:50:52 +00:00
Cristian Tuns ac7a567f03 Backed out 4 changesets (bug 1741808, bug 1742541, bug 1605330, bug 1742332) for causing damp failures. CLOSED TREE
Backed out changeset fe65ddb40037 (bug 1605330)
Backed out changeset d5c4c10f70d9 (bug 1742332)
Backed out changeset 9f637151059d (bug 1741808)
Backed out changeset bd54eacb2d7c (bug 1742541)
2021-11-24 06:43:20 -05:00
Nicolas Chevobbe c0564bd019 Bug 1742392 - [devtools] Rename onBreakpointAvailable into onThreadStateAvailable. r=bomsy.
This better conveys what the function really does.

Differential Revision: https://phabricator.services.mozilla.com/D131792
2021-11-24 10:23:54 +00:00
Nicolas Chevobbe 59b28c6aa5 Bug 1605330 - [devtools] Enable context selector on Nightly. r=ochameau.
We take this opportunity to merge the browser toolbox and content toolbox preferences
into a single one.

Depends on D131600

Differential Revision: https://phabricator.services.mozilla.com/D131770
2021-11-23 18:56:55 +00:00
Nicolas Chevobbe a0e98abae5 Bug 1742541 - [devtools] Don't try to show PausedDebuggerOverlay if document isn't ready. r=ochameau.
At the moment, the overlay can't be displayed if the DOM isn't loaded,
and we were waiting for that state before trying to show the overlay.
But we can't move forward in the document loading process until we resume,
which mean we could end up in weird state with the overlay, where the
page wasn't paused anymore, but we'd display it.
In this patch, we simply bail out if the document isn't ready.

Differential Revision: https://phabricator.services.mozilla.com/D131884
2021-11-23 18:56:54 +00:00
Nicolas Chevobbe 72a01fca06 Bug 1741811 - [devtools] Make watchTargets take a single object param. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D131755
2021-11-23 13:23:35 +00:00
Narcis Beleuzu 81698c54eb Backed out changeset 9dfd5e6601a1 (bug 1505304) as requested by nchevobbe 2021-11-23 14:56:24 +02:00
Nicolas Chevobbe 5d77281fc2 Bug 1505304 - [devtools] Make watchTargets take a single object param. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D131755
2021-11-23 12:39:19 +00:00
Julian Descottes d86a582b80 Bug 1741797 - [devtools] Fix colorpicker click listener signature r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D131602
2021-11-23 11:50:47 +00:00
Sandor Molnar e524498137 Backed out 2 changesets (bug 1709267) for causing dt failures in browser_about-devtools-toolbox_reload. CLOSED TREE
Backed out changeset da9d3297348d (bug 1709267)
Backed out changeset ec5eb72262cc (bug 1709267)
2021-11-22 22:17:35 +02:00
Alexandre Poirot 8f7f5f4ad4 Bug 1709267 - [devtools] Add support for target switching in about:debugging. r=jdescottes
The challenges here are:
* xpcshell tests still don't support the watcher actor and server side targets. So we have to ensure still using client side target fetched via Descriptor.getTarget RDP request. (We still also need that for WebExtension)
* some tests weren't spawning the TargetCommand while querying TabDescriptor.getTarget. I tuned them to call TargetCommand.startListening so that we start instantiating server side targets, including the top level one retrieved via TabDescriptor.getTarget.

Otherwise, thanks to this patch a few check can now be moved from `if (isLocalTab)` to `if (isTabDescriptor)`.

Differential Revision: https://phabricator.services.mozilla.com/D130761
2021-11-22 18:57:32 +00:00
Alexandre Poirot 32ab65debf Bug 1709267 - [devtools] Remove unused "target" query parameter from toolbox location. r=jdescottes
This wasn't used except for a test and wasn't working with server side targets.
Making this compatible with SST wasn't trivial, so I went for removing this.

Differential Revision: https://phabricator.services.mozilla.com/D130919
2021-11-22 18:57:32 +00:00
Alexandre Poirot 003720c295 Bug 1741669 - [devtools] Implement a faster TargetCommand.getParentTarget. r=nchevobbe
The original intent was to do a synchronous implementation,
but this is hard to do while keeping backward compat.

Differential Revision: https://phabricator.services.mozilla.com/D131398
2021-11-22 18:55:55 +00:00
Alexandre Poirot ce06e78015 Bug 1741652 - [devtools] Expose `commands` to all protocol.js fronts. r=nchevobbe
This help any front to interact with commands, which is frequently useful.
In the long run, all fronts should be slowly converted to become commands.

Differential Revision: https://phabricator.services.mozilla.com/D131397
2021-11-22 18:55:55 +00:00
Nicolas Chevobbe 7333db7444 Bug 1742107 - [devtools] Don't ignore same-origin iframe in EventLoop#getAllDebuggees. r=bomsy.
This was causing some issues with PausedDebuggerOverlay with EFT:
As we weren't returning the window to preEnter, we weren't calling
suppressEventHandling on it, which in the end made the call we
have in the overlay to setSuppressedEventListener inoperant.
This wasn't caught by the browser_dbg-paused-overlay-iframe.js test
we have as the method we use to simulate clicking on the button
(highlighterTestFront.clickPausedDebuggerOverlayButton), ends ups calling
the handleEvent method of the highlighter actor directly, bypassing the
regular flow of events in a paused page.

Differential Revision: https://phabricator.services.mozilla.com/D131654
2021-11-22 13:38:44 +00:00
Nicolas Chevobbe afe2a8de21 Bug 1742329 - [devtools] Fix server chrome inspector test when EFT is enabled. r=ochameau.
We were always using the top level walker front, but as some tests are using iframes,
we need to use the node fronts dedicated walker front instead.
test_inspector-dead-nodes.html is purely skipped when EFT is enabled as it triggers
failures more frequently and it doesn't make much sense anyway (this test will be
migrated to a command test when we move walkerFront#children to a command).

Differential Revision: https://phabricator.services.mozilla.com/D131599
2021-11-22 13:38:44 +00:00
Nicolas Chevobbe 4ae1a542f9 Bug 1742331 - [devtools] Fix more frequent failures on browser_dbg-event-breakpoints-fission.js when EFT is enabled. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D131598
2021-11-22 13:38:43 +00:00
Nicolas Chevobbe 7239e0e622 Bug 1742330 - [devtools] Make browser_resources_document_events.js handle EFT. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D131476
2021-11-22 13:38:43 +00:00
Andreea Pavel 93376ab546 Bug 1717330 - disable browser_touch_event_iframes.js for frequent failures r?#intermittent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D131574
2021-11-19 02:14:06 +00:00
Nazım Can Altınova fea7d30107 Bug 1741716 - Change the preset to Firefox when profiler popup is activated through web channel r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D131436
2021-11-19 13:49:35 +00:00
Ting-Yu Lin 5d4998ecf4 Bug 1741774 - Support scrollbar-gutter in the style system. r=emilio
This patch adds `scrollbar-gutter` property in CSS Overflow level 3 [1] to the
style system.

`devtools/shared/css/generated/properties-db.js` is generated by
`./mach devtools-css-db`.

[1] https://drafts.csswg.org/css-overflow-3/#scrollbar-gutter-property

Differential Revision: https://phabricator.services.mozilla.com/D131460
2021-11-19 01:48:07 +00:00
Alexandre Poirot c920bd8a93 Bug 1737194 - [devtools] Strengthen browser_target_command_various_descriptors.js. r=jdescottes
Fix two possible race conditions:
* short lived processes spawn by the test ends up breaking listAllWorkers where the listWorker request
  made against a content process target is throwing because its DevToolsServerConnection is closed.
* the worker created by the test may actually still be visible to WorkerDebuggerManager,
  so use a better technique to catch the WorkerDebugger's id.

Differential Revision: https://phabricator.services.mozilla.com/D131442
2021-11-18 21:43:20 +00:00
Eemeli Aro 453a3f26f0 Bug 1733496 - Migrate key-shortcuts.properties to Fluent. r=jdescottes,fluent-reviewers
This adds `Localization` to `builtin-modules.js` to make it accessible from
`definitions.js`. It's likely that the abstractions used in `definitions.js`
will need to be revisited when `startup.properties` is also migrated to Fluent.

Differential Revision: https://phabricator.services.mozilla.com/D131219
2021-11-18 16:40:03 +00:00
Nicolas Chevobbe b3f55dd1b1 Bug 1741808 - [devtools] Fix increased failures on browser_toolbox_backward_forward_navigation.js when EFT is enabled. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D131475
2021-11-18 13:22:35 +00:00
Nicolas Chevobbe 11bef8cace Bug 1741803 - [devtools] Fix browser_inspector_iframe-picker-bfcache-navigation with EFT. r=ochameau.
This required 2 changes:
- fixing WatcherActor notifyTargetAvailable so we get notified about the iframe
  target when doing a bfcache navigation (a test case is added in browser_target_command_bfcache.js as well)
- Checking is the target isn't destroyed in inspector onTargetSelected

Differential Revision: https://phabricator.services.mozilla.com/D131471
2021-11-18 13:22:35 +00:00
Nicolas Chevobbe 149cd3677e Bug 1740453 - [devtools] Handle onTargetSelected in accessibility panel. r=ochameau.
A couple tests are added to check that the panel works fine when using the iframe picker.

Differential Revision: https://phabricator.services.mozilla.com/D130611
2021-11-18 13:22:34 +00:00
Raphael Ferrand 702f0ad086 Bug 1498224 - [devtools] Apply new classnames as you type in the .cls section of the rule-view r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D129515
2021-11-18 12:52:22 +00:00