Commit Graph
110 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
Nicolas Chevobbe 9a6bbfa4cb Bug 2031688 - [devtools] Move select container element button from @container condition to the tooltip. r=devtools-reviewers,jdescottes.
Also, only show the element highlighter when the "objectBox-node" is hovered,
like we do in the console.
Tests are updated to assert the new behavior.

Differential Revision: https://phabricator.services.mozilla.com/D295750
2026-04-25 09:48:44 +00:00
Nicolas Chevobbe fc8ca9c91f Bug 2023125 - [devtools] Handle @container queries with multiple conditions in Rules view. r=devtools-reviewers,devtools-backward-compat-reviewers,ochameau.
container queries can now have multiple conditions, so we're computing those
on the server and sending it to the client, where we render them separately.
As each condition might refer to a different container, we need to update how
we were handling hovering the container query to show the container tooltip.
Before, we were underlining the `@container` part plus the eventual container
name; now, we underline the whole condition (eventual container name + eventual
container query).
This also impacts how we were triggering the box model highlighter for the container,
it is now displayed when the tooltip is visible, and the tooltip is actually
responsible to toggle it.
The tooltip code is also tweaked so we would always show the tooltip based on
the condition element, not any of its children (e.g. the jump button).
And since we were updating things here, we now add a tooltip-anchor class to
the element that is used as the anchor for the tooltip, so it can be styled.
In this case, we use it to have the same style as we put on hover on the condition
so things feels a bit more stable.

Finally, in order for us to get the proper container, we had to update
`CSSContainerRule.queryContainerFor` in the previous patch so it would know which
condition we should get the container for.
This patch now properly pass the condition index to the RDP method, and the server
functions pass it to `CSSContainerRule.queryContainerFor`.

Differential Revision: https://phabricator.services.mozilla.com/D291482
2026-04-08 12:02:39 +00:00
Nicolas Chevobbe 26c0e31a45 Bug 2024622 - [devtools] Remove remaining references to defunct Launchpad. r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D288647
2026-03-19 18:38:28 +00:00
Emilio Cobos Álvarez d9f08ccbc6 Bug 2021694 - Remove GetXULBoolAttr. r=smaug,devtools-reviewers,nchevobbe
Three callers:

 * fixed attribute is only used as fixed=true for treecolumns, so no
   behavior change.
 * noautofocus is already only used as =true or removed, so no behavior
   change.
 * incontentshell is only used with ="false", rename to
   escapecontentshell and flip the meaning.

Remove the API and similar GetXUL* stuff that did the same.

Differential Revision: https://phabricator.services.mozilla.com/D286520
2026-03-09 19:33:57 +00:00
Emilio Cobos Álvarez 4064391907 Bug 2021694 - Make noautohide a regular bool attr. r=aminomancer,omc-reviewers,devtools-reviewers,nchevobbe
FeatureCallout and one other devtools bit was the only front-end bit
that was already not treating it as such.

Differential Revision: https://phabricator.services.mozilla.com/D286523
2026-03-09 19:20:28 +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 28b770dc03 Bug 2004254 - [devtools] Turn devtools/client/shared/widgets/tooltip/HTMLTooltip.js into an ES class. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D276394
2025-12-15 15:39:10 +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
Julian Descottes 9507b636b0 Bug 1984937 - [devtools] Add setLocalizedFragment API on DevTools HTMLTooltip r=ochameau,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D263437
2025-09-03 15:34:22 +00:00
Alexandre Poirot 6fda8456bd Bug 1929387 - [devtools] Convert focus to ES Module. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D229000
2025-03-05 17:06:00 +00:00
Nicolas Chevobbe 8d5f16e496 Bug 1908600 - [devtools] Fix focus reset in HTMLTooltip#hide. r=devtools-reviewers,ochameau.
The item to focus after hiding the popup was picked from the tooltip document,
but picking it in the anchor document sounds more appropriate.
Also avoid to re-set the focus if the tooltip document doesn't have the focus
anymore before hiding the console (e.g. the user clicked on something outside
of DevTools)

This allows to properly focus the event badge back when hiding the event listener
tooltip with the keyboard. We tweak the event badge focus style a bit to make
this more obvious.

Differential Revision: https://phabricator.services.mozilla.com/D216909
2024-07-22 09:29:44 +00:00
Emilio Cobos Álvarez f6e215329a Bug 1872997 - Improve and simplify DevTools' xul:panel tooltip implementation. r=devtools-reviewers,desktop-theme-reviewers,dao,nchevobbe
This adds proper borders and radii on Windows and Linux, which are
otherwise not present, and simplifies a bit the code by using the same
code path across platforms, and between HTML and XUL.

Remove some ::-moz-focus-inner styles which no longer apply to un-themed
buttons.

The extra -0.5 offset I think was compensating for the margins and
missing border-box sizing.

Differential Revision: https://phabricator.services.mozilla.com/D197793
2024-01-11 10:16:55 +00:00
Alexandre Poirot 9da9cacea2 Bug 1855108 - [devtools] Fix unavailable source popup hidding in browser_dbg-project-search.js. r=devtools-reviewers,nchevobbe
The "tooltip-visible" class name is set *before* registering the click listener
which is fired by the test just after this event is received. Not surprising this caused such race condition.

I imagine we may face this race condition in any test listening for tooltip-visible.
I tried firing tooltip-visible later, like tooltip-shown, but it caused non trivial failure in other tests.
We would need to migrate usage of tooltip-visible one by one to moving forward with only oneevent.

Differential Revision: https://phabricator.services.mozilla.com/D192823
2023-11-07 14:08:59 +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
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Julian Descottes 86332d0677 Bug 1811002 - [devtools] Ignore mouseup events from menupopup elements in HTMLTooltip r=nchevobbe
menupopup elements created for select widgets will not be children of the select itself.
Therefore the check in HTMLTooltip to ignore events if they are triggered from within the tooltip container is not working.
There is no straightforward way to link the select to its popup, and we also can't do a coordinate check (because the menupopup might expand outside
of the initial tooltip), so for now we just ignore all events coming from a menupopup element.

A browser mochitest for the filter widget has been modified to verify this scenario.

Differential Revision: https://phabricator.services.mozilla.com/D167805
2023-01-26 09:07:22 +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 a85b82697f Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/shared. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D158379
2022-09-30 15:17:39 +00:00
Alexandre Poirot 0f32f335e3 Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
2022-09-09 07:22:51 +00:00
Mark Banner 6d03c63e2d Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Emilio Cobos Álvarez 2a8d600795 Bug 1750487 - Avoid unneeded zoom mess-up calculation now that screen coordinates are correct. rpending=nchevobbe
The screen coordinates are already correctly relative to this.doc
because we use getBoxQuads() appropriately.

The only reason we needed to multiply by the zoom value was because the
popup code was incorrectly unaccounting for it. Now that screen
coordinates all make sense and include zoom this is unneeded.

This fixes devtools/client/framework/test/browser_toolbox_zoom_popup.js
with the patch here.

MANUAL PUSH: Backout-avoiding orange fix CLOSED TREE
2022-02-25 02:51:47 +01:00
Nicolas Chevobbe 9ef277d98d Bug 1746150 - [devtools] Reset vertical scroll position when updating HTMLTooltip container. r=jdescottes.
This fixes issues with the iframe dropdown when it overflows and targets are
added/removed.

Differential Revision: https://phabricator.services.mozilla.com/D134039
2021-12-17 16:00:11 +00:00
Nicolas Chevobbe 288167ca4c Bug 1480201 - Fix intermittent on webconsole autocomplete damp test. r=bomsy,perftest-reviewers,sparky.
We used to clear a timeout in HTMLTooltip which is supposed to resolve a Promise
when it's executed, meaning that we could end up with Promises that would never
resolve.
In the test itself, we wait for a tick between each loop iteration and after hiding
the popup to make sure everything has the time to be painted.

Differential Revision: https://phabricator.services.mozilla.com/D83912
2020-07-17 14:11:47 +00:00
James Teh 07134911e2 Bug 1645731: Don't expose the autocomplete popup panel as an alert for accessibility. r=nchevobbe
There was already code to do this, but it was acting on a div instead of the XUL panel.

Differential Revision: https://phabricator.services.mozilla.com/D79635
2020-06-16 06:58:12 +00:00
Daisuke Akatsuka 6dae56cff2 Bug 1620098: Show HTMLTooltip in html document as XUL popup. r=bgrins,jdescottes,mtigley,yzen,bdahl,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D67983
2020-05-07 23:33:57 +00:00
Cosmin Sabou 9b221e8b34 Backed out 3 changesets (bug 1620098) for devtools jtest failures. CLOSED TREE
Backed out changeset a3a8244860bc (bug 1620098)
Backed out changeset 2996bd22bd97 (bug 1620098)
Backed out changeset 6b397048940f (bug 1620098)
2020-05-07 05:40:50 +03:00
Daisuke Akatsuka 8b0833e3c0 Bug 1620098: Show HTMLTooltip in html document as XUL popup. r=bgrins,jdescottes,mtigley,yzen,bdahl
Differential Revision: https://phabricator.services.mozilla.com/D67983
2020-05-07 02:04:17 +00:00
Nicolas Chevobbe c1124335cf Bug 1621239 - Round values returned by calculate(Horizontal|Vertical)Position in HTMLTooltip. r=jdescottes.
There are currently cases where the HTMLTooltip would "jump"
when its content is updated whereas it shouldn't, as when
applying those result to CSS, decimals aren't taken into
account (so a "left" of 152.9999 would translate into a
CSS "left" property of 152px).
Rounding those values seems to fix the issue.

Differential Revision: https://phabricator.services.mozilla.com/D66576
2020-03-12 23:12:29 +00:00
Nicolas Chevobbe 13579fb6a5 Bug 1616847 - When xulWrapper is visible move it instead of trying to show it again. r=jdescottes.
If the XUL wrapper was opened and a consumer called show again,
the panel wouldn't update its position. This can be fixed by checking the
state of the element, and if it's open move the panel using `_moveXulWrapperTo`.

With this change in place, we can remove the updateContainerBounds methods,
as it has the same arguments and is only used in one place.

Differential Revision: https://phabricator.services.mozilla.com/D63488
2020-03-06 13:02:22 +00:00
Narcis Beleuzu 4ee0475f73 Backed out 2 changesets (bug 1616847, bug 1609942) for dt failures on browser_jsterm_autocomplete_control_space.js . CLOSED TREE
Backed out changeset c1d7d5e9a18b (bug 1609942)
Backed out changeset 7a5178ee8cd2 (bug 1616847)
2020-02-28 22:05:05 +02:00
Nicolas Chevobbe df3967f5da Bug 1616847 - When xulWrapper is visible move it instead of trying to show it again. r=jdescottes.
If the XUL wrapper was opened and a consumer called show again,
the panel wouldn't update its position. This can be fixed by checking the
state of the element, and if it's open move the panel using `_moveXulWrapperTo`.

With this change in place, we can remove the updateContainerBounds methods,
as it has the same arguments and is only used in one place.

Differential Revision: https://phabricator.services.mozilla.com/D63488
2020-02-28 15:08:22 +00:00
Cosmin Sabou 3056d5d619 Backed out 2 changesets (bug 1616847, bug 1609942) for devtools failures on browser_jsterm_autocomplete_getters_cache.js.
CLOSED TREE

Backed out changeset 0ee1ac6bab06 (bug 1609942)
Backed out changeset 2357c3d7aa4a (bug 1616847)
2020-02-26 21:39:11 +02:00
Nicolas Chevobbe f178c1ae0e Bug 1616847 - When xulWrapper is visible move it instead of trying to show it again. r=jdescottes.
If the XUL wrapper was opened and a consumer called show again,
the panel wouldn't update its position. This can be fixed by checking the
state of the element, and if it's open move the panel using `_moveXulWrapperTo`.

With this change in place, we can remove the updateContainerBounds methods,
as it has the same arguments and is only used in one place.

Differential Revision: https://phabricator.services.mozilla.com/D63488
2020-02-26 13:03:41 +00:00
Daniel Varga 40fe6c63d5 Backed out changeset df563f103355 (bug 1616847) for causing devtools failure at devtools/client/shared/test/browser_html_tooltip_offset.js
CLOSED TREE
2020-02-24 23:50:19 +02:00
Nicolas Chevobbe e5a6d63a19 Bug 1616847 - When xulWrapper is visible move it instead of trying to show it again. r=jdescottes.
If the XUL wrapper was opened and a consumer called show again,
the panel wouldn't update its position. This can be fixed by checking the
state of the element, and if it's open move the panel using `_moveXulWrapperTo`.

With this change in place, we can remove the updateContainerBounds methods,
as it has the same arguments and is only used in one place.

Differential Revision: https://phabricator.services.mozilla.com/D63488
2020-02-24 16:09:28 +00:00
Julian Descottes 2f90ec41e6 Bug 1590408 - Backed out changeset 84708a4f040d from Bug 1552146 r=miker
The positioning of the arrow was correct, but due to the way the arrow was rotated, the visual center of the arrow did not match the center of the arrow box
Backing out the JS change here, CSS patch later in the queue

Differential Revision: https://phabricator.services.mozilla.com/D52668
2019-11-12 15:45:57 +00:00
Julian Descottes 0eeb6a7703 Bug 1583444 - Reuse DevToolsUtils.getTopWindow in HTMLTooltip r=yzen
Depends on D46958

The getTopWindow logic was duplicated between DevToolsUtils and HTMLTooltip.
This removes the duplication and adds a fixture to the accessibility panel to avoid loading the actual DevToolsUtils file in jest tests.

Differential Revision: https://phabricator.services.mozilla.com/D46959
2019-09-30 09:53:33 +00:00
Michael Ratcliffe 2afac0b5e0 Bug 1580631 - [Inactive CSS] Tooltip should hang off to right side in LTR mode r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D46284
2019-09-24 11:21:46 +00:00
Andreea Pavel d6c7e861b8 Backed out changeset b46946d6e446 (bug 1580631) dt failures at browser_html_tooltip_doorhanger-01.js on a CLOSED TREE 2019-09-20 17:41:19 +03:00
Michael Ratcliffe c41a4ac87a Bug 1580631 - [Inactive CSS] Tooltip should hang off to right side in LTR mode r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D46284
2019-09-20 10:34:29 +00:00
Michael Ratcliffe e106356ad1 Bug 1556201 - Inactive CSS: Clicking on the info icon should not close the tooltip r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D45678
2019-09-18 11:05:48 +00:00
Michael Ratcliffe 5c5ff75b10 Bug 1552146 - [Inactive CSS] Fine tune the tooltip's position in hidpi and non-hidpi modes r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D44846
2019-09-12 10:14:34 +00:00