Commit Graph

24813 Commits

Author SHA1 Message Date
Nicolas Chevobbe
9076b5fa2f Bug 1765748 - [devtools] Remove unncessary complex SplitView#setItemClassName. r=jdescottes.
The function was setting extra classes on both
the summary and the detail, running extra checks
to not remove the base classes.
It's only called from one place, and we only care
about adding classes to the summary element, which
we have access to directly.
We're switching to classList.(add|remove) , which
allows us to get rid of the SplitView method.

Differential Revision: https://phabricator.services.mozilla.com/D144427
2022-04-22 13:56:02 +00:00
Nicolas Chevobbe
8578d2224f Bug 1765748 - [devtools] Remove SplitView active summary getter and rename setter. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D144302
2022-04-22 13:56:01 +00:00
Nicolas Chevobbe
d24de6a1bc Bug 1765748 - [devtools] Merge SplitView appendTemplateItem and appendItem. r=ochameau.
The template nodes are retrieved and cached from the constructor so we don't have
to do it for every item we add.

Differential Revision: https://phabricator.services.mozilla.com/D144269
2022-04-22 13:56:01 +00:00
Nicolas Chevobbe
947e5c6c8f Bug 1765748 - [devtools] Simplify SplitView#appendItem onShow option. r=ochameau.
Only the detail element was needed in the callback, so we remove all the other
unnecessary parameters.
This allows us to also remove the `data` option.

Differential Revision: https://phabricator.services.mozilla.com/D144268
2022-04-22 13:56:01 +00:00
Nicolas Chevobbe
6a68e17557 Bug 1765748 - [devtools] Remove SplitView#appendItem onCreate option. r=ochameau.
Since there's nothing asynchronous happening before the item gets added to the
list, the consumer can directly use the properties of the object returned by
'appendTemplatedItem'.

Differential Revision: https://phabricator.services.mozilla.com/D144267
2022-04-22 13:56:00 +00:00
Nicolas Chevobbe
703a40f1c8 Bug 1765748 - [devtools] Remove unused SplitView#appendItem options. r=ochameau.
`onHide` and `onDestroy` aren't declared from the callsite, we can remove them.

Differential Revision: https://phabricator.services.mozilla.com/D144266
2022-04-22 13:56:00 +00:00
Nicolas Chevobbe
d0b5f00199 Bug 1765748 - [devtools] Turn SplitView.getSummaryElementByOrdinal into a private method. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D144265
2022-04-22 13:56:00 +00:00
Nicolas Chevobbe
bd68cc6c18 Bug 1765748 - [devtools] Remove unused SplitView#isLandscape . r=ochameau.
This allows us to remove the `_mql` property as well as the `LANDSCAPE_MEDIA_QUERY`
const.

Differential Revision: https://phabricator.services.mozilla.com/D144264
2022-04-22 13:55:59 +00:00
Nicolas Chevobbe
54dc8da65c Bug 1765748 - [devtools] Remove unused SplitView#activeDetails. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D144263
2022-04-22 13:55:59 +00:00
Alexandre Poirot
cec4e30a40 Bug 1759818 - [devtools] Ensure creating one source per URL, even for iframe targets. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D141225
2022-04-22 11:40:32 +00:00
Alexandre Poirot
65fb779c6d Bug 1759818 - [devtools] Assert the breakable lines for iframe html pages. r=bomsy
While adding this new html page for breakable lines,
I revisit how we load same-url.sjs and use this iframe document instead.
This feel more natural than dynamically injecting a document-builder iframe.

Also I promote breakable lines and positions tests to become features tests.

And it looks like adding the iframe target slow things down for the quick open.
So I tuned the related assertion to avoid intermittents.

Last but not least, this patch highlights two limitations for iframe html debugging:
* only the first inline script is "breakable" (others are ignored)
* on reload, no content is displayed at all (this is new to me)

Differential Revision: https://phabricator.services.mozilla.com/D143989
2022-04-22 11:40:32 +00:00
Mark Banner
7a084ed84c Bug 1725952 - Upgrade ESLint to v8.x. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D144002
2022-04-22 11:23:30 +00:00
Julian Descottes
dfb8d25b1d Bug 1750446 - [devtools] Wait for the proper mutation in browser_rules_custom.js r=nchevobbe
We usually need three mutations to reach the final state of addProperty and usually the 2nd and 3rd come in the same batch.
Meaning that simply waiting for receivedMutations >= 2 works in most cases.

But the intermittent screenshots show that the markup view was not updated yet with the correct content meaning it either didn't receive or processed the last
mutation.
Let's try to wait for the proper mutation instead of using an arbitrary number. Hopefully this fixes it.

Differential Revision: https://phabricator.services.mozilla.com/D144181
2022-04-22 08:17:02 +00:00
Feng Yu
a8a85d4031 Bug 1554914 Simplify devtools/server/actors/object.js and remove eslint-disable complexity r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D143834
2022-04-22 04:47:27 +00:00
Boris Chiou
b34f4349a7 Bug 1737918 - Part 1: Add scroll() to animation-timeline for style system. r=emilio
scroll() is defined in the spec proposal, and there is a temporary spec:
https://drafts.csswg.org/scroll-animations-1/rewrite#scroll-notation.

The spec is still under development, so we don't drop the orignal
scroll-timeline at rule. Instead, we add a new scroll() notation to
animation-timeline, and support both syntax for now.

Differential Revision: https://phabricator.services.mozilla.com/D143417
2022-04-21 17:05:17 +00:00
Nicolas Chevobbe
1ac5da6a36 Bug 1764690 - [devtools] Check data-l10n-args attribute value instead of context menu label in storage tests. r=bomsy.
These tests are failing intermittently as, I think, the label gets localized
asynchronously.
So instead of checking the computed translated string, we only check that the
attribute for the item name is properly set.

Differential Revision: https://phabricator.services.mozilla.com/D144163
2022-04-21 13:08:56 +00:00
Alexandre Poirot
9aec23c0fe Bug 1594639 - [devtools] Ensure reusing browser toolbox custom binary path on reload. r=nchevobbe
I tried various approaches around the session restore, but this isn't reliable.
Using an environment variable is much easier and also help making the path global
for the whole instance in case we close and reopen it.

Differential Revision: https://phabricator.services.mozilla.com/D143695
2022-04-21 12:14:39 +00:00
Alexandre Poirot
96e520678a Bug 1594639 - [devtools] Pass option dictionary to BrowserToolboxLauncher.init. r=nchevobbe
This will be slightly easier to understand which argument we pass.

Differential Revision: https://phabricator.services.mozilla.com/D143694
2022-04-21 12:14:39 +00:00
Alexandre Poirot
6da1ebe13b Bug 1763576 - [devtools] Remove unnecessary await on synchronous dispatches. r=bomsy
When dispatching a JS Object, this won't be dispatching an async action.
Dropping the await will better highlight the synchronous dispatch calls.
Note that when we do
```
dispatch({
  [PROMISE]: ...,
  ...
});
```
The promise middleware kicks in and the action becomes async.
So await is still relevant in front of these dispatches.

Differential Revision: https://phabricator.services.mozilla.com/D143143
2022-04-21 11:22:33 +00:00
Alexandre Poirot
06e8487045 Bug 1763576 - [devtools] Document source selection in debugger frontend. r=bomsy
I especially highlight the special behavior where the frontend tries
to keep selecting original source if we were already selecting an original source
and do the same when we were on a generated source.

Differential Revision: https://phabricator.services.mozilla.com/D143142
2022-04-21 11:22:33 +00:00
Alexandre Poirot
4f3e79a5fa Bug 1763576 - [devtools] Document stackframe management in debugger frontend. r=bomsy
When selecting another thread/target, we shouldn't need to re-fetch frames/scopes.
This should always be done when paused() action is fired and data be stored and kept in the reducer.
But... this happen to be cancelled in middle of the processing when two thread pause concurrently.
This is experience by browser_dbg-windowless-workers.js.

Differential Revision: https://phabricator.services.mozilla.com/D143141
2022-04-21 11:22:33 +00:00
Yulia Startsev
9638d35729 Bug 1763586 - remove debugger tests for source element behavior; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D143698
2022-04-21 09:53:34 +00:00
Noemi Erli
560b5ccdb5 Backed out 4 changesets (bug 1737918) for causing bustages in ScrollTimeline.cpp CLOSED TREE
Backed out changeset cecdd071c1aa (bug 1737918)
Backed out changeset fcc5ecd364e4 (bug 1737918)
Backed out changeset f7bf3143e4a7 (bug 1737918)
Backed out changeset a143d2e54fb9 (bug 1737918)
2022-04-21 01:21:14 +03:00
Boris Chiou
e8ad45ee42 Bug 1737918 - Part 1: Add scroll() to animation-timeline for style system. r=emilio
scroll() is defined in the spec proposal, and there is a temporary spec:
https://drafts.csswg.org/scroll-animations-1/rewrite#scroll-notation.

The spec is still under development, so we don't drop the orignal
scroll-timeline at rule. Instead, we add a new scroll() notation to
animation-timeline, and support both syntax for now.

Differential Revision: https://phabricator.services.mozilla.com/D143417
2022-04-20 20:28:52 +00:00
Noemi Erli
276b91ca80 Backed out changeset 7985a1fa0789 (bug 1764768) for causing multiple failures CLOSED TREE 2022-04-20 22:25:02 +03:00
Emilio Cobos Álvarez
485bae6d11 Bug 1764768 - Don't truncate viewport units at computed value time. r=dholbert
Instead, make the behavior consistent across all <length-percentage>
values (by truncating instead of rounding). This is the already-existing
behavior for calc() and percentages, but with this patch we also apply
it to plain length-flavored <length-percentage> values (this is needed
to avoid regressing things like bug 989802).

Regular <length>s keep rounding, to preserve existing behavior. We can
consider changing that in a follow-up if need be.

Differential Revision: https://phabricator.services.mozilla.com/D143857
2022-04-20 17:22:36 +00:00
Nicolas Chevobbe
94239d0425 Bug 1765239 - [devtools] Turn SplitView into an ES6 class. r=ochameau.
Depends on D144149

Differential Revision: https://phabricator.services.mozilla.com/D144150
2022-04-20 15:47:05 +00:00
Nicolas Chevobbe
7565d876bd Bug 1765239 - [devtools] Fix SplitView.jsm ESLint errors. r=ochameau.
Depends on D144148

Differential Revision: https://phabricator.services.mozilla.com/D144149
2022-04-20 15:47:05 +00:00
Nicolas Chevobbe
06e5af3c22 Bug 1765239 - [devtools] Move SplitView.jsm to styleeditor. r=ochameau.
It's only used here, so let's move it back here

Differential Revision: https://phabricator.services.mozilla.com/D144148
2022-04-20 15:47:05 +00:00
Alexandre Poirot
c5c771622b Bug 1764505 - [devtools] Allow recording the browser toolbox startup by setting MOZ_BROWSER_TOOLBOX_PROFILER_STARTUP=1. r=nchevobbe
You can run:
```
$ MOZ_BROWSER_TOOLBOX_PROFILER_STARTUP=1 ./mach run --jsdebugger
```
This will open a first browser toolbox for which we will record its startup.
Then, open a second browser toolbox, and open the recorded profile from its performance panel.

Differential Revision: https://phabricator.services.mozilla.com/D143567
2022-04-20 15:15:07 +00:00
Alexandre Poirot
d9782d91c8 Bug 1764505 - [devtools] Enable the new profiler on the browser toolbox. r=nchevobbe,julienw
This will help debug browser toolbox performance.
The performance panel displayed in the first browser toolbox is a bit pointless,
you better have to use the toolbar icon so that you avoid having all DevTools noise.
This enabling is actually mostly meant for the second browser toolbox you can open,
which will debug the first browser toolbox.
In this second browser toolbox, you will be able to record the first browser toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D143566
2022-04-20 15:15:07 +00:00
Alexandre Poirot
ee871dd92b Bug 1764505 - [devtools] Migrate Tool's definition isTargetSupport to isToolSupported. r=nchevobbe
And pass a toolbox instead of only the toplevel target.
It helps identify the browser toolbox and easily enable/disable tools for it.

Differential Revision: https://phabricator.services.mozilla.com/D143628
2022-04-20 15:15:06 +00:00
Emilio Cobos Álvarez
ee2dcf8fe6 Bug 1765550 - Move transitions and animations to nsStyleUIReset. r=dshin
This mostly just moves code around, to minimize potential behavior
changes. There are some cleanups that we should try to do long term
(this "have an array with n different counts" is pretty weird).

But for now this should unblock people.

The destination struct (nsStyleUIReset) was chosen mainly because it's
small and non-inherited, and it doesn't seem like a worse place than
nsStyleDisplay.

Differential Revision: https://phabricator.services.mozilla.com/D144183
2022-04-20 15:13:54 +00:00
Alexandre Poirot
1a24fdef28 Bug 1765330 - [devtools] Remove skip-pausing debugger feature flag. r=jdescottes
This has been enabled for a while and should be considered the new default behavior.

Also removing (now) unused selectors/actions.

Differential Revision: https://phabricator.services.mozilla.com/D143999
2022-04-20 15:05:59 +00:00
Tim Huang
a5d06b6cd0 Bug 1759496 - Disable test browser_webconsole_warning_group_storage_isolation.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D144018
2022-04-20 08:32:32 +00:00
Tim Huang
52f2c65367 Bug 1535451 - Enable browser_webconsole_trackingprotection_errors.js test on Fission. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D142692
2022-04-20 08:32:32 +00:00
Nicolas Chevobbe
2e492939c5 Bug 1765240 - [devtools] Remove unused ObjectActor#ownPropertyNames. r=ochameau,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143974
2022-04-20 08:05:35 +00:00
Nicolas Chevobbe
ea2f238e7a Bug 1765240 - [devtools] Remove unused ObjectActor#parameterNames. r=ochameau,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143973
2022-04-20 08:05:35 +00:00
Nicolas Chevobbe
70b0d12ee4 Bug 1765240 - [devtools] Remove ObjectActor#decompile. r=ochameau,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143972
2022-04-20 08:05:35 +00:00
Nicolas Chevobbe
f04aa523c5 Bug 1765240 - [devtools] Remove ObjectActor#displayString. r=ochameau,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143971
2022-04-20 08:05:34 +00:00
Nicolas Chevobbe
3d186a69eb Bug 1765370 - [devtools] Always update configuration in InspectedWindowCommand.reload. r=jdescottes.
This was already happening due to an erroneous typeof check.
Luckikly this is actually what we want (and what Chrome is doing FWIW).

Differential Revision: https://phabricator.services.mozilla.com/D144139
2022-04-20 07:15:58 +00:00
David Shin
ec93876623 Bug 1755565 - Implement contain: inline-size. r=emilio,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D143501
2022-04-19 17:44:16 +00:00
Alexandre Poirot
915d27e682 Bug 1764102 - [devtools] Ensure firing dom-complete when the page pauses or fails loading. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D143370
2022-04-19 16:13:13 +00:00
criss
1a5e600ac1 Backed out 4 changesets (bug 1763586) for causing mochitest failures on test_Debugger.Source.prototype.elementAttribute.html. CLOSED TREE
Backed out changeset 8da9574159d3 (bug 1763586)
Backed out changeset 8f964a9e2f31 (bug 1763586)
Backed out changeset 420105516ec3 (bug 1763586)
Backed out changeset 68cd444d018e (bug 1763586)
2022-04-19 16:28:30 +03:00
Yulia Startsev
4c90fc2b59 Bug 1763586 - remove debugger tests for source element behavior; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D143698
2022-04-19 12:28:50 +00:00
Nicolas Chevobbe
f3fcb6acfd Bug 1764885 - [devtools] Fix network MDN icon for HTTP Headers. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D143821
2022-04-19 12:06:02 +00:00
Julian Descottes
7ae3393b2f Bug 1762837 - [devtols] Update DAMP docs to suggest --suite instead of --activeTests r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D143981
2022-04-19 11:56:45 +00:00
Hubert Boma Manilla
0a4230aa64 Bug 1758361 - [devtools] Fix crash when viewing request headers from upload stream r=nchevobbe
This patch fixes 2 crashes, for different reasons and improves/ adds tests to cover the issues
- The raw view of the `Request headers for upload stream` crashes when there
  is only one header sent. This is covered by the scenario

  ```
  [
    "content-type: application/x-www-form-urlencoded\r",
    "\r",
    "\r",
    "foo=bar&baz=123"
  ]
  ```

- The Request side panel crashes when there is no form data body content added to the payload sent.
  This is covered in the test by the scenario

  ```
  [
    "content-type: application/x-www-form-urlencoded\r",
    "\r",
    "\r",
  ]
  ```

Differential Revision: https://phabricator.services.mozilla.com/D143339
2022-04-15 08:16:17 +00:00
Hubert Boma Manilla
42b7d01933 Bug 1758361 - [devtools] Cleanup post data tests r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D143338
2022-04-15 08:16:17 +00:00
Alexandre Poirot
52314b1e46 Bug 1747105 - [devtools] Covers the source text content for named eval and same url loaded many times. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142918
2022-04-15 07:37:16 +00:00