216 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez e833a1757b Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop
Bug 2033191 made sure we only call ownerGlobal on nodes.

As per the discussion in dev-platform, the front-end ~always wants
.documentGlobal. This removes ownerGlobal from the bindings. Following
patch will rename internal GetOwnerGlobal in gecko to GetRelevantGlobal
as per the HTML spec terminology.

Differential Revision: https://phabricator.services.mozilla.com/D297183
2026-05-02 22:04:13 +00:00
iulian moraru 480fc572da Revert "Bug 2036439, Bug 2033243 - Deal with ownerGlobal -> documentGlobal rename in extensions. r=robwu,home-newtab-reviewers,mconley" for causing newtab failures.
This reverts commit 4f62279d01.

Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug"

This reverts commit 91a4ece356.

Revert "Bug 2033243 - BindToOwner -> BindToGlobal. r=dom-core,smaug"

This reverts commit 5a95a889e1.

Revert "Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug"

This reverts commit 7177a68e67.

Revert "Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop"

This reverts commit 5263254690.
2026-05-02 16:43:35 +00:00
Emilio Cobos Álvarez 5263254690 Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop
Bug 2033191 made sure we only call ownerGlobal on nodes.

As per the discussion in dev-platform, the front-end ~always wants
.documentGlobal. This removes ownerGlobal from the bindings. Following
patch will rename internal GetOwnerGlobal in gecko to GetRelevantGlobal
as per the HTML spec terminology.

Differential Revision: https://phabricator.services.mozilla.com/D297183
2026-05-02 15:33:20 +00:00
rperta d4cc71008d Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug" on developer request
This reverts commit e58e122135.

This reverts commit 84ca206f3e.

This reverts commit a7945292ed.

This reverts commit 367d83d299.
2026-05-02 06:20:30 +00:00
Emilio Cobos Álvarez 367d83d299 Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop
Bug 2033191 made sure we only call ownerGlobal on nodes.

As per the discussion in dev-platform, the front-end ~always wants
.documentGlobal. This removes ownerGlobal from the bindings. Following
patch will rename internal GetOwnerGlobal in gecko to GetRelevantGlobal
as per the HTML spec terminology.

Differential Revision: https://phabricator.services.mozilla.com/D297183
2026-05-01 11:58:10 +00:00
agoloman c814da612d Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug" for causing multiple failures.
This reverts commit c7246654bc.

Revert "Bug 2033243 - BindToOwner -> BindToGlobal. r=dom-core,smaug"

This reverts commit 8873ddf33c.

Revert "Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug"

This reverts commit 8bf999e03c.

Revert "Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop"

This reverts commit 7dea1af2e0.
2026-04-30 20:13:14 +00:00
Emilio Cobos Álvarez 7dea1af2e0 Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop
Bug 2033191 made sure we only call ownerGlobal on nodes.

As per the discussion in dev-platform, the front-end ~always wants
.documentGlobal. This removes ownerGlobal from the bindings. Following
patch will rename internal GetOwnerGlobal in gecko to GetRelevantGlobal
as per the HTML spec terminology.

Differential Revision: https://phabricator.services.mozilla.com/D297183
2026-04-30 17:47:07 +00:00
Chris Vander Linden a453ba35a8 Bug 2022405 - Use private class fields in devtools/client/framework/devtools.js. r=nchevobbe,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D288553
2026-03-24 01:00:07 +00:00
Nicolas Chevobbe 1347b04fcc Bug 2017058 - [devtools] Make classes extend EventEmitter instead of calling EventEmitter.decorate. r=devtools-reviewers,profiler-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D283517
2026-02-17 10:45:11 +00:00
Lorenz A 05a5353d23 Bug 2004204 - [devtools] Turn devtools.js into an ES class. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D275277
2025-12-08 09:36:39 +00:00
Mark Banner b38cd3110b Bug 1999554 - Automatically fix ESLint rule jsdoc/check-types for devtools/. r=devtools-reviewers,devtools-backward-compat-reviewers,profiler-reviewers,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D272173
2025-11-21 16:16:08 +00:00
Mark Banner 2542790f53 Bug 1998787 - Automatic fixes for enabling ESLint jsdoc/tag-line rule everywhere. r=frontend-codestyle-reviewers,mtigley,perftest-reviewers,nchevobbe,home-newtab-reviewers,Gijs,mconley,sparky
Differential Revision: https://phabricator.services.mozilla.com/D271745
2025-11-10 21:27:12 +00:00
Florian Quèze 16b346576d Bug 1983606 - replace Cu.now() calls with ChromeUtils.now() calls, r=Gijs,perftest-reviewers,geckoview-reviewers,devtools-reviewers,sync-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,backup-reviewers,home-newtab-reviewers,urlbar-reviewers,janv,nalexander,skhamis,nchevobbe,timhuang,mconley,sparky.
Patch generated using this command: rg "Cu\.now\(\)" --files-with-matches | grep -v "obj-" | xargs sed -i 's/Cu\.now()/ChromeUtils.now()/g'

Differential Revision: https://phabricator.services.mozilla.com/D261474
2025-08-26 06:38:11 +00:00
Nicolas Chevobbe 2f0516ebf2 Bug 1324254 - [devtools] Directly select inspected node in markup on toolbox creation. r=ochameau.
This adds a new option to the Inspector init method so we can pass a default
DOM reference to select (instead of first selecting the body, and then selecting
the actual node we want).
With this change only, the inspected element wouldn't be highlighted like it used
to because 1. the selection reason would be "inspector-default-selection", which
prevents the highlighting, and 2. when initializing the markup view, we were
calling the `_onNewSelection` function without a node front, which is the parameter
used for doing the highlighting.
To fix this, we're passing another option to Inspector init, the default node
selection reason, that we can set to "browser-context-menu" (like it used to be),
and actually pass the selection node front when calling `_onNewSelection`.

In browser_inspector_initialization.js we now check that the highlighter gets
displayed when using the inspect element context menu to open the inspector.

Differential Revision: https://phabricator.services.mozilla.com/D246890
2025-05-12 14:04:43 +00:00
Florian Quèze a08e72fb51 Bug 1944631 - Migrate histograms to use Glean APIs for remaining DEVTOOLS_* histograms, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D238291
2025-02-25 14:28:33 +00:00
Logan Rosen d24c9d9ff4 Bug 1857834 - auto-formatting with Prettier v3 r=linter-reviewers,webdriver-reviewers,perftest-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,reusable-components-reviewers,profiler-reviewers,dom-storage-reviewers,android-reviewers,firefox-ai-ml-reviewers,hjones,mcheang,mstange,sparky,janv,nchevobbe,tarek,Standard8,markh
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D230598
2024-11-29 15:18:25 +00:00
Chris H-C 724b00c304 Bug 1920562 - Remove JS uses of Services.telemetry.setEventRecordingEnabled r=florian,extension-reviewers,settings-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,sessionstore-reviewers,omc-reviewers,migration-reviewers,firefox-desktop-core-reviewers ,urlbar-reviewers,sfoster,nchevobbe,valentin,Gijs,dimi,lina,mconley,pdahiya,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D223833
2024-10-08 20:14:42 +00:00
Sandor Molnar 92076e16a7 Backed out 5 changesets (bug 1920562) for causing xpc assertion failures. CLOSED TREE
Backed out changeset 8f085ab589a8 (bug 1920562)
Backed out changeset 4405387ae770 (bug 1920562)
Backed out changeset a68fd13a33ae (bug 1920562)
Backed out changeset cd3672fc08ed (bug 1920562)
Backed out changeset 62ab18879eea (bug 1920562)
2024-10-08 00:16:13 +03:00
Chris H-C e944bfe7a2 Bug 1920562 - Remove JS uses of Services.telemetry.setEventRecordingEnabled r=florian,settings-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,sessionstore-reviewers,omc-reviewers,migration-reviewers,firefox-desktop-core-reviewers ,urlbar-reviewers,sfoster,nchevobbe,valentin,Gijs,dimi,lina,mconley,pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D223833
2024-10-07 17:29:57 +00:00
echrs 07d1104355 Bug 1878635 - Remove Deprecated.sys.mjs r=Standard8,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D201737
2024-02-20 20:33:24 +00:00
Alexandre Poirot 140d755231 Bug 1845768 - [devtools] Only try to open URL as JS files in debugger/view-source if DevTools are opened in the current tab. r=devtools-reviewers,perftest-reviewers,jdescottes,sparky
This will prevent opening any links with the ":\d+" suffix anytime devtools were opened in the past.

Differential Revision: https://phabricator.services.mozilla.com/D185826
2023-08-21 08:01:36 +00:00
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Alexandre Poirot 782c6e1335 Bug 1825511 - [devtools] Log JavaScript traces to stdout with hyperlinks and handle them in firefox startup. r=nchevobbe,devtools-reviewers
The JavaScript tracer will log special format of links, including a precise location,
by appending `@${line}:${column}` to each frame's source's URL.
This URL pattern is later interpreted by DevTools command line handler in order
to automatically open the source's location in the debugger.

Differential Revision: https://phabricator.services.mozilla.com/D174098
2023-05-12 11:33:27 +00:00
Alexandre Poirot 07efa6dcf4 Bug 1808797 - [devtools] Add assertion to verify gDevTools is loaded only once. r=jdescottes
The modification made to Loader isn't necessary as the sandboxName
isn't relevant/used. The global will be the one crafted by C++
and be named "Devtools global".
But in case something change, this may catch yet another unexpected behavior.

Differential Revision: https://phabricator.services.mozilla.com/D166122
2023-01-20 09:41:03 +00:00
Alexandre Poirot b21b9df6a7 Bug 1807896 - [devtools] Remove "toolbox-created" event. r=devtools-reviewers,perftest-reviewers,sparky,jdescottes
This event was only used in this test.

Unfortunately, I wasn't able to keep the same logic in the test while keeping it reliable.
I prefer to remove this test-only event and simplify the test to only ensure
we safely ignore subsequent calls to toggle.

What is hard to know from the test, when calling toggle in some following event loops
is if this will be ignored -or- close/open a toolbox...

Differential Revision: https://phabricator.services.mozilla.com/D165715
2023-01-18 09:27:30 +00:00
Iulian Moraru e847342c5e Backed out changeset 184e7ccf3c01 (bug 1808797) for causing multiple failures. CLOSED TREE 2023-01-16 17:44:14 +02:00
Alexandre Poirot d0e5f1de0b Bug 1808797 - [devtools] Add assertion to verify gDevTools is loaded only once. r=jdescottes
The modification made to Loader isn't necessary as the sandboxName
isn't relevant/used. The global will be the one crafted by C++
and be named "Devtools global".
But in case something change, this may catch yet another unexpected behavior.

Differential Revision: https://phabricator.services.mozilla.com/D166122
2023-01-16 14:04:54 +00:00
Alexandre Poirot 768a07f851 Bug 1807937 - [devtools] Use gDevTools.showToolboxForWebExtension and showToolboxForTab from storage panel tests. r=devtools-reviewers,nchevobbe
Note that showToolbox already takes care of reusing existing toolbox if you pass the same tab element.
Otherwise let's try to stick to method used in production.
When debugging a local tab, we are using showToolboxForTab.
When debugging an addon, about:debugging calls showToolboxForWebExtension.

Also cleanup some legacy in the webext test.

Differential Revision: https://phabricator.services.mozilla.com/D165720
2023-01-05 17:37:58 +00:00
Gijs Kruitbosch ba3f869758 Bug 1803391 - update comments / text references to session store modules as 'jsm's, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D164127
2022-12-12 10:08:03 +00:00
Alexandre Poirot 6cfca638f1 Bug 1797730 - [devtools] Rename gDevTools._toolboxes to gDevTools._toolboxesPerCommands. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D160618
2022-10-29 07:48:08 +00:00
Alexandre Poirot c6d540d7d3 Bug 1794773 - [devtools] gDevTools.showToolbox should wait for toolbox to be "raised". r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D159142
2022-10-20 10:10:37 +00:00
Mark Banner 5407bdffa8 Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Alexandre Poirot 0a2f14ed30 Bug 1700909 - [devtools] Migrate gDevTools.showToolbox from descriptor to commands. r=jdescottes,extension-reviewers,willdurand
This migrate gDevTools.showToolbox, but also the Toolbox now receives a commands right away,
and no longer need to create commands out of the descriptor front.

I'm removing browser_two_tabs as it is focusing on testing Tab Descriptors (RootFront.listTabs+getTab)
and Tab targets (TabDescriptor.getTarget).
Using getTarget on descriptor is legacy codepath for a while now.
We should now rather cover commands instead of these low level RDP methods.

Differential Revision: https://phabricator.services.mozilla.com/D157796
2022-10-11 20:33:53 +00:00
Alexandre Poirot d18bbea83e Bug 1700909 - [devtools] Migrate DescriptorMixin.shouldCloseClient to Commands. r=jdescottes
Note that this depends on the following patch, in order to destroy commands from the toolbox.
Commands have always been destroying the related client. This was a significant simplification in test.
So that I had to reverse the default value of shouldCloseClient and only toggle it to false
where it is strictly needed. Ideally only for about:debugging toolboxes (and two tests).

Differential Revision: https://phabricator.services.mozilla.com/D158206
2022-10-11 20:33:52 +00:00
Alexandre Poirot f8042a1a3a Bug 1700909 - [devtools] Migrate TabDescriptorFactory to LocalTabCommandsFactory. r=jdescottes
Also move iKnownTab to gDevTools.hasToolboxForTab as it feel more natural.

Differential Revision: https://phabricator.services.mozilla.com/D157943
2022-10-11 20:33:51 +00:00
Alexandre Poirot e0366a6c18 Bug 1700909 - [devtools] Stop exposing Toolbox.descriptorFront. r=jdescottes
Instead we should we querying Toolbox.commands.descriptorFront.

Differential Revision: https://phabricator.services.mozilla.com/D157942
2022-10-11 20:33:51 +00:00
Cristian Tuns c136da03a9 Backed out 5 changesets (bug 1700909) for causing mochitest failures CLOSED TREE
Backed out changeset a49f15f66ed4 (bug 1700909)
Backed out changeset 5a6b15eb1e12 (bug 1700909)
Backed out changeset 67b12d0e350b (bug 1700909)
Backed out changeset 4e6312ea547a (bug 1700909)
Backed out changeset c49eab385e1c (bug 1700909)
2022-10-10 10:38:03 -04:00
Alexandre Poirot 0ad9d97fbc Bug 1700909 - [devtools] Migrate gDevTools.showToolbox from descriptor to commands. r=jdescottes,extension-reviewers,willdurand
This migrate gDevTools.showToolbox, but also the Toolbox now receives a commands right away,
and no longer need to create commands out of the descriptor front.

I'm removing browser_two_tabs as it is focusing on testing Tab Descriptors (RootFront.listTabs+getTab)
and Tab targets (TabDescriptor.getTarget).
Using getTarget on descriptor is legacy codepath for a while now.
We should now rather cover commands instead of these low level RDP methods.

Differential Revision: https://phabricator.services.mozilla.com/D157796
2022-10-10 11:28:08 +00:00
Alexandre Poirot dfe621937e Bug 1700909 - [devtools] Migrate DescriptorMixin.shouldCloseClient to Commands. r=jdescottes
Note that this depends on the following patch, in order to destroy commands from the toolbox.
Commands have always been destroying the related client. This was a significant simplification in test.
So that I had to reverse the default value of shouldCloseClient and only toggle it to false
where it is strictly needed. Ideally only for about:debugging toolboxes (and two tests).

Differential Revision: https://phabricator.services.mozilla.com/D158206
2022-10-10 11:28:07 +00:00
Alexandre Poirot 820257de7c Bug 1700909 - [devtools] Migrate TabDescriptorFactory to LocalTabCommandsFactory. r=jdescottes
Also move iKnownTab to gDevTools.hasToolboxForTab as it feel more natural.

Differential Revision: https://phabricator.services.mozilla.com/D157943
2022-10-10 11:28:06 +00:00
Alexandre Poirot 62214956c9 Bug 1700909 - [devtools] Stop exposing Toolbox.descriptorFront. r=jdescottes
Instead we should we querying Toolbox.commands.descriptorFront.

Differential Revision: https://phabricator.services.mozilla.com/D157942
2022-10-10 11:28:05 +00:00
Alexandre Poirot 59fe57c052 Bug 1793396 - [devtools] Use absolute URLs in all usages of loader.lazyRequireGetter. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D158489
2022-10-03 18:57:13 +00:00
Alexandre Poirot 9beeb07755 Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/framework. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158373
2022-09-30 15:17:36 +00:00
Andreea Pavel 734e00a91f Backed out 5 changesets (bug 1700909) for failing browser_ext_addon_debugging_netmonitor.js on a CLOSED TREE
Backed out changeset 9bc3e4820f59 (bug 1700909)
Backed out changeset 998c0ec4f9d3 (bug 1700909)
Backed out changeset 6f6fe066fc38 (bug 1700909)
Backed out changeset e53aaf8ffe5b (bug 1700909)
Backed out changeset 3dbeffe25878 (bug 1700909)
2022-09-29 19:40:43 +03:00
Alexandre Poirot 2fa2a439ea Bug 1700909 - [devtools] Migrate gDevTools.showToolbox from descriptor to commands. r=jdescottes
This migrate gDevTools.showToolbox, but also the Toolbox now receives a commands right away,
and no longer need to create commands out of the descriptor front.

I'm removing browser_two_tabs as it is focusing on testing Tab Descriptors (RootFront.listTabs+getTab)
and Tab targets (TabDescriptor.getTarget).
Using getTarget on descriptor is legacy codepath for a while now.
We should now rather cover commands instead of these low level RDP methods.

Differential Revision: https://phabricator.services.mozilla.com/D157796
2022-09-29 14:43:26 +00:00
Alexandre Poirot 06d9cc9c05 Bug 1700909 - [devtools] Migrate DescriptorMixin.shouldCloseClient to Commands. r=jdescottes
Note that this depends on the following patch, in order to destroy commands from the toolbox.
Commands have always been destroying the related client. This was a significant simplification in test.
So that I had to reverse the default value of shouldCloseClient and only toggle it to false
where it is strictly needed. Ideally only for about:debugging toolboxes (and two tests).

Differential Revision: https://phabricator.services.mozilla.com/D158206
2022-09-29 14:43:26 +00:00
Alexandre Poirot 03239d33fd Bug 1700909 - [devtools] Migrate TabDescriptorFactory to LocalTabCommandsFactory. r=jdescottes
Also move iKnownTab to gDevTools.hasToolboxForTab as it feel more natural.

Differential Revision: https://phabricator.services.mozilla.com/D157943
2022-09-29 14:43:25 +00:00
Alexandre Poirot 0d20bb1ccb Bug 1700909 - [devtools] Stop exposing Toolbox.descriptorFront. r=jdescottes
Instead we should we querying Toolbox.commands.descriptorFront.

Differential Revision: https://phabricator.services.mozilla.com/D157942
2022-09-29 14:43:24 +00:00
Alexandre Poirot 58b38d7c16 Bug 1791969 - [devtools] Import all JSM in DevTools via ChromeUtils.import. r=jdescottes
Convert all imports but the one related to SessionDataHelper
as that's an hybrid module which is loaded as a JSM from the main thread,
but loaded as a common js module from the worker thread.

We will be able to drop this once we can migrate this JSM to ESM
once we support loading ESM from the worker thread.

Differential Revision: https://phabricator.services.mozilla.com/D158007
2022-09-26 13:01:33 +00:00
Alexandre Poirot 633eb069ef Bug 1791832 - [devtools] Convert devtools/startup JSM to ES Modules. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D157911
2022-09-26 10:48:05 +00:00