⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243790 in webkit


Ignore:
Timestamp:
Apr 2, 2019, 11:23:44 PM (7 years ago)
Author:
bshafiei@apple.com
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:

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

Location:
tags/Safari-608.1.13.5/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/Safari-608.1.13.5/Source/WebKit/ChangeLog

    r243724 r243790  
     12019-04-02  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Cherry-pick r243485. rdar://problem/49083324
     4
     5    Regression(r242369) Trying to change profile picture on linked in shows file picker, not the image picker
     6    https://bugs.webkit.org/show_bug.cgi?id=196205
     7    <rdar://problem/49083324>
     8   
     9    Reviewed by Geoffrey Garen.
     10   
     11    Update our FileUploadPanel code on iOS to properly deal with the MIME types containing
     12    wild cards (e.g. "image/*") that are defined in the HTML specification:
     13    - https://html.spec.whatwg.org/multipage/input.html#attr-input-accept
     14   
     15    Previously, we would fail to convert those to UTIs.
     16   
     17    * UIProcess/ios/forms/WKFileUploadPanel.mm:
     18   
     19   
     20    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     21
     22    2019-03-25  Chris Dumez  <cdumez@apple.com>
     23
     24            Regression(r242369) Trying to change profile picture on linked in shows file picker, not the image picker
     25            https://bugs.webkit.org/show_bug.cgi?id=196205
     26            <rdar://problem/49083324>
     27
     28            Reviewed by Geoffrey Garen.
     29
     30            Update our FileUploadPanel code on iOS to properly deal with the MIME types containing
     31            wild cards (e.g. "image/*") that are defined in the HTML specification:
     32            - https://html.spec.whatwg.org/multipage/input.html#attr-input-accept
     33
     34            Previously, we would fail to convert those to UTIs.
     35
     36            * UIProcess/ios/forms/WKFileUploadPanel.mm:
     37
    1382019-04-01  Alan Coon  <alancoon@apple.com>
    239
  • tags/Safari-608.1.13.5/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm

    r243168 r243790  
    319319    NSMutableSet *mediaTypes = [NSMutableSet set];
    320320    for (NSString *mimeType in mimeTypes) {
    321         auto uti = WebCore::UTIFromMIMEType(mimeType);
    322         if (!uti.isEmpty())
    323             [mediaTypes addObject:(__bridge NSString *)uti];
     321        if ([mimeType caseInsensitiveCompare:@"image/*"] == NSOrderedSame)
     322            [mediaTypes addObject:(__bridge NSString *)kUTTypeImage];
     323        else if ([mimeType caseInsensitiveCompare:@"video/*"] == NSOrderedSame)
     324            [mediaTypes addObject:(__bridge NSString *)kUTTypeMovie];
     325        else if ([mimeType caseInsensitiveCompare:@"audio/*"] == NSOrderedSame)
     326            [mediaTypes addObject:(__bridge NSString *)kUTTypeAudio];
     327        else {
     328            auto uti = WebCore::UTIFromMIMEType(mimeType);
     329            if (!uti.isEmpty())
     330                [mediaTypes addObject:(__bridge NSString *)uti];
     331        }
    324332    }
    325333    return mediaTypes;
Note: See TracChangeset for help on using the changeset viewer.