Commit Graph

26351 Commits

Author SHA1 Message Date
Julian Descottes
4bbf1c5698 Bug 1815460 - [devtools] Merge addRequestPostData, addResponseHeaders, addResponseCookies into addResponseStart r=webdriver-reviewers,ochameau,bomsy,devtools-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D168538
2023-03-25 20:29:59 +00:00
Csoregi Natalia
a04681d292 Backed out 2 changesets (bug 1815460) for causing netmonitor devtools failures. CLOSED TREE
Backed out changeset 14ac0e2bcccb (bug 1815460)
Backed out changeset 7765cf9b63f5 (bug 1815460)
2023-03-24 22:20:30 +02:00
Julian Descottes
cbe400b445 Bug 1815460 - [devtools] Merge addRequestPostData, addResponseHeaders, addResponseCookies into addResponseStart r=webdriver-reviewers,ochameau,bomsy,devtools-reviewers,whimboo
Depends on D169361

Differential Revision: https://phabricator.services.mozilla.com/D168538
2023-03-24 16:14:44 +00:00
Julian Descottes
dfc32d27f7 Bug 1815460 - [devtools] Netmonitor waterfall sort should fallback to resource ids r=ochameau,bomsy,devtools-reviewers
resource ids are channel ids and should be incrementally generated. The current id is actually an actor id, meaning it is a string which will lead to incorrect comparisons (eg "Actor10" will be considered "lower" than "Actor2") and also fully depends on the order in which we create the actors.

On some platform / configurations we get identical timestamps for batches of requests, so the fallback mechanism should be reliable

Differential Revision: https://phabricator.services.mozilla.com/D169361
2023-03-24 16:14:43 +00:00
zacnomore
fafcedc6b0 Bug 1815557 - Improve space usage by pseudo class toggles r=nchevobbe,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D169574
2023-03-24 12:56:11 +00:00
William Durand
475d4dd995 Bug 1823457 - Expose uninstallAddon method on addons actor. r=jdescottes,devtools-backward-compat-reviewers,devtools-reviewers
Depends on D173053

Differential Revision: https://phabricator.services.mozilla.com/D173126
2023-03-23 11:43:13 +00:00
Yulia
b7353a6c87 Bug 1822937 - Add devtools test to ensure we are no longer crashing; r=ochameau,devtools-reviewers
The test times out when it is unsuccessful.

Differential Revision: https://phabricator.services.mozilla.com/D173277
2023-03-23 10:15:09 +00:00
Nicolas Chevobbe
65efa92222 Bug 1010150 - [devtools] Allow to pretty-print inline scripts. r=devtools-reviewers,ochameau.
To do this, we need to only have a single SourceMapGenerator instance for all
the inline scripts of an HTML file, for which we add mappings with offsets based
on where the inline script is in the HTML file.

To support that, we add a new prettyPrintInlineScript task, which takes a taskId
so we can have one SourceMapGenerator for a given taskId, that we then pass
to prettyFast.

A test is added to ensure different cases of inline scripts are pretty printed
as expected, that resulting console messages location are updated and that the
event tooltip in the inspector shows the pretty file as well.

`findColumnBreakpoint` helper was fixed to look into the correct location for
original file (which pretty-printed file are)
`assertLineIsBreakable` is modified to show the text of the line so it's easier
to debug failures.

Differential Revision: https://phabricator.services.mozilla.com/D170751
2023-03-22 22:02:10 +00:00
scar
4cf815ba6a Bug 1589474 The new performance panel icon in devtools should be highlighted in green when the profiler is running r=julienw
Added the ToolboxHighlightController.js to Highlight the Performance Tab in Devtools when when the Profiler is on.

Differential Revision: https://phabricator.services.mozilla.com/D172699
2023-03-22 17:17:49 +00:00
Nicolas Chevobbe
d3637730d2 Bug 1823616 - [devtools] release tasks cycle 113 - Remove backward compatibility code. r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D173121
2023-03-22 14:50:22 +00:00
William Durand
86932ac9d6 Bug 1823456 - Enable additional devtools actions for temporarily loaded extensions for Android. r=rpl,jdescottes,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D173053
2023-03-22 13:42:30 +00:00
Nicolas Chevobbe
babc10bc6c Bug 1815937 - [devtools] Remove inline script displacement handling in source actor. r=devtools-reviewers,ochameau.
This is all made unnecessary by the previous patch of the stack.

Differential Revision: https://phabricator.services.mozilla.com/D170581
2023-03-21 17:27:50 +00:00
Nicolas Chevobbe
1de610bd27 Bug 1823399 - [devtools] Pass startColumn to createSource. r=devtools-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D173060
2023-03-21 17:27:50 +00:00
Nicolas Chevobbe
a1645740cc Bug 1815937 - Set ScriptLoadContext column number for inline scripts. r=smaug,devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D170580
2023-03-21 17:27:48 +00:00
Julien Wajsberg
969e510983 Bug 1767774 - Remove a setTimeout in the profiler tests r=canaltinova
I spotted this setTimeout call while reviewing another patch, and
thought that it might be the cause for some of our intermittents.
It looks like that for some years now, we have this handy
waitForTabClosing function, that we can use instead.

Differential Revision: https://phabricator.services.mozilla.com/D173024
2023-03-21 12:16:49 +00:00
Marian-Vasile Laza
1c28d89a7e Backed out 3 changesets (bug 1823335, bug 1815937, bug 1823399) for devtools failures on browser_dbg-features-breakable-positions.js. CLOSED TREE
Backed out changeset f931921c97f2 (bug 1823399)
Backed out changeset 077d67ccc0d5 (bug 1823335)
Backed out changeset 103bf8d93883 (bug 1815937)
2023-03-21 00:01:11 +02:00
Nicolas Chevobbe
4aa1bc2655 Bug 1815937 - Set ScriptLoadContext column number for inline scripts. r=smaug,devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D170580
2023-03-20 19:25:19 +00:00
Nicolas Chevobbe
56579ac82d Bug 1822568 - [devtools] Fix browser_dbg-pretty-print-breakpoints-columns.js intermittent. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D172980
2023-03-20 10:02:50 +00:00
Alexandre Poirot
4c17964101 Bug 1822488 - [devtools] Display stacks when logging Component.Exception objects. r=devtools-reviewers,nchevobbe
We are current displaying stacks for Error but not for Component.Exception objects.

Differential Revision: https://phabricator.services.mozilla.com/D172708
2023-03-20 08:55:28 +00:00
Alexandre Poirot
9828f2bd31 Bug 1822488 - [devtools] Display stacktraces for DOMException's. r=devtools-reviewers,nchevobbe
We are currently showing stacks for Error-like objects but not for DOMExceptions.
console.log("foo", new Error("bar")) would print bar's stacktraces, while we wouldn't for: console.log("foo", new DOMException("bar")).

Should we merge DOMException and Error previewers?
DOMException is only having code and result attributes which Error objects don't have.

Differential Revision: https://phabricator.services.mozilla.com/D172707
2023-03-20 08:55:28 +00:00
Hubert Boma Manilla
9e2dc86bbd Bug 1818962 - [devtools] Refactor search modifiers actions and reducers r=ochameau,devtools-reviewers
This patch makes the SearchInput a connected component, This allows us cleanup
all the seperate actions and reducer logic and makes it easier to add new SearchInput
with modifers functionality.

Differential Revision: https://phabricator.services.mozilla.com/D171034
2023-03-18 18:59:47 +00:00
Hubert Boma Manilla
56f88f9ab8 Bug 1820200 - [devtools] Fix and enable browser_resources_network_events.js test r=jdescottes,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172581
2023-03-18 12:47:24 +00:00
Hubert Boma Manilla
bbb52ed0bc Bug 1818806 [devtools] Local overrides feature in the debugger r=ochameau,devtools-backward-compat-reviewers,devtools-reviewers
Highlights for this patch
- Support for the script overrides feature
- Overrides for html files are not supported
- Add styling to indicate overrides
- Add mochitests

Depends on D163600

Differential Revision: https://phabricator.services.mozilla.com/D163610
2023-03-17 14:18:29 +00:00
Cristina Horotan
588b393945 Backed out 2 changesets (bug 1815937) for causing wpt failures at blockeduri-inline.html CLOSED TREE
Backed out changeset 668971329051 (bug 1815937)
Backed out changeset a4a3430c9bab (bug 1815937)
2023-03-17 15:52:33 +02:00
Nicolas Chevobbe
bf793882d2 Bug 1815937 - [devtools] Remove inline script displacement handling in source actor. r=devtools-reviewers,ochameau.
This is all made unnecessary by the previous patch of the stack.

Differential Revision: https://phabricator.services.mozilla.com/D170581
2023-03-17 08:03:08 +00:00
Nicolas Chevobbe
c0be3c7697 Bug 1815937 - Set ScriptLoadContext column number for inline scripts. r=smaug,devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D170580
2023-03-17 08:03:07 +00:00
Ekene Nwobodo
a99307f0ff Bug 1822221 - Convert browser/actors/LinkHandler* JSMs to ESMs. r=kpatenio,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172542
2023-03-17 07:46:57 +00:00
Alexandre Poirot
c15c4eaf8e Bug 1820806 - [devtools] Stop cloning the Map of all the sources. r=devtools-reviewers,bomsy
Now that this Map is only used internaly to sources reducer and selectors
and that we never return its raw reference, we can make it mutable.

Differential Revision: https://phabricator.services.mozilla.com/D172176
2023-03-16 14:12:42 +00:00
Alexandre Poirot
dab646289a Bug 1820806 - [devtools] Stop exporting the sources Map. r=devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D172175
2023-03-16 14:12:42 +00:00
Alexandre Poirot
ddd57b743e Bug 1820805 - [devtools] Store source and source actor objects in tab objects. r=devtools-reviewers,bomsy
As these objects are immutable, we can store them in tabs reducer instead
of doing many lookup based on the IDs.

This should ultimately help make the sources Map become mutable.

Differential Revision: https://phabricator.services.mozilla.com/D172174
2023-03-16 14:12:41 +00:00
Alexandre Poirot
5605cec073 Bug 1818496 - [devtools] Stop using sources reducer's internal Map to map location sourceId to source objects. r=devtools-reviewers,bomsy
This should help speed up a few critical selectors by no longer running them
anytime any source is being added/removed. In addition to removing now useless lookups in this map.

breakpointsSources could be simplified as we never had to sort the visible breakpoints as
we end up sorting by source filename.

Differential Revision: https://phabricator.services.mozilla.com/D172151
2023-03-16 14:12:41 +00:00
Julian Descottes
ab3931ad56 Bug 1806794 - Support "network.response" events for cached responses r=webdriver-reviewers,whimboo,devtools-reviewers,ochameau
This fixes two issues:
- the transferred size was missing from cached responseStarted events
- the fromCache flag needs to be read on the initial network event payload from devtools, because relying on the isFromCache logic used to build the addResponseStart payload does not properly detect all cached responses (eg for a cached 301)

Differential Revision: https://phabricator.services.mozilla.com/D171508
2023-03-16 14:01:03 +00:00
Tiaan Louw
1da980f4b4 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-16 11:50:55 +00:00
Hubert Boma Manilla
2ec220219a Bug 1818981 - [devtools] Wait a little longer for the browser_dbg-project-search.js test r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D172647
2023-03-16 08:47:15 +00:00
Emilio Cobos Álvarez
9900adffa0 Bug 1822578 - Make flex="1" on XUL set a zero flex basis like the flex shorthand does. r=Gijs,mconley,settings-reviewers,desktop-theme-reviewers,dao
In a setup with:

<hbox>
 <something flex="1"/>
 <something-else/>
</hbox>

Before bug 1822131 <something flex="1"> ended up with flex-basis: auto,
but was the only thing able to shrink, so <something-else> stayed the
same size.

After that bug however <something-else> is able to shrink too, so both
elements shrink. This wouldn't happen if flex="1" actually worked like
flex: 1 does.

However flex: 1 causes stuff like explicit main sizes to be
(effectively) ignored, so we need to fix up a few cases where now we'd
start flexing too much. For that, add a debug assert to
nsFlexContainerFrame to catch the would-be behavior changes here.

For the most part they're actually no-op since they're setting tiny
sizes, but preferences and devtools needed a couple real fixes.

The profile selection spacer is useless (zero-size).

Hopefully the last xul.css change I need to do :')

Differential Revision: https://phabricator.services.mozilla.com/D172704
2023-03-16 00:06:29 +00:00
Marian-Vasile Laza
b1bb1b3c9b Backed out changeset 160ac6b5f726 (bug 1813481) for assertion failure on nsCSSRenderingGradients.cpp. 2023-03-16 01:50:39 +02:00
Tiaan Louw
a7a28cf7a6 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-15 21:10:43 +00:00
Nika Layzell
e61507c3a3 Bug 1818305 - Part 1: Add a streamStatus method to nsIOutputStream, r=necko-reviewers,geckoview-reviewers,jesup,emilio,m_kato,devtools-reviewers
This new method can be used to check if the nsIOutputStream has been
closed without having data available to write. It should avoid blocking
to discover this information.

Differential Revision: https://phabricator.services.mozilla.com/D170696
2023-03-15 19:52:33 +00:00
Nazım Can Altınova
6d6cf5839a Bug 1776694 - Use the shared libraries that's provided by getProfileDataAsGzippedArrayBuffer r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D172556
2023-03-15 18:19:32 +00:00
Nazım Can Altınova
5d4ab6bd13 Bug 1776694 - Return profile with additional info from GetProfileDataAsGzippedArrayBuffer r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D172555
2023-03-15 18:19:31 +00:00
Butkovits Atila
45514b96bb Backed out changeset deabee2364d4 (bug 1813481) for causing assertion failures at gfxUtils.cpp. CLOSED TREE 2023-03-15 19:21:19 +02:00
Francesco Lodolo (:flod)
962126e608 Bug 1822388 - Move brandings.ftl from browser to toolkit, r=eemeli,settings-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sgalich,Mardak
Differential Revision: https://phabricator.services.mozilla.com/D172643
2023-03-15 17:00:48 +00:00
Tiaan Louw
29eaf0b759 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-15 16:25:00 +00:00
Alexandre Poirot
8ae10544b1 Bug 1818495 - [devtools] Use location source and sourceActor attribute instead of re-querying the selectors. r=bomsy,devtools-reviewers
This may keep running async code whose source have been removed,
but this help remove various selectors lookups.

If we expect to check in async code if the source is still registered,
we should probably have an explicit API for this.

Differential Revision: https://phabricator.services.mozilla.com/D169331
2023-03-15 13:48:32 +00:00
Alexandre Poirot
d66f5cba8d Bug 1815500 - [devtools] Migrate location to convey source and sourceActor objects. r=bomsy,perftest-reviewers,devtools-reviewers,kshampur
Doing adds some complexity around SourceMapLoader as the location
genereated by this components doesn't known about debugger source objects.
To mitigate this I migrated all usages of SourceMapLoader.getGeneratedLocation/getOriginalLocation
to the source-maps utils module which will handle retrieving debugger objects.

Otherwise this patch will allow drastic simplification in the overall codebase
as we were mapping location's sourceId to source objects in lots of places.
This should also help followup on even more simplification in selectors.

Differential Revision: https://phabricator.services.mozilla.com/D168429
2023-03-15 13:48:32 +00:00
Alexandre Poirot
af72caf60d Bug 1815500 - [devtools] Ensure using createLocation in all places where we create a location. r=bomsy,perftest-reviewers,devtools-reviewers,AlexandruIonescu
We were missing a few places around SourceMapLoader which creates location objects
without using debugger's createLocation helper. This doesn't help ensure all location are the same.

This will later be useful to assert that all location have source/sourceActor attributes.

Differential Revision: https://phabricator.services.mozilla.com/D170668
2023-03-15 13:48:31 +00:00
Alexandre Poirot
13a1dc1ac4 Bug 1815500 - [devtools] Migrate selectSource action to receive source and sourceActor objects. r=bomsy,devtools-reviewers
This will help then craft a location with `source` and `sourceActor` objects from selectSource.

I migrated the unique usage of this method passing a location to selectSpecificLocation
as selectSource is mostly meant to avoid having to think about/create a location object.

Differential Revision: https://phabricator.services.mozilla.com/D169330
2023-03-15 13:48:31 +00:00
Nicolas Chevobbe
93c489829c Bug 1557196 - [devtools] Don't buffer lines in pretty-fast. r=ochameau,devtools-reviewers.
This allows us to get accurate mappings for columns as well, which is
required for column breakpoints to work.

To mitigate the performance regression we'd get from adding many more mappings,
instead of using a SourceNode, then adding children to it, and at the end add
all the mapping in a SourceMapGenerator, we directly use the SourceMapGenerator
in the `write` function.
This means that we need to compute the pretty-printed code ourselves, but it's
easy to borrow the logic in `toStringWithSourceMap`.
We also only add mappings in the SourceMapGenerator for tokens (and not for
whitespaces), as it reduces the amount of elements we have to go through, while
still producing a valid source map in the end.
By doing that, we can also invert the mapping directly in `write`, so we don't
have to do it later in the worker code, and avoid having to re-sort the mappings
array.

A test is added to ensure column breakpoints work as expected after pretty-printing

Differential Revision: https://phabricator.services.mozilla.com/D168383
2023-03-15 08:53:19 +00:00
Daniel Holbert
3c6e908a35 Bug 1820058: Enable about:config pref for CSS 'content-visibility' on Nightly. r=emilio,devtools-reviewers
Also update the devtools CSS db (using ./mach devtools-css-db), and update a
DOM test `test_interfaces.js` to make it aware of newly-exposed (and
Nightly-specific for now) ContentVisibilityAutoStateChangeEvent.

Differential Revision: https://phabricator.services.mozilla.com/D171514
2023-03-14 19:55:30 +00:00
Alexandre Poirot
5cb1635d84 Bug 1803616 - [devtools] Implement a Javascript Tracer in the debugger. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
On the server side, this patch introduces:
* a new "tracer" Target Scope actor to start and stop tracing per target
* a new TRACING_STATE resource in order to report to the client when we start/stop tracing and with which log method.

On the frontend side, this patch introduces:
* a global tracer button, which will enable/disable tracing for all targets/threads
  all at once.
* a global header, similar to pause, reporting if any target is tracing or not.
The header reuses the pause header and we may want to followup to better coordinate case
where we pause and trace at the same time. Only one of the two states is displayed.

We may want to followup here to be able to trace only one target and see the state per target.

Differential Revision: https://phabricator.services.mozilla.com/D163614
2023-03-14 17:17:05 +00:00