gecko-dev/devtools/client/inspector/shared
Julian Descottes df759845bc Bug 1270462 - part2: tooltip toggle callback can resolve(false);r=bgrins,jsnajdr
Previously, the targetNodeCb used in TooltipToggle had an inconsistent API. If
returning synchronously, "false" would prevent the tooltip from appearing.
However, if using a promise, resolving "false" would still show the tooltip.
It was needed to reject the promise in this case to prevent the tooltip from
being displayed.

This commit makes TooltipToggle always expect a consistent return value from
this callback, whether it is synchronous, or using promises.
- true -> show the tooltip on the event target
- DOM node -> show the tooltip on the provided node
- false (or falsy value) -> do not show the tooltip

MozReview-Commit-ID: 7PIPwBJxjWO

--HG--
extra : rebase_source : 279bab30f631a3a65a93b52226c6980210abf2f1
2016-05-05 20:25:08 +02:00
..
test Bug 1270462 - part1: extract devtools tooltip toggle logic to separate file;r=bgrins,jsnajdr 2016-05-06 14:54:30 +02:00
dom-node-preview.js Bug 1263258 - Require space before paren for anonymous functions. r=pbro 2016-04-27 09:06:15 -05:00
moz.build Bug 1213651 - Avoid server round-trips when displaying animated dom nodes; r=tromey 2016-01-21 13:19:58 +01:00
style-inspector-menu.js Bug 1263258 - Require space before paren for anonymous functions. r=pbro 2016-04-27 09:06:15 -05:00
style-inspector-overlays.js Bug 1270462 - part2: tooltip toggle callback can resolve(false);r=bgrins,jsnajdr 2016-05-05 20:25:08 +02:00
utils.js Bug 1265787 - Add javascript CSS lexer to devtools. r=pbro 2016-04-29 11:21:22 -06:00