Improve our file picker on iOS.
<rdar://problem/45655856>
Created attachment 363523 [details] Patch
Comment on attachment 363523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363523&action=review > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:321 > + if (auto UTI = adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, (CFStringRef)mimeType, NULL))) Can this use UTIUtilities' UTIFromMIMEType?
Comment on attachment 363523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363523&action=review > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:60 > +static bool arrayContainsUTIThatConformsTo(NSArray* utis, CFStringRef conformToUTI) Nit - This type should be NSArray<NSString *> *. "utis" is also a bit of a strange variable name...perhaps "typeIdentifiers" or just "types"? > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:62 > + for (id uti in utis) { NSString * > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:63 > + if (UTTypeConformsTo((CFStringRef)uti, conformToUTI)) (__bridge CFStringRef) > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:322 > + [mediaTypes addObject:(NSString *)UTI.get()]; (__bridge NSString *) > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:363 > + NSArray *documentTypes = mediaTypes.count ? mediaTypes : @[@"public.item"]; Nit - This isn't new code, but maybe consider using the kUTTypeItem constant instead of @"public.item"?
Created attachment 363532 [details] Patch
Comment on attachment 363532 [details] Patch Clearing flags on attachment: 363532 Committed r242369: <https://trac.webkit.org/changeset/242369>
All reviewed patches have been landed. Closing bug.