6351 Commits

Author SHA1 Message Date
Nicolas Chevobbe
8a33ca95a6 Bug 1980892 - [devtools] Remove use of InspectorUtils.isCustomElementName on WalkerSearch#_searchSelectors. a=RyanVM.
We used to check if the passed query looked like a tag name so we could
bail out early, as we'd get those results from _searchIndex.
But InspectorUtils.isCustomElementName does match some legitimate
selectors, like div.a-b.
Let's remove the check on custom element and trigger the search in such case.

Original Revision: https://phabricator.services.mozilla.com/D259783

Differential Revision: https://phabricator.services.mozilla.com/D260238
2025-08-07 15:20:26 +00:00
Nicolas Chevobbe
294861d1cd Bug 1967673 - [devtools] Don't omit valid safe getter undefined values in _findSafeGetterValues. r=devtools-reviewers,jdescottes DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D250613
2025-05-25 10:56:48 +00:00
Cristian Tuns
2c393cf579 Revert "Bug 1967673 - [devtools] Don't omit valid safe getter undefined values in _findSafeGetterValues. r=devtools-reviewers,jdescottes" for causing failures with "1 not in success codes: [0] "
This reverts commit f73f8eabd8.
2025-05-25 10:25:19 +00:00
Nicolas Chevobbe
f73f8eabd8 Bug 1967673 - [devtools] Don't omit valid safe getter undefined values in _findSafeGetterValues. r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D250613
2025-05-25 09:30:55 +00:00
Mark Banner
b20fbf2ba1 Bug 1881701 - Fix remainder of newly raised devtools issues after switching to the ESLint flat config. r=devtools-reviewers,frontend-codestyle-reviewers,mossop,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D249957
2025-05-24 17:11:32 +00:00
Mark Banner
ee9933d77b Bug 1881701 - Automatically fix new issues raised in devtools. r=devtools-reviewers,frontend-codestyle-reviewers,mossop,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D249956
2025-05-24 17:11:28 +00:00
Mark Banner
3cc3379c8f Bug 1881701 - Change the devtools configurations to work with the ESLint flat configuration.r=devtools-reviewers,profiler-reviewers,julienw,nchevobbe
This consolidates the jest environment definition, and the xpcshell globals into the devtools/.eslintrc.mjs file, for easier configurations.
It also changes the restart of the configurations to work with flat config.

Differential Revision: https://phabricator.services.mozilla.com/D249948
2025-05-24 17:10:59 +00:00
Mark Banner
d7c7c5369b Bug 1881701 - Rename many ESLint files to use .mjs. r=frontend-codestyle-reviewers,perftest-reviewers,Gijs,sparky,webcompat-reviewers,twisniewski
This is separate to help preserve history of the files.

Differential Revision: https://phabricator.services.mozilla.com/D249945
2025-05-24 17:10:51 +00:00
Emilio Cobos Álvarez
7c0d4089c5 Bug 1968202 - Generalize GlobalStyleSheetCache to support author stylesheets. r=smaug
In bug 1967507 I changed the timing of AnonymousContent stylesheet
loading in a way that it perturbed a css cache test because of
accessiblecaret.css

  https://hg.mozilla.org/mozilla-central/rev/a6a294ae1d18

However that made me realize that accessiblecaret.css is loaded
virtually in all processes, and it should be using the same mechanism we
use for UA sheets, rather than using all the CSS loader machinery
in-content. Same goes for details.css.

Expand GlobalStyleSheetCache to allow UA and Author sheets, and allow
ShadowRoot to get built-in stylesheets appended.

This allows accessiblecaret.css and details.css not to be marked as
content-accessible.

We could do the same at the document level for plaintext.css and co, but
that seems a bit less common, so maybe fine.

Differential Revision: https://phabricator.services.mozilla.com/D250909
2025-05-24 11:27:14 +00:00
Emilio Cobos Álvarez
abfb41e00a Bug 1967931 - Avoid blocking rendering for devtools pauses. r=smaug,devtools-reviewers,nchevobbe
This regresses browser_dbg-scroll-run-to-completion.js, but I think we
should either suppress rendering or not suppress it, not doing some
weird in-between thing. So for now given the discussion on the bug it's
probably acceptable.

Differential Revision: https://phabricator.services.mozilla.com/D250772
2025-05-24 10:14:39 +00:00
Nicolas Chevobbe
2ce6dfa245 Bug 1327973 - [devtools] Remove count/score sort in markup/style editor autocomplete suggestions. r=devtools-reviewers,jdescottes.
The suggestions were sorted by the number of element matching the item, which could
be confusing and get in the way of the user when they wanted to search for the
least used version.
We now sort the suggestions by "type" (id, class, tag, …), and then, within those
groups, alphabetically.

Differential Revision: https://phabricator.services.mozilla.com/D249768
2025-05-24 08:30:53 +00:00
Serban Stanca
4c663869d9 Revert "Bug 1968202 - Generalize GlobalStyleSheetCache to support author stylesheets. r=smaug" for causing wpt failures in prefetch-transfer-size-executor.html.
This reverts commit e2ac38c2a8.
2025-05-24 01:53:53 +00:00
Joel Maher
7e69b821f2 Bug 1967293 - Update mochitest manifest annotations to support Ubuntu 24.04. r=aryx,webcompat-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,profiler-reviewers,dom-storage-reviewers,twisniewski,asuth,accessibility-frontend-reviewers,julienw,dimi,morgan,mconley,ochameau,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D250070
2025-05-23 20:13:29 +00:00
Alexandru Marc
f8a43a4811 Revert "Bug 1967673 - [devtools] Don't omit valid safe getter undefined values in _findSafeGetterValues. r=devtools-reviewers,jdescottes" by dev request
This reverts commit 4fe1cbf23e.
2025-05-23 14:51:27 +00:00
Nicolas Chevobbe
4fe1cbf23e Bug 1967673 - [devtools] Don't omit valid safe getter undefined values in _findSafeGetterValues. r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D250613
2025-05-23 14:37:42 +00:00
Emilio Cobos Álvarez
e2ac38c2a8 Bug 1968202 - Generalize GlobalStyleSheetCache to support author stylesheets. r=smaug
In bug 1967507 I changed the timing of AnonymousContent stylesheet
loading in a way that it perturbed a css cache test because of
accessiblecaret.css

  https://hg.mozilla.org/mozilla-central/rev/a6a294ae1d18

However that made me realize that accessiblecaret.css is loaded
virtually in all processes, and it should be using the same mechanism we
use for UA sheets, rather than using all the CSS loader machinery
in-content. Same goes for details.css.

Expand GlobalStyleSheetCache to allow UA and Author sheets, and allow
ShadowRoot to get built-in stylesheets appended.

This allows accessiblecaret.css and details.css not to be marked as
content-accessible.

We could do the same at the document level for plaintext.css and co, but
that seems a bit less common, so maybe fine.

Differential Revision: https://phabricator.services.mozilla.com/D250909
2025-05-23 13:30:13 +00:00
Julien Wajsberg
b65e26de56 Bug 1581963 - [devtools] Add copyFromBuffer and copyToBuffer to the bulk packet r=ochameau,devtools-reviewers,profiler-reviewers,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D250276
2025-05-22 18:02:32 +00:00
Julien Wajsberg
29c9a8dba5 Bug 1581963 - [devtools] Handle errors properly when capturing a profile r=profiler-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D245886
2025-05-22 18:02:28 +00:00
Julien Wajsberg
2417113533 Bug 1581963 - [devtools] Implement a new remote function to gather the profile data, using the bulk api r=devtools-backward-compat-reviewers,profiler-reviewers,ochameau,mstange
The devtools protocol's bulk API is much more efficient, as we're
transfering the protocol data in a binary form instead of serializing it
using the devtools protocol.
In addition to that, the profile data is now gzipped before sending it.

Differential Revision: https://phabricator.services.mozilla.com/D244341
2025-05-22 18:02:25 +00:00
Julien Wajsberg
8c7ecb613b Bug 1581963 - [devtools] Add a new trait to control the use of the bulk API for the performance panel r=devtools-reviewers,devtools-backward-compat-reviewers,profiler-reviewers,nchevobbe,mstange
Differential Revision: https://phabricator.services.mozilla.com/D245460
2025-05-22 18:02:20 +00:00
Julien Wajsberg
859d407b2b Bug 1581963 - [profiler] Remove an unused feature from the default list of features r=canaltinova,devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D246768
2025-05-22 18:02:17 +00:00
Alex Jakobi
1c63f5fc96 Bug 1953029 - Pass WindowGlobalTargetActor to TouchSimulator in RDM r=devtools-backward-compat-reviewers,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D245393
2025-05-22 13:47:07 +00:00
Emilio Cobos Álvarez
8ff4a65ffa Bug 1967507 - Simplify custom content container set-up. r=smaug,devtools-reviewers,nchevobbe
I haven't been able to reproduce this locally, but I see what's going
on, and I think we could do better.

This avoids the frame flush from nsCanvasFrame::CreateAnonymousContent,
and in general makes the anonymous content timing a lot more reasonable
(see the FlushPendingNotifications call that's getting removed).

The ServoStyleSet changes are needed now that there are multiple style
roots that can be unstyled like that.

It also simplifies the API as now it's not dependent on having a canvas
frame around (and thus doesn't need to flush layout).

Differential Revision: https://phabricator.services.mozilla.com/D250531
2025-05-22 13:06:12 +00:00
Keith Cirkel
8515aaaac5 Bug 1966702 - Implement debugger breakpoints for CloseWatcher events r=nchevobbe,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D250307
2025-05-22 08:29:42 +00:00
Nicolas Chevobbe
8fe988d8d5 Bug 1871881 - [devtools] Fix Inspector selector search using functional pseudo classes. r=devtools-reviewers,jdescottes.
In walker.js, for the selector search, we want to avoid calling `querySelectorAll` if the search
query is a simple tagname, as those are already retrieved in `_searchIndex`.
The regex that was used to check if we had a complex selector was wrong and would fail to
detect selector with pseudo class (e.g. `section:has(button)`).
We fix this by checking if the query does look like a tagname (only includes a-z chars and -),
and we add another check to see if the query is a valid selector, using `CSS.supports`.

Differential Revision: https://phabricator.services.mozilla.com/D250128
2025-05-21 11:36:54 +00:00
agoloman
63c83deb26 Revert "Bug 1606785 - Enable Prettier for CSS files r=desktop-theme-reviewers,Standard8,frontend-codestyle-reviewers,emilio" for causing multiple failures.
This reverts commit ec5fa1d4c0.

Revert "Bug 1606785 - Format Firefox CSS files with Prettier r=desktop-theme-reviewers,perftest-reviewers,places-reviewers,translations-reviewers,omc-reviewers,backup-reviewers,browser-installer-reviewers,sparky,dao,pdahiya,nrishel,kpatenio"

This reverts commit baa5d72bbd.

Revert "Bug 1606785 - Format browser/themes and toolkit/themes CSS files with Prettier r=desktop-theme-reviewers,pip-reviewers,tabbrowser-reviewers,places-reviewers,dao,mconley"

This reverts commit 9604b0a8ae.

Revert "Bug 1606785 - Format browser/themes/preferences CSS files with Prettier r=settings-reviewers,desktop-theme-reviewers,dao,mconley"

This reverts commit 686c1cf85f.

Revert "Bug 1606785 - Format urlbar CSS files with Prettier r=urlbar-reviewers,desktop-theme-reviewers,dao"

This reverts commit a7a4f31251.

Revert "Bug 1606785 - Format webcompat CSS files with Prettier r=webcompat-reviewers,denschub"

This reverts commit 41bc4d5237.

Revert "Bug 1606785 - Format search CSS files with Prettier r=search-reviewers,jteow"

This reverts commit 7bb7f82374.

Revert "Bug 1606785 - Format dom CSS files with Prettier r=emilio"

This reverts commit c22e910235.

Revert "Bug 1606785 - Format android CSS files with Prettier r=geckoview-reviewers,hiro"

This reverts commit c08e43fc3d.

Revert "Bug 1606785 - Format layout CSS files with Prettier r=layout-reviewers,dholbert"

This reverts commit 4f2a32d1a4.

Revert "Bug 1606785 - Format devtools CSS files with Prettier r=devtools-reviewers,nchevobbe,frontend-codestyle-reviewers"

This reverts commit c05f675ddf.

Revert "Bug 1606785 - Format recomp CSS files with Prettier r=reusable-components-reviewers,desktop-theme-reviewers,dao,mkennedy"

This reverts commit b10c7de8d0.

Revert "Bug 1606785 - Format sidebar CSS files with Prettier r=sidebar-reviewers,desktop-theme-reviewers,dao,nsharpley"

This reverts commit d32c555e37.

Revert "Bug 1606785 - Format shopping CSS files with Prettier r=shopping-reviewers,desktop-theme-reviewers,dao,rking"

This reverts commit 965887a708.

Revert "Bug 1606785 - Format profiles CSS files with Prettier r=profiles-reviewers,desktop-theme-reviewers,dao,mossop"

This reverts commit 8338860f74.

Revert "Bug 1606785 - Format genai and ml CSS files with Prettier r=firefox-ai-ml-reviewers,Mardak"

This reverts commit d66681f553.

Revert "Bug 1606785 - Format firefoxview CSS files with Prettier r=fxview-reviewers,desktop-theme-reviewers,dao,jsudiaman"

This reverts commit 530b815cad.

Revert "Bug 1606785 - Format aboutlogins, megalist, and form autofill CSS files with Prettier r=credential-management-reviewers,mtigley,desktop-theme-reviewers,dao"

This reverts commit 813c864381.
2025-05-21 04:49:28 +00:00
hannajones
c05f675ddf Bug 1606785 - Format devtools CSS files with Prettier r=devtools-reviewers,nchevobbe,frontend-codestyle-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D249174
2025-05-21 03:54:40 +00:00
Nicolas Chevobbe
6766549411 Bug 1957000 - [devtools] Add pointerrawupdate to Event Listener Breakpoints. r=devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D249727
2025-05-20 11:22:05 +00:00
Boris Chiou
912b3b586b Bug 1956645 - Parse and serialize view-transition-class. r=view-transitions-reviewers,firefox-style-system-reviewers,emilio
Parse and serialize `view-transition-class: none | <custom-ident>+`.
This property will be used after we extend `<pt-name-selector>` to
`<pt-name-and-class-selector>` for named view transition pseudo-elements.
Will do this in Bug 1956646. Also, we will handle the class matching in
Bug 1964949.

Differential Revision: https://phabricator.services.mozilla.com/D249681
2025-05-18 19:26:19 +00:00
Alexandru Marc
479bc536c2 Revert "Bug 1956645 - Parse and serialize view-transition-class. r=view-transitions-reviewers,firefox-style-system-reviewers,emilio" for causing wpt failures @ various-values-important.html
This reverts commit bca008efdf.
2025-05-18 00:44:31 +00:00
Boris Chiou
bca008efdf Bug 1956645 - Parse and serialize view-transition-class. r=view-transitions-reviewers,firefox-style-system-reviewers,emilio
Parse and serialize `view-transition-class: none | <custom-ident>+`.
This property will be used after we extend `<pt-name-selector>` to
`<pt-name-and-class-selector>` for named view transition pseudo-elements.
Will do this in Bug 1956646. Also, we will handle the class matching in
Bug 1964949.

Differential Revision: https://phabricator.services.mozilla.com/D249681
2025-05-17 21:58:05 +00:00
Emilio Cobos Álvarez
aab327b89b Bug 1966675 - Remove all remnants of ::-moz-focus-inner. r=layout-reviewers,desktop-theme-reviewers,devtools-reviewers,nchevobbe,dao
Let me know if you want a pref for this, but I think it's not needed.

This pseudo has not done anything useful for years and years now, and I
haven't seen it combined with any other selector in a way that could
cause breakage.

Differential Revision: https://phabricator.services.mozilla.com/D249596
2025-05-16 14:30:48 +00:00
Rohit Borse
80102b33ab Bug 1953285 - Incorrect message when taking a full page screenshot that's too large. r=devtools-reviewers,nchevobbe Incorrecty passing value of height and width in message - fixed.
Differential Revision: https://phabricator.services.mozilla.com/D248947
2025-05-16 12:15:24 +00:00
Alexandre Poirot
db7a4f65cc Bug 949595 - [devtools] Convert the memory actor to use protocol.js bulk codepath. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D245923
2025-05-16 00:38:50 +00:00
Alexandre Poirot
a7b0d37072 Bug 949595 - [devtools] Implement bulk requests in protocol.js. r=devtools-reviewers,nchevobbe
This mimic what was only supported via legacy DevToolsClient.request() method (bug 797639).

Differential Revision: https://phabricator.services.mozilla.com/D245922
2025-05-16 00:38:46 +00:00
Alexandre Poirot
d415aca971 Bug 1963915 - [devtools] Navigate back and forward from the parent process. r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D249595
2025-05-16 00:37:53 +00:00
Alexandre Poirot
6fad3a13b4 Bug 1937738 - [devtools] Expose a new navigateTo method on Tab Descriptor. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
This should help VS Code load the page to debug.

Differential Revision: https://phabricator.services.mozilla.com/D232328
2025-05-16 00:37:49 +00:00
Alexandre Poirot
bd9cc9ff8c Bug 1898485 - [devtools] Fix column number displayed in console and link when opening in the debugger. r=devtools-reviewers,nchevobbe
There was three issues:
* one specific to original source. We were asking to resolve the 1-based column to SourceMapURLService,
whereas it expects a 0-based column (fix made to savedFrameToLocation).
* then for all sources, we were trying to open the debugger from 1-based column for generated sources,
whereas the debugger expects 0-based column. (And original source were 0-based, but mapped from the wrong generated location...)
* log point were emiting CONSOLE_MESSAGE resource whose `frame` objects were using 0-based columns,
whereas regular console message resource were using 1-based columns (as they are pulled from Spidermonkey's SavedFrame
which is 1-based)

Also adapt the tracer to the new behavior of Frame component and acknowledge that frames
use 1-based numbers.

Differential Revision: https://phabricator.services.mozilla.com/D249065
2025-05-15 23:51:02 +00:00
Alexandre Poirot
f9642bda04 Bug 1958081 - [devtools] Cover JS Tracer stringification with the new JS Objects test framework. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D245075
2025-05-13 12:34:09 +00:00
Alexandre Poirot
833ef8762c Bug 1958081 - [devtools] Introduce a test framework to ease testing all possible JavaScript types against various codebases. r=frontend-codestyle-reviewers,devtools-reviewers,nchevobbe,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D244246
2025-05-13 12:34:02 +00:00
Holger Benl
3637acb5e1 Bug 1963280 - [devtools] Fix logging functions from logpoints. r=ochameau,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D247888
2025-05-12 07:18:27 +00:00
Serban Stanca
1dac11cfa9 Revert "Bug 1958081 - [devtools] Cover JS Tracer stringification with the new JS Objects test framework. r=devtools-reviewers,nchevobbe" for causing devtools failures in browser_webconsole_reverse_search.js.
This reverts commit a07e576742.

This reverts commit f0b5190845.

This reverts commit 1761d4c3dd.
2025-05-08 23:00:24 +00:00
Alexandre Poirot
a07e576742 Bug 1958081 - [devtools] Cover JS Tracer stringification with the new JS Objects test framework. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D245075
2025-05-08 20:05:04 +00:00
Alexandre Poirot
1761d4c3dd Bug 1958081 - [devtools] Introduce a test framework to ease testing all possible JavaScript types against various codebases. r=frontend-codestyle-reviewers,devtools-reviewers,nchevobbe,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D244246
2025-05-08 20:04:57 +00:00
Cristina Horotan
539746f658 Revert "Bug 1958081 - [devtools] Cover JS Tracer stringification with the new JS Objects test framework. r=devtools-reviewers,nchevobbe" for xpcshell failures at test_javascript_logging.js
This reverts commit 6056567c3e.

Revert "Bug 1958081 - [devtools] Migrate object inspector to the new JS objects test framework. r=devtools-reviewers,nchevobbe"

This reverts commit 8cbc65e7b5.

Revert "Bug 1958081 - [devtools] Introduce a test framework to ease testing all possible JavaScript types against various codebases. r=frontend-codestyle-reviewers,devtools-reviewers,nchevobbe,Standard8" for causing xpc failures at test_javascript_logging.js

This reverts commit ddcbf73cd8.
2025-05-08 05:42:19 +00:00
Alexandre Poirot
6056567c3e Bug 1958081 - [devtools] Cover JS Tracer stringification with the new JS Objects test framework. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D245075
2025-05-08 04:05:08 +00:00
Alexandre Poirot
ddcbf73cd8 Bug 1958081 - [devtools] Introduce a test framework to ease testing all possible JavaScript types against various codebases. r=frontend-codestyle-reviewers,devtools-reviewers,nchevobbe,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D244246
2025-05-08 04:05:01 +00:00
Holger Benl
d345d9dc55 Bug 1960694 - [devtools] Don't use evaluations for event logpoints. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D245881
2025-05-05 20:26:16 +00:00
Julian Descottes
a85a762771 Bug 1808555 - [devtools] Check if browsing context is discarded before flipping watchedByDevTools r=devtools-reviewers,nchevobbe
`watchedByDevTools` cannot be updated if the context is already discarded, and this makes the rest of the destroy sequence fail.

Differential Revision: https://phabricator.services.mozilla.com/D246897
2025-04-28 13:28:16 +00:00
Nicolas Chevobbe
7321a8f528 Bug 1962358 - [devtools] Return evaluation error frame from stack when there's one. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D246579
2025-04-25 09:07:40 +00:00