RESOLVED FIXED 212339
[Clipboard API] Support reading "image/png" on ClipboardItem
https://bugs.webkit.org/show_bug.cgi?id=212339
Summary [Clipboard API] Support reading "image/png" on ClipboardItem
Wenson Hsieh
Reported 2020-05-24 23:02:52 PDT
Support reading "image/png" on ClipboardItem
Attachments
For EWS (48.60 KB, patch)
2020-05-25 12:26 PDT, Wenson Hsieh
no flags
For EWS (47.00 KB, patch)
2020-05-25 12:26 PDT, Wenson Hsieh
no flags
For EWS (49.19 KB, patch)
2020-05-25 12:40 PDT, Wenson Hsieh
thorton: review+
Patch for landing (49.18 KB, patch)
2020-05-27 12:19 PDT, Wenson Hsieh
no flags
Radar WebKit Bug Importer
Comment 1 2020-05-24 23:03:18 PDT
Wenson Hsieh
Comment 2 2020-05-25 12:26:27 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 3 2020-05-25 12:26:47 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 4 2020-05-25 12:40:54 PDT
Tim Horton
Comment 5 2020-05-27 11:38:52 PDT
Comment on attachment 400216 [details] For EWS View in context: https://bugs.webkit.org/attachment.cgi?id=400216&action=review > Source/WebCore/Modules/async-clipboard/mac/ClipboardImageReaderMac.mm:41 > + if (auto bitmapData = retainPtr([image TIFFRepresentation])) { > + auto bitmapRepresentation = adoptNS([[NSBitmapImageRep alloc] initWithData:bitmapData.get()]); > + m_result = Blob::create(SharedBuffer::create([bitmapRepresentation representationUsingType:NSBitmapImageFileTypePNG properties:@{ }]), m_mimeType); I provided a potential alternative to this double-encode offline.
Wenson Hsieh
Comment 6 2020-05-27 11:40:12 PDT
Comment on attachment 400216 [details] For EWS View in context: https://bugs.webkit.org/attachment.cgi?id=400216&action=review >> Source/WebCore/Modules/async-clipboard/mac/ClipboardImageReaderMac.mm:41 >> + m_result = Blob::create(SharedBuffer::create([bitmapRepresentation representationUsingType:NSBitmapImageFileTypePNG properties:@{ }]), m_mimeType); > > I provided a potential alternative to this double-encode offline. 👍🏻 Giving it a try, thanks!
Wenson Hsieh
Comment 7 2020-05-27 12:19:13 PDT
Created attachment 400365 [details] Patch for landing
EWS
Comment 8 2020-05-27 12:50:46 PDT
Committed r262209: <https://trac.webkit.org/changeset/262209> All reviewed patches have been landed. Closing bug and clearing flags on attachment 400365 [details].
Note You need to log in before you can comment on or make changes to this bug.