Commit Graph
67 Commits
Author SHA1 Message Date
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
Gabriel Luong 764b34dd31 Bug 1494162 - Part 28: Lazy initialize TooltipToggle in HTMLTooltip. r=jdescottes 2018-10-01 11:24:41 -04:00
Gabriel Luong ff74a1316f Bug 1494162 - Part 25: Lazy load the modules in HTMLTooltip. r=jdescottes 2018-10-01 11:24:21 -04:00
Mantaroh Yoshinaga 6f7df8a1ac Bug 1472942 - Part 2. Add setContentSize() instead of setContent() in HTMLTooltip. r=birtles
This patch will remove setContest(), and change the following things instead of this:

 * Use HTMLTooltip.panel.appendChild() instead of HTMLTooltip.setContent().
 * Add HTMLTooltip.setContetnSize() to specify the panel size if need this.

Differential Revision: https://phabricator.services.mozilla.com/D7044
2018-09-27 07:14:55 +00:00
Mantaroh Yoshinaga c59e960b22 Bug 1472931 - Drop the autofocus feature of HTMLTooltip. r=birtles
This feature is no longer used. So this patch will remove this feature.

Differential Revision: https://phabricator.services.mozilla.com/D4052
2018-08-27 01:35:55 +00:00
Brian Grinstead c8b3483e82 Bug 1479538 - Rewrite non-test callers of document.createElementNS(XUL_NS, ...) to use document.createXULElement(...);r=paolo
Differential Revision: https://phabricator.services.mozilla.com/D3275
2018-08-14 16:22:44 +00:00
Julian Descottes 02afaa9954 Bug 1349416 - Only delay removeEventListener when hiding after mouseup;r=birtles
The inplace-editor is programmatically hiding the autocomplete-popup
on TAB and notifies the caller. The caller (eg rule view) will trigger
a click on the next focusable element immediately after that.

If the HTMLTooltip is still consuming outside clicks at that point
the click will be swallowed and the new inplace-editor cannot be created.

Depends on D2661

Differential Revision: https://phabricator.services.mozilla.com/D2662
2018-08-03 11:02:45 +00:00
Julian Descottes 5413bfe088 Bug 1349416 - Hide HTMLTooltip on mouseup rather than on click;r=birtles
A click event is only fired if the element on which mousedown and mouseup
happened are the same. If this is not the case, the HTMLTooltip will not
be able to hide itself.

Listening to mouseup makes the behavior more consistent but forces the
hide() method to be always asynchronous, while before it was only
asynchronous for tooltips using the XULWrapper.

Depends on D2660

Differential Revision: https://phabricator.services.mozilla.com/D2661
2018-08-03 11:01:51 +00:00
Bogdan Tara b03e56131c Backed out 3 changesets (bug 1349416) for Dev Tools failures CLOSED TREE
Backed out changeset ec5ee2990e21 (bug 1349416)
Backed out changeset c4f8eccf14dc (bug 1349416)
Backed out changeset b7e80d3a6810 (bug 1349416)
2018-08-03 12:33:32 +03:00
Julian Descottes d81a4c84d3 Bug 1349416 - Only delay removeEventListener when hiding after mouseup;r=birtles
The inplace-editor is programmatically hiding the autocomplete-popup
on TAB and notifies the caller. The caller (eg rule view) will trigger
a click on the next focusable element immediately after that.

If the HTMLTooltip is still consuming outside clicks at that point
the click will be swallowed and the new inplace-editor cannot be created.

Depends on D2661

Differential Revision: https://phabricator.services.mozilla.com/D2662
2018-08-03 07:05:51 +00:00
Julian Descottes f507e8c31b Bug 1349416 - Hide HTMLTooltip on mouseup rather than on click;r=birtles
A click event is only fired if the element on which mousedown and mouseup
happened are the same. If this is not the case, the HTMLTooltip will not
be able to hide itself.

Listening to mouseup makes the behavior more consistent but forces the
hide() method to be always asynchronous, while before it was only
asynchronous for tooltips using the XULWrapper.

Depends on D2660

Differential Revision: https://phabricator.services.mozilla.com/D2661
2018-08-03 07:05:43 +00:00
Brian Birtles 8e130c4211 Bug 1461522 - Add a mechanism to allow updating an HTMLTooltip's size and position; r=jdescottes
MozReview-Commit-ID: 4SDxlTTFp8E
2018-06-28 15:13:05 +09:00
Brian Birtles a7944f6a04 Bug 1461522 - Honor ui.popup.disable_autohide setting in HTMLTooltip; r=jdescottes
MozReview-Commit-ID: ReYYKPYaVm
2018-06-28 15:13:05 +09:00
Brian Birtles d9b05e9f46 Bug 1461522 - Add ID and class properties to HTMLTooltip; r=jdescottes
In particular, the ID allows us to associate the tooltip with the button that
triggers it using the aria-controls attribute.

MozReview-Commit-ID: ArjH2s5JNlC
2018-06-28 15:13:05 +09:00
Brian Birtles b70afbc6cb Bug 1461522 - Add focus() and focusEnd() methods to HTMLTooltip; r=jdescottes
We will use these methods later when we put menu content inside HTMLTooltip in
order to set the initial focus.

MozReview-Commit-ID: HR02wg543gP
2018-06-28 15:10:42 +09:00
Brian Birtles 5f831ad41b Bug 1461522 - Factor out a focusableSelector utility; r=jdescottes
We will use this later when we introduce a MenuList class since it will want to
manage focus for its menu items.

This patch also extends the definition of focusable elements somewhat.

MozReview-Commit-ID: 3shnC0t79rF
2018-06-28 15:10:27 +09:00
Brian Birtles 4c18f72eed Bug 1461522 - Add doorhanger type to HTMLTooltip; r=jdescottes
MozReview-Commit-ID: 6Oq9qauwngX
2018-06-28 15:04:13 +09:00
Brian Birtles 5d4d25e90b Bug 1461522 - Allow { height: "auto" } in HTMLTooltip setContent and make it the default; r=jdescottes
The current default value for height of Infinity has the unfortunate side
effect that, when combined with using a XUL wrapper, there will be a large
filler element stretching vertically on one side of the tooltip that effectively
neuters all content beneath it. While this is probably fine for tooltips that
are shown on hover, it is problematic if we want to use this for DevTools menus
because it means the user is unable to click anything above/below the menu so
long as it is open (which can be particularly problematic once we make
HTMLTooltip support the "Disable popup autohide" feature"). Even if we were to
decide that clicks outside the tooltip should be consumed anyway we would still
have the problem that hover styles don't apply in this "dead" region.

As a result, this patch makes the { height: Infinity } behaviour opt-in for
those tooltips that really need it. For most uses, however, a height calculated
when the tooltip is shown should be sufficient (and later in this patch series
we will add a mechanism to HTMLTooltip to explicitly request it recalculate its
size and position in response to content changes).

This patch introduces the { height: "auto" } mechanism and also reverses the
order in which size/position properties are calculated to match the regular
manner in which layout is performed: widths first, then heights.

MozReview-Commit-ID: 7BeVkxGVhYn
2018-06-28 15:03:57 +09:00
Brian Birtles f4f8b0b9fd Bug 1461522 - Fix some comments in HTMLTooltip.js; r=jdescottes
MozReview-Commit-ID: F01ofl9u5lR
2018-06-28 14:56:30 +09:00
Brian Birtles c944837eb9 Bug 1461522 - Use the currentZoom as opposed to the pref value; r=jdescottes
In a couple of places in DevTools we read back the value of the
"devtools.toolbox.zoomValue" pref and take that to be the zoom value. However,
at certain zoom levels these two can differ: the pref value representing the
ideal zoom and currentZoom giving the actual zoom value in use.

This patch makes us use the actual zoom value in the two places where this
occurs.

Unfortunately, we cannot easily adjust the browser_html_tooltip_zoom.js test for
this since it uses a separate XUL document that does not take into account the
pref value---as a result that test directly sets the currentZoom on the separate
doc and hence this problem won't occur.

Instead, this patch adjusts the browser_toolbox_zoom_popup.js test since the
toolbox menu positioning uses the same problematic pattern so we can reproduce
the bug in the browser_toolbox_zoom_popup.js. (This patch fixes both
occurances of this pattern.)

At least locally browser_toolbox_zoom_popup.js passes for me with a zoom of 1.5
but fails with a zoom of 1.4. Similarly in my testing of HTMLTooltip, zoom
values such as 1.2 and 1.4 often show significant misalignment whilst a zoom of
1.3 or 1.5 is fine.

With the code changes in this patch, the test passes with any given zoom factor.

(This patch also incidentally replaced isNaN with the more robust Number.isNaN.)

MozReview-Commit-ID: JmlRoidARVp
2018-06-28 14:55:48 +09:00
Brian Birtles baf1fba99e Bug 1461522 - Make HTMLTooltip position the arrow correctly in RTL mode; r=jdescottes
Currently the arrow offset is not correctly positioned in RTL mode as evidenced
by the test case included in this patch (which fails without the code changes
included in this patch).

This patch logicalizes the calculations for positioning the tooltip which fixes
this and other issues when using RTL mode and will make it easier to introduce
a new "doorhanger" type tooltip later in this patch series.

MozReview-Commit-ID: BQXhDHbPTbl
2018-06-28 14:52:10 +09:00
Blake Kaplan bd5cecf60f Bug 1186265 - Move devtools over to getBounds(). r=pbro
This leaves getAdjustedQuads alone because it lives in its own world and its
result gets sent over IPC. That leaves things in a bit of an intermediate
state, but that should be OK for now.

MozReview-Commit-ID: DH6eGqCFhPr
2018-06-04 16:41:43 -07:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Mantaroh Yoshinaga 2071efa4f3 Bug 1460795 - HTML tooltips should consider the content zoom value. r=jdescottes
This patch will multiply the HTML tooltip position to the zoom value in order to
display HTML tooltip in correct position.

MozReview-Commit-ID: GHVkB5hN44k
2018-05-17 09:52:38 +09:00
Alexandre Poirot 22e91d7acd Bug 1440321 - Convert Task.jsm to async/await in devtools/client. r=jryans
MozReview-Commit-ID: HaGOC5cn3JD
2018-03-12 19:46:35 -05:00
J. Ryan Stinnett 8d1c817851 Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00