WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
195284
[iOS] Improve our file picker
https://bugs.webkit.org/show_bug.cgi?id=195284
Summary
[iOS] Improve our file picker
Chris Dumez
Reported
2019-03-04 10:11:55 PST
Improve our file picker on iOS.
Attachments
Patch
(14.13 KB, patch)
2019-03-04 10:26 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(14.76 KB, patch)
2019-03-04 11:43 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2019-03-04 10:12:09 PST
<
rdar://problem/45655856
>
Chris Dumez
Comment 2
2019-03-04 10:26:21 PST
Created
attachment 363523
[details]
Patch
Tim Horton
Comment 3
2019-03-04 10:45:48 PST
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?
Wenson Hsieh
Comment 4
2019-03-04 10:46:34 PST
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"?
Chris Dumez
Comment 5
2019-03-04 11:43:12 PST
Created
attachment 363532
[details]
Patch
WebKit Commit Bot
Comment 6
2019-03-04 12:21:06 PST
Comment on
attachment 363532
[details]
Patch Clearing flags on attachment: 363532 Committed
r242369
: <
https://trac.webkit.org/changeset/242369
>
WebKit Commit Bot
Comment 7
2019-03-04 12:21:07 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug