gecko-dev/devtools/shared
Julian Descottes b7f1441589 Bug 1378820 - remove usage of sdk/clipboard in devtools clipboard helper;r=gl
Remove previous helper APIs:
- currentFlavors()
- getData()

The only consumer for both APIs was in devtools/cient/inspector/inspector.
The logic was:
- call currentFlavors()
- if clipboard contains:
  -  "text/unicode"
  or
  - "text/html" but not "image/png"
- then call getData()

But actually calling getData() without any argument means that unless "image/png"
flavor is available, we will always use the "text/unicode" flavor.
(see current code for sdk helper: http://searchfox.org/mozilla-central/rev/09c065976fd4f18d4ad764d7cb4bbc684bf56714/addon-sdk/source/lib/sdk/clipboard.js#204-209)

If the text/unicode flavor was available at the same time as image/png, the code
would have returned the image data, which is probably not what we expect in the
context of the inspector.

I think we should explicitly request for text/unicode. So this patch introduces
a new getText() api in the devtools clipboard helper, which is a simplified version
of the sdk get() helper. We could always extend it to also support text/html.


MozReview-Commit-ID: E3JVj9boVKe

--HG--
extra : rebase_source : 3f1aecd05dacba5cd1a3af6025bbf82d51d49821
2017-07-31 14:02:37 +02:00
..
acorn Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
apps Bug 1362970 - Part 2 - Script-generated patch to convert .then(null, ...) to .catch(...). r=florian 2017-06-19 11:32:37 +01:00
client Bug 1375164 - Add arguments to the ArrayBufferClient.slice method. r=jlast 2017-06-21 13:01:41 -05:00
css Bug 1373339 - Add a button in the rules view to toggle the CSS shapes highlighter. r=gl 2017-06-20 11:23:32 -04:00
discovery Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
fronts Bug 1378860 - Use an ES class instead of an SDK class for RuleModificationList; r=gl 2017-07-21 14:36:10 +02:00
gcli Bug 1378821 - Stop using sdk/window/utils in DevTools; r=zer0 2017-07-10 10:55:40 +02:00
heapsnapshot Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
inspector Bug 987877 - Add Copy XPath menu item to the inspector; r=miker 2017-06-12 16:25:48 +02:00
jsbeautify Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
layout Bug 1370278 - used getTransformToAncestor in Grid Inspector highlighter; r=gl 2017-06-09 01:32:27 +02:00
locales Backed out changeset e2100bb65c97 (bug 1369801) 2017-07-27 18:15:03 +02:00
node-properties
performance Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
platform Bug 1378820 - remove usage of sdk/clipboard in devtools clipboard helper;r=gl 2017-07-31 14:02:37 +02:00
pretty-fast Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
qrcode Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
security Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
shims Backed out changeset 8a8f5e718ddd (bug 1369801) for frequently breaking devtools menus (bug 1384967). r=backout a=backout on a CLOSED TREE 2017-07-27 18:16:52 +02:00
sourcemap Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
specs Bug 1282717 - Highlight CSS shapes points in the page from the rule-view and vice versa. r=pbro 2017-07-05 10:57:42 -04:00
sprintfjs
tests Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
touch Bug 1355056 - replace (function(args) { /* do stuff using this */ }).bind(this) with arrow functions, r=jaws. 2017-04-27 00:25:45 +02:00
transport Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
webconsole Backed out changeset 192d517219c1 (bug 1369801) 2017-07-27 18:14:38 +02:00
worker Bug 1378821 - Stop using sdk/window/utils in DevTools; r=zer0 2017-07-10 10:55:40 +02:00
.eslintrc.js Bug 1338585 - Add an eslint rule to require using .ownerGlobal instead of .ownerDocument.defaultView, r=jaws. 2017-02-13 13:01:32 +01:00
DevToolsUtils.js Bug 1382833 - Don't throw when dealing with CPOWs in the Object Actor;r=jimb 2017-07-26 11:22:56 -07:00
Loader.jsm Backed out changeset ad2a532a50f0 (bug 1369801) 2017-07-27 18:14:53 +02:00
Parser.jsm Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
ThreadSafeDevToolsUtils.js Bug 1382833 - Don't throw when dealing with CPOWs in the Object Actor;r=jimb 2017-07-26 11:22:56 -07:00
async-storage.js
async-utils.js
builtin-modules.js Bug 1365767 - Stop bootlegging TextEncoder and TextDecoder from osfile.jsm in devtools. r=jryans 2017-05-17 13:52:39 -07:00
content-observer.js Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
debounce.js Bug 1378817 - Stop using sdk/lang/functional in DevTools. r=jdescottes 2017-07-20 17:57:28 +01:00
defer.js Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
deprecated-sync-thenables.js Bug 1362970 - Part 1 - Add support for "catch" to "deprecated-sync-thenables". r=florian 2017-06-16 11:07:08 +01:00
dom-node-constants.js Bug 1321839 - make devtools/shared eslint-clean; r=jryans 2016-12-02 10:32:04 -07:00
dom-node-filter-constants.js
event-emitter.js Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
extend.js Backed out changeset 68c5012ba344 (bug 1378850) for ESlint no-unused-vars failures on a CLOSED TREE. 2017-07-19 12:26:25 -04:00
flags.js Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
generate-uuid.js Bug 1378824 - Stop using sdk/util/uuid in DevTools. r=jdescottes 2017-07-28 14:36:33 +01:00
indentation.js Bug 1327773 - Fix non-functioning devtools option 'Indent using spaces' by modifying prettifyCSS.js; r=tromey 2017-02-07 21:06:28 +05:30
jar.mn Backed out changeset 8a8f5e718ddd (bug 1369801) for frequently breaking devtools menus (bug 1384967). r=backout a=backout on a CLOSED TREE 2017-07-27 18:16:52 +02:00
l10n.js Bug 1350226 - Support for loading Editor in Launchpad r=gasolin,Honza 2017-04-08 18:33:07 +08:00
loader-plugin-raw.jsm Backed out 2 changesets (bug 1312041) for mass failures a=backout 2016-11-01 10:30:45 -07:00
moz.build Bug 1378824 - Stop using sdk/util/uuid in DevTools. r=jdescottes 2017-07-28 14:36:33 +01:00
path.js Bug 1321839 - make devtools/shared eslint-clean; r=jryans 2016-12-02 10:32:04 -07:00
plural-form.js Bug 1356146 - Link webpack alias to m-c shared r=Honza 2017-04-13 14:26:47 +08:00
protocol.js Bug 1362970 - Part 2 - Script-generated patch to convert .then(null, ...) to .catch(...). r=florian 2017-06-19 11:32:37 +01:00
system.js Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
task.js Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
wasm-source-map.js Bug 1364535 - Inverse source mapping for WebAssembly maps. r=jlast 2017-06-19 10:55:20 -05:00