Commit Graph

24795 Commits

Author SHA1 Message Date
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
Alexandre Poirot
e8e3023f2b Bug 1747105 - [devtools] Cover SourceTree behavior when having many sources loaded from the same URL. r=bomsy
I had to tune the versionized http helper to pass the right headers,
while still ensuring that http cache is kept disabled.

Differential Revision: https://phabricator.services.mozilla.com/D142348
2022-04-15 07:37:16 +00:00
Nicolas Chevobbe
f7e827cb6d Bug 1764764 - [devtools] Automatically generate StyleSheet reps stub. r=bomsy.
generateStubs is modified to accept having an async expression.

Differential Revision: https://phabricator.services.mozilla.com/D143717
2022-04-15 07:23:23 +00:00
Luca Greco
000f909691 Bug 1748530 - Log a warning in the event page DevTools console panel when terminate on idle is ignored. r=mixedpuppy,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D143520
2022-04-14 19:54:32 +00:00
Luca Greco
e4af85d2ad Bug 1748530 - Prevent event page from being terminated on idle while a devtools toolbox is attached to the extension. r=mixedpuppy,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D142991
2022-04-14 19:54:32 +00:00
Nicolas Chevobbe
648c5d1555 Bug 1442600 - [devtools] Remove disabled scroll frames document condition in isXUL. r=ochameau
I wasn't able to retrieve the original STR this condition was preventing, but
removing it and using various highlighters (box model, flex, grid, …) in the browser
toolbox, targetting various documents, I didnt' see any error.
Most importantly, it allowed to show highlighters where it wasn't possible before
(e.g. grid highlighter for webconsole document).
TRY don't show any breakage either.

Differential Revision: https://phabricator.services.mozilla.com/D143571
2022-04-14 12:37:29 +00:00
Tooru Fujisawa
ce9880a20a Bug 1764682 - Explicitly wait for console API message to ignore the input command. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D143700
2022-04-14 11:52:26 +00:00
a153
1624d06d6b Bug 1762483 - Spelling mistake: 'DOM notes' -> 'DOM nodes' r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D143550
2022-04-14 05:33:36 +00:00
Tooru Fujisawa
dea0f5e175 Bug 1761590 - Enter microtask when evaluating console/debugger input. r=nchevobbe,smaug
Differential Revision: https://phabricator.services.mozilla.com/D143356
2022-04-14 01:42:59 +00:00
Nicolas Chevobbe
e2128559ec Bug 1763313 - [devtools] Make NON_L10N_STRINGS dict similar to HEADERS_L10N_IDS. r=jdescottes.
Depends on D143012.

Differential Revision: https://phabricator.services.mozilla.com/D143562
2022-04-13 12:47:57 +00:00
Nicolas Chevobbe
5c8a5c6759 Bug 1763313 - [devtools] Migrate storage panel to Fluent. r=jdescottes,flod
Both the dtd and properties files strings are moved to the existing storage.ftl.
A migration file was added to keep the localized strings.

Some of the strings were migrated to a declarative approach, setting `data-l10n-id` and
`data-l10n-args` attributes on elements. But in other cases, this was not easily doable.
To accomodate with the asynchronicity of `formatValue`, we translate all the strings that
don't have dynamic parameters during the initialization of the panel, and store them in
a Map for easy retrieval.

We also took this opportunity to cleanup the strings key names and have them all prefixed
with `storage-*`. Some functions where refactored so it should be easier to search the
code for a specific l10n string.

Finally, the `table.headers.indexedDB.*` strings weren't migrated as they were never read
in the UI (they are referenced in `NON_L10N_STRINGS`, which bypass localization).

Differential Revision: https://phabricator.services.mozilla.com/D143012
2022-04-13 12:47:57 +00:00
Nicolas Chevobbe
abb6e53e32 Bug 1763312 - [devtools] Remove sourceeditor.dtd. r=jdescottes,flod.
It was only used in the style editor, so we migrate the existing string
to styleeditor.ftl.

Differential Revision: https://phabricator.services.mozilla.com/D143011
2022-04-13 12:47:57 +00:00
André Bargull
1530bed239 Bug 1763996: Handle NaN values in ComparatorNumeric. r=tcampbell
Normalising `NaN` comparator results to `0` was added in ES6, but the two
numeric comparator functions were never updated to include this change.

Differential Revision: https://phabricator.services.mozilla.com/D143337
2022-04-13 08:04:32 +00:00
Doug Thayer
8d7ca3f478 Bug 1763459 - Fix browser_webconsole_scroll with virtualization r=nchevobbe
Eugh - my attempts to validate that every SmartTrace had been expanded were
just hackish and incorrect. What appears to have been happening was a race
between the Promise.race in SmartTrace.js and the IntersectionObserver callback
after setting the output's scrollTop to 0 in the test. If the Promise.race is
fast enough, it executes right after the test yields execution after setting
scrollTop, causing it to run before the IntersectionObserver callback is able
to disable scroll pinning. Setting the default initialRenderDelay to 1 instead
of 100 is enough to get this to happen reliably for me.

I don't think we need any changes other than the change to this test, because I
don't expect this to be a problem that really shows up in practice, and it
would be easily remedied by the user simply continuing to scroll.

Differential Revision: https://phabricator.services.mozilla.com/D143433
2022-04-12 15:13:48 +00:00
Nicolas Chevobbe
d39eede18a Bug 1763327 - [devtools] Automatically generate Symbol rep stubs. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D143445
2022-04-12 13:32:22 +00:00
Nicolas Chevobbe
51289b0c0b Bug 1763364 - [devtools] Remove getTab unused option tabId. r=ochameau,devtools-backward-compat-reviewers,bomsy.
Depends on D143027

Differential Revision: https://phabricator.services.mozilla.com/D143028
2022-04-12 11:59:31 +00:00
Nicolas Chevobbe
a07f538d61 Bug 1763364 - [devtools] Call getTab with browserId instead of outerWindowID. r=ochameau,devtools-backward-compat-reviewers,bomsy.
This allows to remove the `outerWindowID` option from `getTab`.

Depends on D143026

Differential Revision: https://phabricator.services.mozilla.com/D143027
2022-04-12 11:59:30 +00:00
Nicolas Chevobbe
5527d8f73c Bug 1763359 - [devtools] Remove backward compat code using outerWindowID. r=ochameau.
Depends on D143025

Differential Revision: https://phabricator.services.mozilla.com/D143026
2022-04-12 11:59:30 +00:00
Nicolas Chevobbe
8ab74459f2 Bug 1763360 - [devtools] Remove backward compat code for devtools.inspector.selectedSidebar pref. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D143025
2022-04-12 11:59:30 +00:00