[QuickLook] Use case-insensitive comparison of preview MIME types
rdar://problem/33761159
Created attachment 317636 [details] Patch
Comment on attachment 317636 [details] Patch Attachment 317636 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4281452 New failing tests: quicklook/excel-macro-enabled.html
Created attachment 317667 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Created attachment 317674 [details] Patch
Created attachment 317676 [details] Patch
Comment on attachment 317676 [details] Patch Clearing flags on attachment: 317676 Committed r220456: <http://trac.webkit.org/changeset/220456>
All reviewed patches have been landed. Closing bug.
Comment on attachment 317636 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=317636&action=review > Source/WebCore/loader/ios/PreviewLoader.mm:211 > + static std::once_flag onceFlag; > + static NeverDestroyed<HashSet<String, ASCIICaseInsensitiveHash>> supportedMIMETypes; > + std::call_once(onceFlag, [] { > + for (NSString *mimeType in QLPreviewGetSupportedMIMETypesSet()) > + supportedMIMETypes.get().add(mimeType); > + }); The use of std::call_once here seems like overkill. It’s not safe to use a set of strings on multiple threads so we don’t need to be thread-safe, so we should just be able to use a lambda to initialize.