| Index: Source/core/html/HTMLInputElement.cpp
|
| diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
|
| index 7952c58f83be743b8803e9610ed433ab59f45558..913734697ee9f8ec6aa45e57fd066bbf4af68391 100644
|
| --- a/Source/core/html/HTMLInputElement.cpp
|
| +++ b/Source/core/html/HTMLInputElement.cpp
|
| @@ -909,6 +909,16 @@ void HTMLInputElement::copyNonAttributePropertiesFromElement(const Element& sour
|
| setChecked(sourceElement.m_isChecked);
|
| m_reflectsCheckedAttribute = sourceElement.m_reflectsCheckedAttribute;
|
| m_isIndeterminate = sourceElement.m_isIndeterminate;
|
| + if (isFileUpload()) {
|
| + 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());
|
| + }
|
|
|
| HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source);
|
|
|
| @@ -1319,7 +1329,7 @@ KURL HTMLInputElement::src() const
|
| return document().completeURL(fastGetAttribute(srcAttr));
|
| }
|
|
|
| -FileList* HTMLInputElement::files()
|
| +FileList* HTMLInputElement::files() const
|
| {
|
| return m_inputType->files();
|
| }
|
|
|