Changeset 263830 in webkit
- Timestamp:
- Jul 1, 2020, 8:08:57 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 31 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/fileapi/File.cpp (modified) (1 diff)
-
WebCore/fileapi/File.h (modified) (1 diff)
-
WebCore/fileapi/ThreadableBlobRegistry.cpp (modified) (1 diff)
-
WebCore/fileapi/ThreadableBlobRegistry.h (modified) (1 diff)
-
WebCore/html/DirectoryFileListCreator.cpp (modified) (1 diff)
-
WebCore/html/FileInputType.cpp (modified) (3 diffs)
-
WebCore/platform/FileChooser.cpp (modified) (3 diffs)
-
WebCore/platform/FileChooser.h (modified) (2 diffs)
-
WebCore/platform/network/BlobDataFileReference.cpp (modified) (4 diffs)
-
WebCore/platform/network/BlobDataFileReference.h (modified) (3 diffs)
-
WebCore/platform/network/BlobRegistry.h (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (modified) (3 diffs)
-
WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (modified) (1 diff)
-
WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (modified) (1 diff)
-
WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp (modified) (1 diff)
-
WebKit/Shared/BlobDataFileReferenceWithSandboxExtension.cpp (modified) (1 diff)
-
WebKit/Shared/BlobDataFileReferenceWithSandboxExtension.h (modified) (1 diff)
-
WebKit/UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp (modified) (2 diffs)
-
WebKit/WebProcess/FileAPI/BlobRegistryProxy.h (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebOpenPanelResultListener.cpp (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebOpenPanelResultListener.h (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebPage.h (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebPage.messages.in (modified) (1 diff)
-
WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm (modified) (1 diff)
-
WebKitLegacy/win/ChangeLog (modified) (1 diff)
-
WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r263829 r263830 1 2020-07-01 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 Allow the File object to be created with a replacement file 4 https://bugs.webkit.org/show_bug.cgi?id=213825 5 6 Reviewed by Darin Adler. 7 8 Working towards webkit.org/b/213347, it needs to be possible to create 9 the File object with an optional replacement file. Only the registered 10 BlobDataFileReference will be created with both the original file path 11 and the replacement file path. So it can delete the replacement file when 12 it is destroyed. Otherwise BlobDataFileReference will be created with the 13 replacement file path. 14 15 It is important to create the File object with the replacement file because 16 it needs to get the meta-data and the bytes of the replacement file not 17 the original file. 18 19 * fileapi/File.cpp: 20 (WebCore::File::create): 21 * fileapi/File.h: 22 * fileapi/ThreadableBlobRegistry.cpp: 23 (WebCore::ThreadableBlobRegistry::registerFileBlobURL): 24 * fileapi/ThreadableBlobRegistry.h: 25 * html/DirectoryFileListCreator.cpp: 26 (WebCore::createFileList): 27 * html/FileInputType.cpp: 28 (WebCore::FileInputType::filesFromFormControlState): 29 When the Files are created from a FormControlState, they will be created 30 without replacement files since they might have been deleted. 31 32 (WebCore::FileInputType::filesChosen): 33 (WebCore::FileInputType::receiveDroppedFiles): 34 * platform/FileChooser.cpp: 35 (WebCore::FileChooser::chooseFiles): 36 (WebCore::FileChooser::chooseMediaFiles): 37 * platform/FileChooser.h: 38 (WebCore::FileChooserFileInfo::isolatedCopy const): 39 (WebCore::FileChooser::chooseFiles): 40 (WebCore::FileChooserFileInfo::FileChooserFileInfo): Deleted. 41 * platform/network/BlobDataFileReference.cpp: 42 (WebCore::BlobDataFileReference::BlobDataFileReference): 43 (WebCore::BlobDataFileReference::~BlobDataFileReference): 44 (WebCore::BlobDataFileReference::path): 45 (WebCore::BlobDataFileReference::startTrackingModifications): 46 * platform/network/BlobDataFileReference.h: 47 * platform/network/BlobRegistry.h: 48 1 49 2020-07-01 Don Olmstead <don.olmstead@sony.com> 2 50 -
trunk/Source/WebCore/fileapi/File.cpp
r252349 r263830 47 47 } 48 48 49 Ref<File> File::create(const String& path, const String& nameOverride)49 Ref<File> File::create(const String& path, const String& replacementPath, const String& nameOverride) 50 50 { 51 51 String name; 52 52 String type; 53 computeNameAndContentType(path, nameOverride, name, type); 53 String effectivePath = !replacementPath.isNull() ? replacementPath : path; 54 computeNameAndContentType(effectivePath, nameOverride, name, type); 54 55 55 56 auto internalURL = BlobURL::createInternalURL(); 56 ThreadableBlobRegistry::registerFileBlobURL(internalURL, path, type);57 ThreadableBlobRegistry::registerFileBlobURL(internalURL, path, replacementPath, type); 57 58 58 return adoptRef(*new File(WTFMove(internalURL), WTFMove(type), String { path }, WTFMove(name)));59 return adoptRef(*new File(WTFMove(internalURL), WTFMove(type), WTFMove(effectivePath), WTFMove(name))); 59 60 } 60 61 -
trunk/Source/WebCore/fileapi/File.h
r250061 r263830 43 43 44 44 // Create a file with an optional name exposed to the author (via File.name and associated DOM properties) that differs from the one provided in the path. 45 WEBCORE_EXPORT static Ref<File> create(const String& path, const String& nameOverride = { });45 WEBCORE_EXPORT static Ref<File> create(const String& path, const String& replacementPath = { }, const String& nameOverride = { }); 46 46 47 47 // Create a File using the 'new File' constructor. -
trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp
r253544 r263830 65 65 } 66 66 67 void ThreadableBlobRegistry::registerFileBlobURL(const URL& url, const String& path, const String& contentType)67 void ThreadableBlobRegistry::registerFileBlobURL(const URL& url, const String& path, const String& replacementPath, const String& contentType) 68 68 { 69 String effectivePath = !replacementPath.isNull() ? replacementPath : path; 70 69 71 if (isMainThread()) { 70 blobRegistry().registerFileBlobURL(url, BlobDataFileReference::create( path), contentType);72 blobRegistry().registerFileBlobURL(url, BlobDataFileReference::create(effectivePath), path, contentType); 71 73 return; 72 74 } 73 75 74 callOnMainThread([url = url.isolatedCopy(), path = path.isolatedCopy(), contentType = contentType.isolatedCopy()] {75 blobRegistry().registerFileBlobURL(url, BlobDataFileReference::create( path), contentType);76 callOnMainThread([url = url.isolatedCopy(), effectivePath = effectivePath.isolatedCopy(), path = path.isolatedCopy(), contentType = contentType.isolatedCopy()] { 77 blobRegistry().registerFileBlobURL(url, BlobDataFileReference::create(effectivePath), path, contentType); 76 78 }); 77 79 } -
trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.h
r250287 r263830 41 41 class ThreadableBlobRegistry { 42 42 public: 43 static void registerFileBlobURL(const URL&, const String& path, const String& contentType);43 static void registerFileBlobURL(const URL&, const String& path, const String& replacementPath, const String& contentType); 44 44 static void registerBlobURL(const URL&, Vector<BlobPart>&& blobParts, const String& contentType); 45 45 static void registerBlobURL(SecurityOrigin*, const URL&, const URL& srcURL); -
trunk/Source/WebCore/html/DirectoryFileListCreator.cpp
r263129 r263830 65 65 appendDirectoryFiles(info.path, FileSystem::pathGetFileName(info.path), fileObjects); 66 66 else 67 fileObjects.append(File::create(info.path, info.displayName));67 fileObjects.append(File::create(info.path, { }, info.displayName)); 68 68 } 69 69 return FileList::create(WTFMove(fileObjects)); -
trunk/Source/WebCore/html/FileInputType.cpp
r263129 r263830 116 116 size_t size = state.size(); 117 117 files.reserveInitialCapacity(size / 2); 118 for (size_t i = 0; i < size; i += 2) { 119 if (!state[i + 1].isEmpty()) 120 files.uncheckedAppend({ state[i], state[i + 1] }); 121 else 122 files.uncheckedAppend({ state[i] }); 123 } 118 for (size_t i = 0; i < size; i += 2) 119 files.uncheckedAppend({ state[i], { }, state[i + 1] }); 124 120 return files; 125 121 } … … 415 411 if (!allowsDirectories()) { 416 412 auto files = paths.map([](auto& fileInfo) { 417 return File::create(fileInfo.path, fileInfo. displayName);413 return File::create(fileInfo.path, fileInfo.replacementPath, fileInfo.displayName); 418 414 }); 419 415 didCreateFileList(FileList::create(WTFMove(files)), icon); … … 470 466 files.reserveInitialCapacity(paths.size()); 471 467 for (auto& path : paths) 472 files.uncheckedAppend({ path });468 files.uncheckedAppend({ path, { }, { } }); 473 469 474 470 filesChosen(files); 475 471 } else 476 filesChosen({ FileChooserFileInfo { paths[0]} });472 filesChosen({ { paths[0], { }, { } } }); 477 473 478 474 return true; -
trunk/Source/WebCore/platform/FileChooser.cpp
r237266 r263830 59 59 } 60 60 61 void FileChooser::chooseFiles(const Vector<String>& filenames )61 void FileChooser::chooseFiles(const Vector<String>& filenames, const Vector<String>& replacementNames) 62 62 { 63 63 // FIXME: This is inelegant. We should not be looking at settings here. … … 69 69 70 70 Vector<FileChooserFileInfo> files; 71 for ( auto& filename : filenames)72 files.append( FileChooserFileInfo(filename));71 for (size_t i = 0, size = filenames.size(); i < size; ++i) 72 files.append({ filenames[i], i < replacementNames.size() ? replacementNames[i] : nullString(), { } }); 73 73 m_client->filesChosen(files); 74 74 } … … 89 89 Vector<FileChooserFileInfo> files; 90 90 for (auto& filename : filenames) 91 files.append( FileChooserFileInfo(filename));91 files.append({ filename, { }, { } }); 92 92 m_client->filesChosen(files, displayString, icon); 93 93 } -
trunk/Source/WebCore/platform/FileChooser.h
r262933 r263830 47 47 48 48 struct FileChooserFileInfo { 49 FileChooserFileInfo(const String& path, const String& displayName = String())50 : path(path)51 , displayName(displayName)52 {53 }54 55 49 FileChooserFileInfo isolatedCopy() const 56 50 { 57 return { path.isolatedCopy(), displayName.isolatedCopy() };51 return { path.isolatedCopy(), replacementPath.isolatedCopy(), displayName.isolatedCopy() }; 58 52 } 59 53 60 54 const String path; 55 const String replacementPath; 61 56 const String displayName; 62 57 }; … … 88 83 89 84 WEBCORE_EXPORT void chooseFile(const String& path); 90 WEBCORE_EXPORT void chooseFiles(const Vector<String>& paths );85 WEBCORE_EXPORT void chooseFiles(const Vector<String>& paths, const Vector<String>& replacementPaths = { }); 91 86 #if PLATFORM(IOS_FAMILY) 92 87 // FIXME: This function is almost identical to FileChooser::chooseFiles(). We should merge this -
trunk/Source/WebCore/platform/network/BlobDataFileReference.cpp
r240437 r263830 33 33 namespace WebCore { 34 34 35 BlobDataFileReference::BlobDataFileReference(const String& path )35 BlobDataFileReference::BlobDataFileReference(const String& path, const String& replacementPath) 36 36 : m_path(path) 37 , m_replacementPath(replacementPath) 37 38 { 38 39 } … … 40 41 BlobDataFileReference::~BlobDataFileReference() 41 42 { 42 #if ENABLE(FILE_REPLACEMENT)43 43 if (!m_replacementPath.isNull()) 44 44 FileSystem::deleteFile(m_replacementPath); 45 #endif46 45 } 47 46 … … 51 50 if (m_replacementShouldBeGenerated) 52 51 generateReplacementFile(); 53 52 #endif 54 53 if (!m_replacementPath.isNull()) 55 54 return m_replacementPath; 56 #endif57 55 58 56 return m_path; … … 102 100 #endif 103 101 102 // This is a registered blob with a replacement file. Get the Metadata of the replacement file. 103 if (!m_replacementPath.isNull()) { 104 metadata = FileSystem::fileMetadataFollowingSymlinks(m_replacementPath); 105 if (!metadata) 106 return; 107 } 108 104 109 m_size = metadata.value().length; 105 110 } -
trunk/Source/WebCore/platform/network/BlobDataFileReference.h
r239427 r263830 36 36 class WEBCORE_EXPORT BlobDataFileReference : public RefCounted<BlobDataFileReference> { 37 37 public: 38 static Ref<BlobDataFileReference> create(const String& path )38 static Ref<BlobDataFileReference> create(const String& path, const String& replacementPath = { }) 39 39 { 40 return adoptRef(*new BlobDataFileReference(path ));40 return adoptRef(*new BlobDataFileReference(path, replacementPath)); 41 41 } 42 42 … … 53 53 54 54 protected: 55 BlobDataFileReference(const String& path );55 BlobDataFileReference(const String& path, const String& replacementPath); 56 56 57 57 private: … … 61 61 62 62 String m_path; 63 String m_replacementPath; 63 64 #if ENABLE(FILE_REPLACEMENT) 64 String m_replacementPath;65 65 bool m_replacementShouldBeGenerated { false }; 66 66 #endif -
trunk/Source/WebCore/platform/network/BlobRegistry.h
r250061 r263830 48 48 49 49 // Registers a blob URL referring to the specified file. 50 virtual void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& contentType) = 0;50 virtual void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& path, const String& contentType) = 0; 51 51 52 52 // Registers a blob URL referring to the specified blob data. -
trunk/Source/WebKit/ChangeLog
r263825 r263830 1 2020-07-01 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 Allow the File object to be created with a replacement file 4 https://bugs.webkit.org/show_bug.cgi?id=213825 5 6 Reviewed by Darin Adler. 7 8 The UIProcess passes a list of strings which represents the replacement 9 paths along with a list to the original paths to the WebProcess. The 10 WebProcess passes these two list to FileChooser which creates the File 11 objects and register the Blobs. 12 13 The WebProcess registers the Blobs in the NetworkProcess which creates 14 BlobDataFileReference objects with both the original path and the 15 replacement path. 16 17 The WebProcess unregisters the Blobs from the NetworkProcess which deletes 18 the corresponding BlobDataFileReference from its registry. Upon destroying 19 the BlobDataFileReference, the replacement file should be deleted. 20 21 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 22 (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL): 23 (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked): 24 * NetworkProcess/NetworkConnectionToWebProcess.h: 25 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 26 * NetworkProcess/NetworkProcessPlatformStrategies.cpp: 27 (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry): 28 * Shared/BlobDataFileReferenceWithSandboxExtension.cpp: 29 (WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension): 30 * Shared/BlobDataFileReferenceWithSandboxExtension.h: 31 * UIProcess/WebPageProxy.cpp: 32 (WebKit::WebPageProxy::didChooseFilesForOpenPanel): 33 * WebProcess/FileAPI/BlobRegistryProxy.cpp: 34 (WebKit::BlobRegistryProxy::registerFileBlobURL): 35 * WebProcess/FileAPI/BlobRegistryProxy.h: 36 * WebProcess/WebPage/WebOpenPanelResultListener.cpp: 37 (WebKit::WebOpenPanelResultListener::didChooseFiles): 38 * WebProcess/WebPage/WebOpenPanelResultListener.h: 39 * WebProcess/WebPage/WebPage.cpp: 40 (WebKit::WebPage::didChooseFilesForOpenPanel): 41 * WebProcess/WebPage/WebPage.h: 42 * WebProcess/WebPage/WebPage.messages.in: 43 1 44 2020-07-01 Tim Horton <timothy_horton@apple.com> 2 45 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
r263789 r263830 733 733 #endif 734 734 735 void NetworkConnectionToWebProcess::registerFileBlobURL(const URL& url, const String& path, SandboxExtension::Handle&& extensionHandle, const String& contentType)735 void NetworkConnectionToWebProcess::registerFileBlobURL(const URL& url, const String& path, const String& replacementPath, SandboxExtension::Handle&& extensionHandle, const String& contentType) 736 736 { 737 737 NETWORK_PROCESS_MESSAGE_CHECK(!url.isEmpty()); … … 741 741 return; 742 742 743 session->blobRegistry().registerFileBlobURL(url, BlobDataFileReferenceWithSandboxExtension::create(path, SandboxExtension::create(WTFMove(extensionHandle))), contentType);743 session->blobRegistry().registerFileBlobURL(url, BlobDataFileReferenceWithSandboxExtension::create(path, replacementPath, SandboxExtension::create(WTFMove(extensionHandle))), contentType); 744 744 } 745 745 … … 770 770 return; 771 771 772 session->blobRegistry().registerBlobURLOptionallyFileBacked(url, srcURL, BlobDataFileReferenceWithSandboxExtension::create(fileBackedPath , nullptr), contentType);772 session->blobRegistry().registerBlobURLOptionallyFileBacked(url, srcURL, BlobDataFileReferenceWithSandboxExtension::create(fileBackedPath), contentType); 773 773 } 774 774 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r262066 r263830 216 216 void deleteCookie(const URL&, const String& cookieName); 217 217 218 void registerFileBlobURL(const URL&, const String& path, SandboxExtension::Handle&&, const String& contentType);218 void registerFileBlobURL(const URL&, const String& path, const String& replacementPath, SandboxExtension::Handle&&, const String& contentType); 219 219 void registerBlobURL(const URL&, Vector<WebCore::BlobPart>&&, const String& contentType); 220 220 void registerBlobURLFromURL(const URL&, const URL& srcURL); -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
r262066 r263830 47 47 #endif 48 48 49 RegisterFileBlobURL(URL url, String path, WebKit::SandboxExtension::Handle extensionHandle, String contentType)49 RegisterFileBlobURL(URL url, String path, String replacementPath, WebKit::SandboxExtension::Handle extensionHandle, String contentType) 50 50 RegisterBlobURL(URL url, Vector<WebCore::BlobPart> blobParts, String contentType) 51 51 RegisterBlobURLFromURL(URL url, URL srcURL) -
trunk/Source/WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp
r257551 r263830 58 58 using namespace WebCore; 59 59 class EmptyBlobRegistry : public WebCore::BlobRegistry { 60 void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }60 void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& path, const String& contentType) final { ASSERT_NOT_REACHED(); } 61 61 void registerBlobURL(const URL&, Vector<BlobPart>&&, const String& contentType) final { ASSERT_NOT_REACHED(); } 62 62 void registerBlobURL(const URL&, const URL& srcURL) final { ASSERT_NOT_REACHED(); } -
trunk/Source/WebKit/Shared/BlobDataFileReferenceWithSandboxExtension.cpp
r216764 r263830 31 31 namespace WebKit { 32 32 33 BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension(const String& path, RefPtr<SandboxExtension>&& sandboxExtension)34 : BlobDataFileReference(path )33 BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension(const String& path, const String& replacementPath, RefPtr<SandboxExtension>&& sandboxExtension) 34 : BlobDataFileReference(path, replacementPath) 35 35 , m_sandboxExtension(WTFMove(sandboxExtension)) 36 36 { -
trunk/Source/WebKit/Shared/BlobDataFileReferenceWithSandboxExtension.h
r216764 r263830 35 35 class BlobDataFileReferenceWithSandboxExtension final : public WebCore::BlobDataFileReference { 36 36 public: 37 static Ref<BlobDataFileReference> create(const String& path, RefPtr<SandboxExtension>&& sandboxExtension)37 static Ref<BlobDataFileReference> create(const String& path, const String& replacementPath = { }, RefPtr<SandboxExtension>&& sandboxExtension = nullptr) 38 38 { 39 return adoptRef(*new BlobDataFileReferenceWithSandboxExtension(path, WTFMove(sandboxExtension)));39 return adoptRef(*new BlobDataFileReferenceWithSandboxExtension(path, replacementPath, WTFMove(sandboxExtension))); 40 40 } 41 41 42 42 private: 43 BlobDataFileReferenceWithSandboxExtension(const String& path, RefPtr<SandboxExtension>&&);43 BlobDataFileReferenceWithSandboxExtension(const String& path, const String& replacementPath, RefPtr<SandboxExtension>&&); 44 44 virtual ~BlobDataFileReferenceWithSandboxExtension(); 45 45 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r263825 r263830 6701 6701 #endif 6702 6702 6703 send(Messages::WebPage::DidChooseFilesForOpenPanel(fileURLs ));6703 send(Messages::WebPage::DidChooseFilesForOpenPanel(fileURLs, { })); 6704 6704 6705 6705 m_openPanelResultListener->invalidate(); -
trunk/Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp
r250061 r263830 37 37 using namespace WebCore; 38 38 39 void BlobRegistryProxy::registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& file, const String& contentType)39 void BlobRegistryProxy::registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& file, const String& path, const String& contentType) 40 40 { 41 41 SandboxExtension::Handle extensionHandle; … … 45 45 SandboxExtension::createHandle(file->path(), SandboxExtension::Type::ReadOnly, extensionHandle); 46 46 47 WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL(url, file->path(), extensionHandle, contentType), 0); 47 String replacementPath = path == file->path() ? nullString() : file->path(); 48 WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL(url, path, replacementPath, extensionHandle, contentType), 0); 48 49 } 49 50 -
trunk/Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h
r250061 r263830 32 32 class BlobRegistryProxy final : public WebCore::BlobRegistry { 33 33 public: 34 void registerFileBlobURL(const URL&, Ref<WebCore::BlobDataFileReference>&&, const String& contentType) final;34 void registerFileBlobURL(const URL&, Ref<WebCore::BlobDataFileReference>&&, const String& path, const String& contentType) final; 35 35 void registerBlobURL(const URL&, Vector<WebCore::BlobPart>&&, const String& contentType) final; 36 36 void registerBlobURL(const URL&, const URL& srcURL) final; -
trunk/Source/WebKit/WebProcess/WebPage/WebOpenPanelResultListener.cpp
r237266 r263830 47 47 } 48 48 49 void WebOpenPanelResultListener::didChooseFiles(const Vector<String>& files )49 void WebOpenPanelResultListener::didChooseFiles(const Vector<String>& files, const Vector<String>& replacementFiles) 50 50 { 51 m_fileChooser->chooseFiles(files );51 m_fileChooser->chooseFiles(files, replacementFiles); 52 52 } 53 53 -
trunk/Source/WebKit/WebProcess/WebPage/WebOpenPanelResultListener.h
r237266 r263830 45 45 46 46 void disconnectFromPage() { m_page = 0; } 47 void didChooseFiles(const Vector<String>& );47 void didChooseFiles(const Vector<String>& files, const Vector<String>& replacementFiles); 48 48 #if PLATFORM(IOS_FAMILY) 49 49 void didChooseFilesWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, WebCore::Icon*); -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r263819 r263830 4302 4302 #endif 4303 4303 4304 void WebPage::didChooseFilesForOpenPanel(const Vector<String>& files )4304 void WebPage::didChooseFilesForOpenPanel(const Vector<String>& files, const Vector<String>& replacementFiles) 4305 4305 { 4306 4306 if (!m_activeOpenPanelResultListener) 4307 4307 return; 4308 4308 4309 m_activeOpenPanelResultListener->didChooseFiles(files );4309 m_activeOpenPanelResultListener->didChooseFiles(files, replacementFiles); 4310 4310 m_activeOpenPanelResultListener = nullptr; 4311 4311 } -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r263819 r263830 1603 1603 #endif 1604 1604 1605 void didChooseFilesForOpenPanel(const Vector<String>& );1605 void didChooseFilesForOpenPanel(const Vector<String>& files, const Vector<String>& replacementFiles); 1606 1606 void didCancelForOpenPanel(); 1607 1607 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
r263498 r263830 344 344 DidChooseFilesForOpenPanelWithDisplayStringAndIcon(Vector<String> fileURLs, String displayString, IPC::DataReference iconData, WebKit::SandboxExtension::Handle frontboardServicesSandboxExtension, WebKit::SandboxExtension::Handle iconServicesSandboxExtension) 345 345 #endif 346 DidChooseFilesForOpenPanel(Vector<String> fileURLs )346 DidChooseFilesForOpenPanel(Vector<String> fileURLs, Vector<String> replacementURLs) 347 347 DidCancelForOpenPanel() 348 348 #if ENABLE(SANDBOX_EXTENSIONS) -
trunk/Source/WebKitLegacy/mac/ChangeLog
r263788 r263830 1 2020-07-01 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 Allow the File object to be created with a replacement file 4 https://bugs.webkit.org/show_bug.cgi?id=213825 5 6 Reviewed by Darin Adler. 7 8 * WebCoreSupport/WebPlatformStrategies.mm: 9 1 10 2020-06-30 Sam Weinig <weinig@apple.com> 2 11 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm
r259124 r263830 94 94 class WebBlobRegistry final : public BlobRegistry { 95 95 private: 96 void registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); }96 void registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& reference, const String&, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); } 97 97 void registerBlobURL(const URL& url, Vector<BlobPart>&& parts, const String& contentType) final { m_blobRegistry.registerBlobURL(url, WTFMove(parts), contentType); } 98 98 void registerBlobURL(const URL& url, const URL& srcURL) final { m_blobRegistry.registerBlobURL(url, srcURL); } -
trunk/Source/WebKitLegacy/win/ChangeLog
r263635 r263830 1 2020-07-01 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 Allow the File object to be created with a replacement file 4 https://bugs.webkit.org/show_bug.cgi?id=213825 5 6 Reviewed by Darin Adler. 7 8 * WebCoreSupport/WebPlatformStrategies.cpp: 9 1 10 2020-06-28 Geoffrey Garen <ggaren@apple.com> 2 11 -
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp
r257551 r263830 81 81 class WebBlobRegistry final : public BlobRegistry { 82 82 private: 83 void registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); }83 void registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& reference, const String&, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); } 84 84 void registerBlobURL(const URL& url, Vector<BlobPart>&& parts, const String& contentType) final { m_blobRegistry.registerBlobURL(url, WTFMove(parts), contentType); } 85 85 void registerBlobURL(const URL& url, const URL& srcURL) final { m_blobRegistry.registerBlobURL(url, srcURL); }
Note:
See TracChangeset
for help on using the changeset viewer.