Commit Graph
92 Commits
Author SHA1 Message Date
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
Brad Werth d2a197b2f5 Bug 1567310 Part 3: Make all devtools callers of getBoxQuads include option to suppress whitespace frames. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D45120
2019-09-12 19:05:52 +00:00
Nicolas Chevobbe 290ba5cb21 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300
2019-08-19 12:48:16 +00:00
Yura Zenevich 1b1c430b3c Bug 1565460 - move the specific filter buttons for a11y panel audit from top level toolbar inside a menu. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D39118
2019-08-09 13:13:44 +00:00
Julian Descottes de634e41a7 Bug 1569410 - Do not apply disable_autohide to DevTools HTML tooltips r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D41246
2019-08-09 08:36:28 +00:00
Julian Descottes 3467fcc9e2 Bug 1569495 - Stop using innerHTML in HTML Tooltip r=miker
Depends on D39644

Differential Revision: https://phabricator.services.mozilla.com/D39645
2019-07-29 11:56:59 +00:00
Julian Descottes b5d7bc9539 Bug 1568250 - Fix HTML tooltip auto height calculation r=miker,Maliha
The current auto height and auto width tests were not asserting the proper element.

Differential Revision: https://phabricator.services.mozilla.com/D39102
2019-07-24 11:49:32 +00:00
Maliha Islam abbbdad8fd Bug 1478156 - Add color contrast span to color picker, r=yzen,gl
Differential Revision: https://phabricator.services.mozilla.com/D32491
2019-07-15 17:25:23 +00:00
Narcis Beleuzu 309cad7d16 Backed out 6 changesets (bug 1478156) for dt failures on browser_html_tooltip_xul-wrapper.js . CLOSED TREE
Backed out changeset 5ca694230ffa (bug 1478156)
Backed out changeset fcc9123589fd (bug 1478156)
Backed out changeset 83a10c635fe9 (bug 1478156)
Backed out changeset a363971fffb0 (bug 1478156)
Backed out changeset 314855eab887 (bug 1478156)
Backed out changeset 041f51c9d4d1 (bug 1478156)
2019-07-14 05:32:45 +03:00
Maliha Islam 5fb22cebbe Bug 1478156 - Add color contrast span to color picker, r=yzen,gl
Differential Revision: https://phabricator.services.mozilla.com/D32491
2019-07-13 18:36:54 +00:00
Julian Descottes b3dd463445 Bug 1561304 - Add border to HTML tooltip when not using XUL wrapper r=fvsch
Also changed the border radius to be consistent between doorhanger and arrow style tooltips.
There are still subtle differences between the XUL+arrow/HTML+arrow/XUL+doorhanger, but for now I would just like to fix this before we merge to 70.
Strictly using the photon shadow for doorhangers is too subtle and too inconsistent with our other tooltips, so I used shadow-20.

Differential Revision: https://phabricator.services.mozilla.com/D36767
2019-07-05 07:08:17 +00:00
Victor Porof b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
Michael Ratcliffe df9d24e489 Bug 1553472 - Ensure that all DevTools tooltips should conform with the Proton theme r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D32309
2019-06-06 15:09:48 +00:00
Daniel Varga a4d77fe2a4 Backed out changeset 96ea626be10a (bug 1553472) fot devtools failure at devtools/client/framework/test/browser_toolbox_zoom_popup.js. On a CLOSED TREE 2019-06-04 20:45:54 +03:00
Michael Ratcliffe 52bef5e9fe Bug 1553472 - Ensure that all DevTools tooltips should conform with the Proton theme r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D32309
2019-06-03 14:38:58 +00:00
Michael Ratcliffe 6077013b9d Bug 1306054 - Use custom tooltip for inactive properties r=jdescottes,flod,rcaliman
### Changes

Probably the most important change apart from the tooltips is that we now only support one property at a time. This allows us to short circuit at the first invalid property and improve performance. This was previously agreed with Razvan but there were some relics left in the code.

`toolbox.xul`
- Added tooltips.ftl

`devtools/client/inspector/markup/test/helper_events_test_runner.js`:
- Had to change to synthesizeMouseAtCenter because CSS changes caused the original to fail.

`devtools/client/inspector/rules/rules.js`:
- Added `VIEW_NODE_INACTIVE_CSS` to node types and sorted alphabetically.
- Added new nodeInfo data for Inactive CSS icons.

`devtools/client/inspector/rules/test/browser_rules_inactive_css_flexbox.js` &
`devtools/client/inspector/rules/test/browser_rules_inactive_css_grid.js`:
- removed some listeners that are no longer needed

`devtools/client/inspector/rules/test/head.js`:
- Refactored `getPropertiesForRuleIndex()` in order to pass along information needed for testing our Fluent strings.
- Refactored `checkDeclarationIsInactive()` to check tooltip contnts using a new method.
- Added `checkInteractiveTooltip()` for checking the tooltip contents themselves.
- Simple changes to `runInactiveCSSTests()`.

`devtools/client/inspector/rules/views/text-property-editor.js`:
- We no longer create the tooltip by adding the title attribute.

`devtools/client/inspector/shared/node-types.js`:
- Changed the enum to use strings to simplify debugging.
- Added `VIEW_NODE_INACTIVE_CSS`.
- Sorted alphabetically.

`devtools/client/inspector/shared/tooltips-overlay.js`:
- Introduced a new tooltip type called `interactiveTooltip`.

`devtools/client/locales/en-US/inspector.properties`:
- Removed strings.

`devtools/client/locales/en-US/tooltips.ftl`:
- Added structured versions of the properties from `inspector.properties`.

`devtools/client/shared/widgets/tooltip/HTMLTooltip.js`:
- Made the tooltips obey the "prevent popup autohide" option in the browser debugger.

`devtools/client/shared/widgets/tooltip/InactiveCSSTooltipHelper.js`:
- Main file for handling InactiveCSS Tooltips.

`devtools/client/themes/tooltips.css`:
- Made arrow tooltips follow the Proton theme.

`devtools/server/actors/utils/inactive-property-helper.js`:
- General changes to support Fluent.
- Bail on first inactive property found.

### Latest Try (expecting green)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=de28939206d444dc4b534a3e5cc7a84b8797bec3

Differential Revision: https://phabricator.services.mozilla.com/D29372
2019-05-10 17:03:27 +00:00
Julian Descottes 5ec262dd9d Bug 1541970 - Set incontentshell=false for devtools popups and panels r=bgrins
Depends on D26211

Differential Revision: https://phabricator.services.mozilla.com/D26664
2019-04-10 05:16:20 +00:00
Daisuke Akatsuka 0a4b061bee Bug 1523237: Use windowRoot to get top window. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D18777
2019-02-06 16:17:24 +00:00
Mantaroh Yoshinaga 5fb2c6a28f Bug 1485501 - Change the calculated viewport if anchor element is displayed at second screen. r=birtles
If we displayed the devtools across the second screen, the Screen.availLeft
might be not zero. I.e., Screen.availLeft point to second screen's left.
The HTMLTooltip does't consider this case, so this patch will change the
viewpor's left and right position if the left of anchor element is bigger than
screen.right.

Differential Revision: https://phabricator.services.mozilla.com/D8183
2018-10-16 01:16:59 +00:00