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

24316 Коммитов

Автор SHA1 Сообщение Дата
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