Bug 202647 - [Clipboard API] Refactor Pasteboard item reading functions to work on both iOS and macOS
Summary: [Clipboard API] Refactor Pasteboard item reading functions to work on both iO...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-07 12:29 PDT by Wenson Hsieh
Modified: 2019-10-09 18:48 PDT (History)
7 users (show)

See Also:


Attachments
WIP (61.93 KB, patch)
2019-10-08 15:29 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
WIP: Try to fix GTK/WPE builds (63.51 KB, patch)
2019-10-08 16:10 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (68.91 KB, patch)
2019-10-08 16:50 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
WIP: Try to fix WPE build (68.70 KB, patch)
2019-10-08 17:03 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
WIP: Try to fix WPE build again (68.94 KB, patch)
2019-10-08 17:37 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
WIP: Try to fix WPE build again (69.01 KB, patch)
2019-10-08 17:52 PDT, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
Patch for landing (69.02 KB, patch)
2019-10-09 17:40 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2019-10-07 12:29:15 PDT
These functions are currently only defined on iOS.
Comment 1 Wenson Hsieh 2019-10-08 15:29:27 PDT Comment hidden (obsolete)
Comment 2 Wenson Hsieh 2019-10-08 16:10:57 PDT Comment hidden (obsolete)
Comment 3 Wenson Hsieh 2019-10-08 16:50:42 PDT Comment hidden (obsolete)
Comment 4 Wenson Hsieh 2019-10-08 17:03:28 PDT Comment hidden (obsolete)
Comment 5 Wenson Hsieh 2019-10-08 17:37:38 PDT Comment hidden (obsolete)
Comment 6 Wenson Hsieh 2019-10-08 17:52:47 PDT
Created attachment 380487 [details]
WIP: Try to fix WPE build again
Comment 7 Tim Horton 2019-10-09 17:10:43 PDT
Comment on attachment 380487 [details]
WIP: Try to fix WPE build again

View in context: https://bugs.webkit.org/attachment.cgi?id=380487&action=review

> Source/WebCore/platform/mac/PlatformPasteboardMac.mm:387
> +static NSPasteboardType modernPasteboardTypeForWebSafeMIMEType(const String& webSafeType)

Surely we have the MIME type strings somewhere and can use those
Comment 8 Wenson Hsieh 2019-10-09 17:38:06 PDT
Comment on attachment 380487 [details]
WIP: Try to fix WPE build again

View in context: https://bugs.webkit.org/attachment.cgi?id=380487&action=review

Thanks for the review!

>> Source/WebCore/platform/mac/PlatformPasteboardMac.mm:387
>> +static NSPasteboardType modernPasteboardTypeForWebSafeMIMEType(const String& webSafeType)
> 
> Surely we have the MIME type strings somewhere and can use those

Interestingly, I couldn’t find anything that exposes these strings as constants (though I could imagine them on MIMETypeRegistry or something similar. Perhaps functions in a MIMETypes:: namespace?)

For now, I’ll change these string constants to ASCIILiterals instead. I filed webkit.org/b/202776 to track exposing something on MIMETypeRegistry...
Comment 9 Wenson Hsieh 2019-10-09 17:40:25 PDT
Created attachment 380594 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2019-10-09 18:27:22 PDT
Comment on attachment 380594 [details]
Patch for landing

Clearing flags on attachment: 380594

Committed r250950: <https://trac.webkit.org/changeset/250950>
Comment 11 Radar WebKit Bug Importer 2019-10-09 18:48:15 PDT
<rdar://problem/56139814>