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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@229949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 49fd313..b347850 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -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
diff --git a/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm b/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
index 02afc8f..d9ce32b 100644
--- a/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
+++ b/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
@@ -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 @@
     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");