Chromium Code Reviews| Index: Source/core/html/HTMLInputElement.cpp |
| diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
| index 7952c58f83be743b8803e9610ed433ab59f45558..9530c54deab42def39613fbcc6b11f3cc9a1160d 100644 |
| --- a/Source/core/html/HTMLInputElement.cpp |
| +++ b/Source/core/html/HTMLInputElement.cpp |
| @@ -909,6 +909,15 @@ 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()); |
| + size_t size = sourceElement.files()->length(); |
|
Inactive
2014/05/07 13:28:00
nit: "unsigned" (this is what FileList::length() r
gnana
2014/05/07 14:22:37
Done.
|
| + for (size_t i = 0; i < size; i++) { |
|
Inactive
2014/05/07 13:28:00
nit: ++i
nit: Use unsigned
gnana
2014/05/07 14:22:37
Done.
|
| + File* file = sourceElement.files()->item(i); |
|
Inactive
2014/05/07 13:28:00
HTMLInputElement::files() is not inlined so you mi
gnana
2014/05/07 14:22:37
Done.
|
| + fileList->append(File::createWithRelativePath(file->path(), file->webkitRelativePath())); |
| + } |
| + setFiles(fileList.release()); |
| + } |
| HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); |
| @@ -1319,7 +1328,7 @@ KURL HTMLInputElement::src() const |
| return document().completeURL(fastGetAttribute(srcAttr)); |
| } |
| -FileList* HTMLInputElement::files() |
| +FileList* HTMLInputElement::files() const |
| { |
| return m_inputType->files(); |
| } |