Closed Bug 1378820 Opened 7 years ago Closed 7 years ago

Stop using sdk/clipboard in DevTools

Categories

(DevTools :: General, enhancement, P1)

enhancement

Tracking

(firefox56 fixed)

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: sole, Assigned: jdescottes)

References

Details

(Whiteboard: [nosdk])

Attachments

(1 file)

      No description provided.
Used in devtools/shared/platform/chrome/clipboard.js
Flags: qe-verify-
Priority: -- → P2
Whiteboard: [nosdk]
I'll try to take this one.

The two sdk / clipboard APIs used in devtools are getCurrentFlavors and getData exposed by devtools/shared/platform/clipboard. They are only used by _getClipboardContentForPaste() in devtools/client/inspector/inspector.js

Other consumers of devtools/shared/platform/clipboard use the copyString() API which doesn't rely on the SDK clipboard helper.
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: P2 → P1
Target Milestone: --- → Firefox 56
Gabriel, flagged you for review since the only consumer is in the inspector.
The changeset comment explains in details why I changed the API in this fashion.
Comment on attachment 8891989 [details]
Bug 1378820 - remove usage of sdk/clipboard in devtools clipboard helper;

https://reviewboard.mozilla.org/r/162996/#review168328

::: devtools/shared/platform/chrome/clipboard.js:53
(Diff revision 2)
> +    // Clipboard doesn't contain data in flavor, return null.
> +    return null;
> +  }
> +
> +  // There's no data available, return.
> +  if (data.value === null) {

Can we simplify this to be !data.value
Attachment #8891989 - Flags: review?(gl) → review+
Comment on attachment 8891989 [details]
Bug 1378820 - remove usage of sdk/clipboard in devtools clipboard helper;

https://reviewboard.mozilla.org/r/162996/#review168328

Thanks for the review!

> Can we simplify this to be !data.value

Updated.
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0e724df2d505
remove usage of sdk/clipboard in devtools clipboard helper;r=gl
https://hg.mozilla.org/mozilla-central/rev/0e724df2d505
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Depends on: 1391934
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.