WKFileUploadPanel shouldn't depend on WebKitLegacy
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2018 09:45:57 +0000 (09:45 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2018 09:45:57 +0000 (09:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183981

Reviewed by Wenson Hsieh.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
Just use the underlying WebCore function instead of the
unnecessary NSFileManager category method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229949 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm

index 49fd313..b347850 100644 (file)
@@ -1,3 +1,15 @@
+2018-03-24  Tim Horton  <timothy_horton@apple.com>
+
+        WKFileUploadPanel shouldn't depend on WebKitLegacy
+        https://bugs.webkit.org/show_bug.cgi?id=183981
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/ios/forms/WKFileUploadPanel.mm:
+        (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
+        Just use the underlying WebCore function instead of the
+        unnecessary NSFileManager category method.
+
 2018-03-23  Tim Horton  <timothy_horton@apple.com>
 
         Fix the build with no pasteboard
index 02afc8f..d9ce32b 100644 (file)
@@ -42,7 +42,6 @@
 #import "WebPageProxy.h"
 #import <MobileCoreServices/MobileCoreServices.h>
 #import <WebCore/LocalizedStrings.h>
-#import <WebKit/WebNSFileManagerExtras.h>
 #import <wtf/RetainPtr.h>
 
 using namespace WebKit;
@@ -608,8 +607,7 @@ static NSArray *UTIsForMIMETypes(NSArray *mimeTypes)
     NSString * const kTemporaryDirectoryName = @"WKWebFileUpload";
 
     // Build temporary file path.
-    NSFileManager *fileManager = [NSFileManager defaultManager];
-    NSString *temporaryDirectory = [fileManager _webkit_createTemporaryDirectoryWithTemplatePrefix:kTemporaryDirectoryName];
+    NSString *temporaryDirectory = WebCore::FileSystem::createTemporaryDirectory(kTemporaryDirectoryName);
     NSString *filePath = [temporaryDirectory stringByAppendingPathComponent:imageName];
     if (!filePath) {
         LOG_ERROR("WKFileUploadPanel: Failed to create temporary directory to save image");