r242369 started passing UTIs to -[UIImagePickerController setMediaTypes:] that correspond to types accepted by the file input element. However, UIImagePickerController expects a specific subset of UTIs. In the worst case, if no expected types are passed, this can cause a crash.
<rdar://problem/48788916>
Created attachment 365189 [details] Patch
Comment on attachment 365189 [details] Patch Attachment 365189 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11568797 New failing tests: imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
Created attachment 365206 [details] Archive of layout-test-results from ews104 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Crash appears unrelated; apparently we aren’t able to dynamically load a constant: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.WebCore 0x00000007080022f3 WTFCrashWithInfo(int, char const*, char const*, int) + 19 (Assertions.h:566) 1 com.apple.WebCore 0x00000007083e11a0 initAVEncoderBitRateKey() + 128 (MediaRecorderPrivateWriterCocoa.mm:55) which is: void* constant = dlsym(framework##Library(), #name); \ RELEASE_ASSERT_WITH_MESSAGE(constant, "%s", dlerror()); \
Comment on attachment 365189 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=365189&action=review > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:339 > + if (UTTypeConformsTo((CFStringRef)acceptedMediaType, (CFStringRef)availableMediaType)) { Nit - __bridge
Comment on attachment 365189 [details] Patch r=me
(In reply to Wenson Hsieh from comment #6) > Comment on attachment 365189 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=365189&action=review > > > Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:339 > > + if (UTTypeConformsTo((CFStringRef)acceptedMediaType, (CFStringRef)availableMediaType)) { > > Nit - __bridge Fixed. Thanks!
Committed r243168 M Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm M Source/WebKit/ChangeLog r243168 = d69c31b5ad59c2a303902c9e018ec617335702ed (refs/remotes/origin/master)