Support passing optional filename when FormData.append() is used to
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Oct 2011 17:45:19 +0000 (17:45 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Oct 2011 17:45:19 +0000 (17:45 +0000)
commitda5c6cbdf821ea67915ad7cf8beb7a26b047c48b
treeb34d7c71287e3743a4874655e1cf51942e60072f
parentcb7ce9fd93d149f54a78312acb003bf083e58d85
Support passing optional filename when FormData.append() is used to
append a blob
https://bugs.webkit.org/show_bug.cgi?id=69885

Reviewed by David Levin.

Source/WebCore:

Covered by existing test with new test case added:
http/tests/local/formdata/send-form-data-with-sliced-file.html

* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::JSDOMFormData::append):
* bindings/v8/custom/V8DOMFormDataCustom.cpp:
(WebCore::V8DOMFormData::appendCallback):
* html/DOMFormData.cpp:
(WebCore::DOMFormData::append):
* html/DOMFormData.h:
* html/DOMFormData.idl:
* html/FormDataList.cpp:
(WebCore::FormDataList::appendBlob):
* html/FormDataList.h:
(WebCore::FormDataList::Item::Item):
(WebCore::FormDataList::Item::filename):
(WebCore::FormDataList::appendBlob):
* platform/network/FormData.cpp:
(WebCore::FormData::appendKeyValuePairItems):

LayoutTests:

* http/tests/local/formdata/resources/send-form-data-common.js:
(dumpResponse):
(sendFormData):
(testSendingFormData):
* http/tests/local/formdata/script-tests/send-form-data-with-sliced-file.js:
(runTest):
* http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/local/formdata/resources/send-form-data-common.js
LayoutTests/http/tests/local/formdata/script-tests/send-form-data-with-sliced-file.js
LayoutTests/http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp
Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp
Source/WebCore/html/DOMFormData.cpp
Source/WebCore/html/DOMFormData.h
Source/WebCore/html/DOMFormData.idl
Source/WebCore/html/FormDataList.cpp
Source/WebCore/html/FormDataList.h
Source/WebCore/platform/network/FormData.cpp