Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Unified Diff: Source/core/html/forms/FileInputType.cpp

Issue 267713006: node.cloneNode() should clone the value of file upload elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/forms/FileInputType.h ('k') | Source/core/html/forms/InputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/FileInputType.cpp
diff --git a/Source/core/html/forms/FileInputType.cpp b/Source/core/html/forms/FileInputType.cpp
index 2fbd187fe9f51f9b7b297f30372ee804a9904432..06fb8de634d89e9b6fc7eed2bf0fcadb98e5fc46 100644
--- a/Source/core/html/forms/FileInputType.cpp
+++ b/Source/core/html/forms/FileInputType.cpp
@@ -360,6 +360,18 @@ String FileInputType::droppedFileSystemId()
return m_droppedFileSystemId;
}
+void FileInputType::copyNonAttributeProperties(const HTMLInputElement& sourceElement)
+{
+ RefPtrWillBeRawPtr<FileList> fileList(FileList::create());
+ FileList* sourceFileList = sourceElement.files();
+ unsigned size = sourceFileList->length();
+ for (unsigned i = 0; i < size; ++i) {
+ File* file = sourceFileList->item(i);
+ fileList->append(File::createWithRelativePath(file->path(), file->webkitRelativePath()));
+ }
+ setFiles(fileList.release());
+}
+
String FileInputType::defaultToolTip() const
{
FileList* fileList = m_fileList.get();
« no previous file with comments | « Source/core/html/forms/FileInputType.h ('k') | Source/core/html/forms/InputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698