Title: [243790] tags/Safari-608.1.13.5/Source/WebKit
- Revision
- 243790
- Author
- [email protected]
- Date
- 2019-04-02 23:23:44 -0700 (Tue, 02 Apr 2019)
Log Message
Cherry-pick r243485. rdar://problem/49083324
Regression(r242369) Trying to change profile picture on linked in shows file picker, not the image picker
https://bugs.webkit.org/show_bug.cgi?id=196205
<rdar://problem/49083324>
Reviewed by Geoffrey Garen.
Update our FileUploadPanel code on iOS to properly deal with the MIME types containing
wild cards (e.g. "image/*") that are defined in the HTML specification:
- https://html.spec.whatwg.org/multipage/input.html#attr-input-accept
Previously, we would fail to convert those to UTIs.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: tags/Safari-608.1.13.5/Source/WebKit/ChangeLog (243789 => 243790)
--- tags/Safari-608.1.13.5/Source/WebKit/ChangeLog 2019-04-03 06:19:25 UTC (rev 243789)
+++ tags/Safari-608.1.13.5/Source/WebKit/ChangeLog 2019-04-03 06:23:44 UTC (rev 243790)
@@ -1,3 +1,40 @@
+2019-04-02 Babak Shafiei <[email protected]>
+
+ Cherry-pick r243485. rdar://problem/49083324
+
+ Regression(r242369) Trying to change profile picture on linked in shows file picker, not the image picker
+ https://bugs.webkit.org/show_bug.cgi?id=196205
+ <rdar://problem/49083324>
+
+ Reviewed by Geoffrey Garen.
+
+ Update our FileUploadPanel code on iOS to properly deal with the MIME types containing
+ wild cards (e.g. "image/*") that are defined in the HTML specification:
+ - https://html.spec.whatwg.org/multipage/input.html#attr-input-accept
+
+ Previously, we would fail to convert those to UTIs.
+
+ * UIProcess/ios/forms/WKFileUploadPanel.mm:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-03-25 Chris Dumez <[email protected]>
+
+ Regression(r242369) Trying to change profile picture on linked in shows file picker, not the image picker
+ https://bugs.webkit.org/show_bug.cgi?id=196205
+ <rdar://problem/49083324>
+
+ Reviewed by Geoffrey Garen.
+
+ Update our FileUploadPanel code on iOS to properly deal with the MIME types containing
+ wild cards (e.g. "image/*") that are defined in the HTML specification:
+ - https://html.spec.whatwg.org/multipage/input.html#attr-input-accept
+
+ Previously, we would fail to convert those to UTIs.
+
+ * UIProcess/ios/forms/WKFileUploadPanel.mm:
+
2019-04-01 Alan Coon <[email protected]>
Cherry-pick r243684. rdar://problem/49454962
Modified: tags/Safari-608.1.13.5/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm (243789 => 243790)
--- tags/Safari-608.1.13.5/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2019-04-03 06:19:25 UTC (rev 243789)
+++ tags/Safari-608.1.13.5/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2019-04-03 06:23:44 UTC (rev 243790)
@@ -318,9 +318,17 @@
{
NSMutableSet *mediaTypes = [NSMutableSet set];
for (NSString *mimeType in mimeTypes) {
- auto uti = WebCore::UTIFromMIMEType(mimeType);
- if (!uti.isEmpty())
- [mediaTypes addObject:(__bridge NSString *)uti];
+ if ([mimeType caseInsensitiveCompare:@"image/*"] == NSOrderedSame)
+ [mediaTypes addObject:(__bridge NSString *)kUTTypeImage];
+ else if ([mimeType caseInsensitiveCompare:@"video/*"] == NSOrderedSame)
+ [mediaTypes addObject:(__bridge NSString *)kUTTypeMovie];
+ else if ([mimeType caseInsensitiveCompare:@"audio/*"] == NSOrderedSame)
+ [mediaTypes addObject:(__bridge NSString *)kUTTypeAudio];
+ else {
+ auto uti = WebCore::UTIFromMIMEType(mimeType);
+ if (!uti.isEmpty())
+ [mediaTypes addObject:(__bridge NSString *)uti];
+ }
}
return mediaTypes;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes