Closed
Bug 586047
Opened 14 years ago
Closed 12 years ago
add image data support to the clipboard api
Categories
(Add-on SDK Graveyard :: General, enhancement, P1)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dietrich, Assigned: zer0)
References
Details
Attachments
(2 files, 2 obsolete files)
2.25 KB,
patch
|
Details | Diff | Splinter Review | |
358 bytes,
text/html
|
ochameau
:
review+
|
Details |
use-case via this thread: http://groups.google.com/group/mozilla-labs-jetpack/browse_thread/thread/bb4db058edea2146 i think this should be added to the module, but tracking separately from the main bug. this doesn't need to stop the core of the module from being reviewed and landing.
Comment 1•14 years ago
|
||
Somehow my attempt to put some initial image support failed. What I did is the attached. But it failed before the switch "image/png" condition. So if you simply add the flavors support you perhaps will see the problem I got - no data is there for image/png.
Comment 2•14 years ago
|
||
Ok the problem I had was related to the fact I was using: clip.set("string test"); //before doing a clip.get("image"); I have not checked why, but the set somehow erased the image that was in the clipboard before. This can be something else to look. Now I removed, from the testcase, the clip.set("string") and it worked, But I had to use window.btoa to get the base64 data bits. Would you know what is the Component that gives me the base64 encoding so I dont have to call btoa over a window object? Or do you know if the window util Jetpack function could give us the btoa function access directly? Right now in the test I did I had to use the window mediator to get a reference to a very first window just to use btoa which seems to be overboard.
Comment 3•14 years ago
|
||
Module which returns data as base64 using window.btoa.
Reporter | ||
Comment 4•14 years ago
|
||
Converted the changes into a patch, now that the core clipboard API has landed. Do you have an example of usage that I could use to make an automated test?
Attachment #464888 -
Attachment is obsolete: true
Attachment #466616 -
Attachment is obsolete: true
Comment 5•14 years ago
|
||
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product. To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
Comment 6•13 years ago
|
||
Dietrich: can you come up with an automated test without Marcio's response? It'd be useful to get this in anyway.
Priority: -- → P2
Target Milestone: --- → 1.0
Comment 7•13 years ago
|
||
Myk, Dietrich, This was the test I was using, which is an inline image: https://github.com/taboca/addon-sdk/commit/0f0495757bfe4144c4a08f08dc94b1ac7ba3174e But I noticed, with recent sync with upstream = git://github.com/mozilla/addon-sdk.git that clipboard.js does not have the image flavor. You probably have this staged somewhere else right?
Comment 8•13 years ago
|
||
And here are my changes to clipboard.js https://github.com/taboca/addon-sdk/commit/fc71a5b76a187c977e2d4998e7b2b0b64a223838 And here is my addon app: https://github.com/taboca/addon-sdk/commit/f58e30679f5341b4188dd5e4a1cda5aa5e585859
Comment 9•13 years ago
|
||
moved to a branch the reference to my test case https://github.com/taboca/addon-sdk/commits/clipboard
Comment 10•13 years ago
|
||
(automatic reprioritization of 1.0 bugs)
Priority: P2 → P1
Target Milestone: 1.0 → 1.1
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → zer0
Marking anything that potentially looks like a feature request as "enhancement", sorry for the bugspam. :)
Severity: normal → enhancement
Re-prioritizing all 1.1-targeted feature requests to 1.2.
Target Milestone: 1.1 → 1.2
(Pushing all open bugs to the --- milestone for the new triage system)
Target Milestone: 1.2 → ---
Assignee | ||
Comment 14•12 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Updated•12 years ago
|
Attachment #620993 -
Flags: review?(poirot.alex)
Comment 15•12 years ago
|
||
Comment on attachment 620993 [details] Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/427# Let's do another cycle on how atob/btoa are exposed. Feel free to split this patch in 3 pieces: - atob/btoa - dataurl - clipboard
Attachment #620993 -
Flags: review?(poirot.alex)
Comment 16•12 years ago
|
||
Comment on attachment 620993 [details] Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/427# Looks good now. You may add a last comment: https://github.com/mozilla/addon-sdk/pull/427#r801377 And improve this test: https://github.com/mozilla/addon-sdk/pull/427#r801868 Otherwise, it would be really great if you can land this in multiple pieces. We still haven't decided to improve our landing pratices, but it can help keeping a clean history by splitting this in 3 revisions: - Base64 - DataURL - Image support for clipboard Feel free to ping me if you want some git help.
Attachment #620993 -
Flags: review+
Comment 17•12 years ago
|
||
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/dc2616e7e804b77fddf492afcfc0312723326706 Merge remote-tracking branch 'upstream/master' into bug586047 Conflicts: packages/addon-kit/lib/clipboard.js packages/api-utils/lib/cuddlefish.js packages/api-utils/lib/message-manager.js https://github.com/mozilla/addon-sdk/commit/2e8aeb52eb17df58c7c2d78d8cc3f99de29d4cc9 Merge remote branch 'upstream/master' into bug586047 https://github.com/mozilla/addon-sdk/commit/3330c3eb5e20c9bbae2d1a516ddb6324387b6078 Merge pull request #427 from ZER0/bug586047 fix Bug 586047 - add image data support to the clipboard api r=@ochameau
Assignee | ||
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 18•12 years ago
|
||
Commits pushed to stabilization at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/dc2616e7e804b77fddf492afcfc0312723326706 Merge remote-tracking branch 'upstream/master' into bug586047 https://github.com/mozilla/addon-sdk/commit/2e8aeb52eb17df58c7c2d78d8cc3f99de29d4cc9 Merge remote branch 'upstream/master' into bug586047 https://github.com/mozilla/addon-sdk/commit/3330c3eb5e20c9bbae2d1a516ddb6324387b6078 Merge pull request #427 from ZER0/bug586047
You need to log in
before you can comment on or make changes to this bug.
Description
•