Commit 3d843d0c authored by tkent@chromium.org's avatar tkent@chromium.org

Rename DOMFormData to FormData.

DOMFormData was an implementatio of FormData IDL interface. New name matches to
the inteface.

This CL has no behavior changes.

BUG=528840
R=keishi@chromium.org

Review URL: https://codereview.chromium.org/1325893005 .

git-svn-id: svn://svn.chromium.org/blink/trunk@202021 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 27e3e53b
...@@ -2600,11 +2600,11 @@ ...@@ -2600,11 +2600,11 @@
'html/ClassList.h', 'html/ClassList.h',
'html/CrossOriginAttribute.cpp', 'html/CrossOriginAttribute.cpp',
'html/CrossOriginAttribute.h', 'html/CrossOriginAttribute.h',
'html/DOMFormData.cpp',
'html/DOMFormData.h',
'html/DocumentNameCollection.cpp', 'html/DocumentNameCollection.cpp',
'html/DocumentNameCollection.h', 'html/DocumentNameCollection.h',
'html/FormAssociatedElement.cpp', 'html/FormAssociatedElement.cpp',
'html/FormData.cpp',
'html/FormData.h',
'html/FormDataList.cpp', 'html/FormDataList.cpp',
'html/FormDataList.h', 'html/FormDataList.h',
'html/HTMLAllCollection.cpp', 'html/HTMLAllCollection.cpp',
...@@ -3799,7 +3799,7 @@ ...@@ -3799,7 +3799,7 @@
'frame/csp/CSPSourceListTest.cpp', 'frame/csp/CSPSourceListTest.cpp',
'frame/csp/CSPSourceTest.cpp', 'frame/csp/CSPSourceTest.cpp',
'frame/csp/ContentSecurityPolicyTest.cpp', 'frame/csp/ContentSecurityPolicyTest.cpp',
'html/DOMFormDataTest.cpp', 'html/FormDataTest.cpp',
'html/HTMLDimensionTest.cpp', 'html/HTMLDimensionTest.cpp',
'html/HTMLFormControlElementTest.cpp', 'html/HTMLFormControlElementTest.cpp',
'html/HTMLImageElementTest.cpp', 'html/HTMLImageElementTest.cpp',
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*/ */
#include "config.h" #include "config.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "core/fileapi/Blob.h" #include "core/fileapi/Blob.h"
#include "core/fileapi/File.h" #include "core/fileapi/File.h"
...@@ -42,9 +42,9 @@ namespace blink { ...@@ -42,9 +42,9 @@ namespace blink {
namespace { namespace {
class DOMFormDataIterationSource final : public PairIterable<String, FormDataEntryValue>::IterationSource { class FormDataIterationSource final : public PairIterable<String, FormDataEntryValue>::IterationSource {
public: public:
DOMFormDataIterationSource(DOMFormData* formData) : m_formData(formData), m_current(0) { } FormDataIterationSource(FormData* formData) : m_formData(formData), m_current(0) { }
bool next(ScriptState* scriptState, String& key, FormDataEntryValue& value, ExceptionState& exceptionState) override bool next(ScriptState* scriptState, String& key, FormDataEntryValue& value, ExceptionState& exceptionState) override
{ {
...@@ -69,19 +69,19 @@ public: ...@@ -69,19 +69,19 @@ public:
} }
private: private:
const Member<DOMFormData> m_formData; const Member<FormData> m_formData;
size_t m_current; size_t m_current;
}; };
} // namespace } // namespace
DOMFormData::DOMFormData(const WTF::TextEncoding& encoding) FormData::FormData(const WTF::TextEncoding& encoding)
: FormDataList(encoding) : FormDataList(encoding)
, m_opaque(false) , m_opaque(false)
{ {
} }
DOMFormData::DOMFormData(HTMLFormElement* form) FormData::FormData(HTMLFormElement* form)
: FormDataList(UTF8Encoding()) : FormDataList(UTF8Encoding())
, m_opaque(false) , m_opaque(false)
{ {
...@@ -95,12 +95,12 @@ DOMFormData::DOMFormData(HTMLFormElement* form) ...@@ -95,12 +95,12 @@ DOMFormData::DOMFormData(HTMLFormElement* form)
} }
} }
void DOMFormData::append(const String& name, const String& value) void FormData::append(const String& name, const String& value)
{ {
appendData(name, value); appendData(name, value);
} }
void DOMFormData::append(ExecutionContext* context, const String& name, Blob* blob, const String& filename) void FormData::append(ExecutionContext* context, const String& name, Blob* blob, const String& filename)
{ {
if (blob) { if (blob) {
if (blob->isFile()) { if (blob->isFile()) {
...@@ -120,7 +120,7 @@ void DOMFormData::append(ExecutionContext* context, const String& name, Blob* bl ...@@ -120,7 +120,7 @@ void DOMFormData::append(ExecutionContext* context, const String& name, Blob* bl
appendBlob(name, blob, filename); appendBlob(name, blob, filename);
} }
void DOMFormData::deleteEntry(const String& name) void FormData::deleteEntry(const String& name)
{ {
const CString keyData = encodeAndNormalize(name); const CString keyData = encodeAndNormalize(name);
size_t i = 0; size_t i = 0;
...@@ -133,7 +133,7 @@ void DOMFormData::deleteEntry(const String& name) ...@@ -133,7 +133,7 @@ void DOMFormData::deleteEntry(const String& name)
} }
} }
void DOMFormData::get(const String& name, FormDataEntryValue& result) void FormData::get(const String& name, FormDataEntryValue& result)
{ {
if (m_opaque) if (m_opaque)
return; return;
...@@ -151,7 +151,7 @@ void DOMFormData::get(const String& name, FormDataEntryValue& result) ...@@ -151,7 +151,7 @@ void DOMFormData::get(const String& name, FormDataEntryValue& result)
} }
} }
HeapVector<FormDataEntryValue> DOMFormData::getAll(const String& name) HeapVector<FormDataEntryValue> FormData::getAll(const String& name)
{ {
HeapVector<FormDataEntryValue> results; HeapVector<FormDataEntryValue> results;
...@@ -174,7 +174,7 @@ HeapVector<FormDataEntryValue> DOMFormData::getAll(const String& name) ...@@ -174,7 +174,7 @@ HeapVector<FormDataEntryValue> DOMFormData::getAll(const String& name)
return results; return results;
} }
bool DOMFormData::has(const String& name) bool FormData::has(const String& name)
{ {
if (m_opaque) if (m_opaque)
return false; return false;
...@@ -186,17 +186,17 @@ bool DOMFormData::has(const String& name) ...@@ -186,17 +186,17 @@ bool DOMFormData::has(const String& name)
return false; return false;
} }
void DOMFormData::set(const String& name, const String& value) void FormData::set(const String& name, const String& value)
{ {
setEntry(Item(encodeAndNormalize(name), encodeAndNormalize(value))); setEntry(Item(encodeAndNormalize(name), encodeAndNormalize(value)));
} }
void DOMFormData::set(const String& name, Blob* blob, const String& filename) void FormData::set(const String& name, Blob* blob, const String& filename)
{ {
setEntry(Item(encodeAndNormalize(name), blob, filename)); setEntry(Item(encodeAndNormalize(name), blob, filename));
} }
void DOMFormData::setEntry(const Item& item) void FormData::setEntry(const Item& item)
{ {
const CString keyData = item.key(); const CString keyData = item.key();
bool found = false; bool found = false;
...@@ -217,17 +217,17 @@ void DOMFormData::setEntry(const Item& item) ...@@ -217,17 +217,17 @@ void DOMFormData::setEntry(const Item& item)
return; return;
} }
String DOMFormData::decode(const CString& data) const String FormData::decode(const CString& data) const
{ {
return encoding().decode(data.data(), data.length()); return encoding().decode(data.data(), data.length());
} }
PairIterable<String, FormDataEntryValue>::IterationSource* DOMFormData::startIteration(ScriptState*, ExceptionState&) PairIterable<String, FormDataEntryValue>::IterationSource* FormData::startIteration(ScriptState*, ExceptionState&)
{ {
if (m_opaque) if (m_opaque)
return new DOMFormDataIterationSource(new DOMFormData(nullptr)); return new FormDataIterationSource(new FormData(nullptr));
return new DOMFormDataIterationSource(this); return new FormDataIterationSource(this);
} }
} // namespace blink } // namespace blink
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef DOMFormData_h #ifndef FormData_h
#define DOMFormData_h #define FormData_h
#include "bindings/core/v8/Iterable.h" #include "bindings/core/v8/Iterable.h"
#include "bindings/core/v8/ScriptState.h" #include "bindings/core/v8/ScriptState.h"
...@@ -51,18 +51,18 @@ class HTMLFormElement; ...@@ -51,18 +51,18 @@ class HTMLFormElement;
// Typedef from FormData.idl: // Typedef from FormData.idl:
typedef FileOrUSVString FormDataEntryValue; typedef FileOrUSVString FormDataEntryValue;
class CORE_EXPORT DOMFormData final : public FormDataList, public ScriptWrappable, public PairIterable<String, FormDataEntryValue> { class CORE_EXPORT FormData final : public FormDataList, public ScriptWrappable, public PairIterable<String, FormDataEntryValue> {
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
public: public:
static DOMFormData* create(HTMLFormElement* form = 0) static FormData* create(HTMLFormElement* form = 0)
{ {
return new DOMFormData(form); return new FormData(form);
} }
static DOMFormData* create(const WTF::TextEncoding& encoding) static FormData* create(const WTF::TextEncoding& encoding)
{ {
return new DOMFormData(encoding); return new FormData(encoding);
} }
// FormData interface. // FormData interface.
...@@ -81,8 +81,8 @@ public: ...@@ -81,8 +81,8 @@ public:
String decode(const CString& data) const; String decode(const CString& data) const;
private: private:
explicit DOMFormData(const WTF::TextEncoding&); explicit FormData(const WTF::TextEncoding&);
explicit DOMFormData(HTMLFormElement*); explicit FormData(HTMLFormElement*);
void setEntry(const Item&); void setEntry(const Item&);
IterationSource* startIteration(ScriptState*, ExceptionState&) override; IterationSource* startIteration(ScriptState*, ExceptionState&) override;
...@@ -91,4 +91,4 @@ private: ...@@ -91,4 +91,4 @@ private:
} // namespace blink } // namespace blink
#endif // DOMFormData_h #endif // FormData_h
...@@ -37,7 +37,6 @@ typedef (File or USVString) FormDataEntryValue; ...@@ -37,7 +37,6 @@ typedef (File or USVString) FormDataEntryValue;
Constructor(optional HTMLFormElement form), Constructor(optional HTMLFormElement form),
Exposed=(Window,Worker), Exposed=(Window,Worker),
GarbageCollected, GarbageCollected,
ImplementedAs=DOMFormData,
] interface FormData { ] interface FormData {
// TODO(philipj): The value argument should be FormDataEntryValue and there // TODO(philipj): The value argument should be FormDataEntryValue and there
// should be no optional filename argument. crbug.com/498790 // should be no optional filename argument. crbug.com/498790
......
...@@ -93,13 +93,13 @@ void FormDataList::appendKeyValuePairItemsTo(EncodedFormData* formData, const WT ...@@ -93,13 +93,13 @@ void FormDataList::appendKeyValuePairItemsTo(EncodedFormData* formData, const WT
// For file blob, use the filename (or relative path if it is present) as the name. // For file blob, use the filename (or relative path if it is present) as the name.
name = file->webkitRelativePath().isEmpty() ? file->name() : file->webkitRelativePath(); name = file->webkitRelativePath().isEmpty() ? file->name() : file->webkitRelativePath();
// If a filename is passed in DOMFormData.append(), use it // If a filename is passed in FormData.append(), use it
// instead of the file blob's name. // instead of the file blob's name.
if (!item.filename().isNull()) if (!item.filename().isNull())
name = item.filename(); name = item.filename();
} else { } else {
// For non-file blob, use the filename if it is passed in // For non-file blob, use the filename if it is passed in
// DOMFormData.append(). // FormData.append().
if (!item.filename().isNull()) if (!item.filename().isNull())
name = item.filename(); name = item.filename();
else else
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
namespace blink { namespace blink {
// TODO(tkent): Merge FormDataList into DOMFormData. // TODO(tkent): Merge FormDataList into FormData.
class CORE_EXPORT FormDataList : public GarbageCollected<FormDataList> { class CORE_EXPORT FormDataList : public GarbageCollected<FormDataList> {
public: public:
class Item { class Item {
......
...@@ -3,16 +3,15 @@ ...@@ -3,16 +3,15 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "config.h" #include "config.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "core/html/FormDataList.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
namespace blink { namespace blink {
TEST(DOMFormDataTest, opacityGet) TEST(FormDataTest, opacityGet)
{ {
DOMFormData* fd = DOMFormData::create(UTF8Encoding()); FormData* fd = FormData::create(UTF8Encoding());
fd->append("name1", "value1"); fd->append("name1", "value1");
FileOrUSVString result; FileOrUSVString result;
...@@ -37,9 +36,9 @@ TEST(DOMFormDataTest, opacityGet) ...@@ -37,9 +36,9 @@ TEST(DOMFormDataTest, opacityGet)
EXPECT_STREQ("value1", entry2.data().data()); EXPECT_STREQ("value1", entry2.data().data());
} }
TEST(DOMFormDataTest, opacityGetAll) TEST(FormDataTest, opacityGetAll)
{ {
DOMFormData* fd = DOMFormData::create(UTF8Encoding()); FormData* fd = FormData::create(UTF8Encoding());
fd->append("name1", "value1"); fd->append("name1", "value1");
HeapVector<FormDataEntryValue> results = fd->getAll("name1"); HeapVector<FormDataEntryValue> results = fd->getAll("name1");
...@@ -59,9 +58,9 @@ TEST(DOMFormDataTest, opacityGetAll) ...@@ -59,9 +58,9 @@ TEST(DOMFormDataTest, opacityGetAll)
EXPECT_EQ(1u, fd->size()); EXPECT_EQ(1u, fd->size());
} }
TEST(DOMFormDataTest, opacityHas) TEST(FormDataTest, opacityHas)
{ {
DOMFormData* fd = DOMFormData::create(UTF8Encoding()); FormData* fd = FormData::create(UTF8Encoding());
fd->append("name1", "value1"); fd->append("name1", "value1");
EXPECT_TRUE(fd->has("name1")); EXPECT_TRUE(fd->has("name1"));
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "core/fetch/ResourceFetcher.h" #include "core/fetch/ResourceFetcher.h"
#include "core/fileapi/File.h" #include "core/fileapi/File.h"
#include "core/frame/LocalFrame.h" #include "core/frame/LocalFrame.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "core/inspector/ConsoleMessage.h" #include "core/inspector/ConsoleMessage.h"
#include "core/loader/MixedContentChecker.h" #include "core/loader/MixedContentChecker.h"
#include "platform/exported/WrappedResourceRequest.h" #include "platform/exported/WrappedResourceRequest.h"
...@@ -37,12 +37,12 @@ protected: ...@@ -37,12 +37,12 @@ protected:
static unsigned long long beaconSize(const String&); static unsigned long long beaconSize(const String&);
static unsigned long long beaconSize(Blob*); static unsigned long long beaconSize(Blob*);
static unsigned long long beaconSize(PassRefPtr<DOMArrayBufferView>); static unsigned long long beaconSize(PassRefPtr<DOMArrayBufferView>);
static unsigned long long beaconSize(DOMFormData*); static unsigned long long beaconSize(FormData*);
static bool serialize(const String&, ResourceRequest&, int, int&); static bool serialize(const String&, ResourceRequest&, int, int&);
static bool serialize(Blob*, ResourceRequest&, int, int&); static bool serialize(Blob*, ResourceRequest&, int, int&);
static bool serialize(PassRefPtr<DOMArrayBufferView>, ResourceRequest&, int, int&); static bool serialize(PassRefPtr<DOMArrayBufferView>, ResourceRequest&, int, int&);
static bool serialize(DOMFormData*, ResourceRequest&, int, int&); static bool serialize(FormData*, ResourceRequest&, int, int&);
}; };
template<typename Payload> template<typename Payload>
...@@ -117,7 +117,7 @@ bool BeaconLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beac ...@@ -117,7 +117,7 @@ bool BeaconLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beac
return Sender::send(frame, allowance, beaconURL, beacon, payloadLength); return Sender::send(frame, allowance, beaconURL, beacon, payloadLength);
} }
bool BeaconLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beaconURL, DOMFormData* data, int& payloadLength) bool BeaconLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beaconURL, FormData* data, int& payloadLength)
{ {
BeaconData<decltype(data)> beacon(data); BeaconData<decltype(data)> beacon(data);
return Sender::send(frame, allowance, beaconURL, beacon, payloadLength); return Sender::send(frame, allowance, beaconURL, beacon, payloadLength);
...@@ -216,13 +216,13 @@ bool Beacon::serialize(PassRefPtr<DOMArrayBufferView> data, ResourceRequest& req ...@@ -216,13 +216,13 @@ bool Beacon::serialize(PassRefPtr<DOMArrayBufferView> data, ResourceRequest& req
return true; return true;
} }
unsigned long long Beacon::beaconSize(DOMFormData* data) unsigned long long Beacon::beaconSize(FormData*)
{ {
// DOMFormData's size cannot be determined until serialized. // FormData's size cannot be determined until serialized.
return 0; return 0;
} }
bool Beacon::serialize(DOMFormData* data, ResourceRequest& request, int allowance, int& payloadLength) bool Beacon::serialize(FormData* data, ResourceRequest& request, int allowance, int& payloadLength)
{ {
ASSERT(data); ASSERT(data);
RefPtr<EncodedFormData> entityBody = data->createMultiPartFormData(); RefPtr<EncodedFormData> entityBody = data->createMultiPartFormData();
......
...@@ -16,7 +16,7 @@ namespace blink { ...@@ -16,7 +16,7 @@ namespace blink {
class Blob; class Blob;
class DOMArrayBufferView; class DOMArrayBufferView;
class DOMFormData; class FormData;
class KURL; class KURL;
class LocalFrame; class LocalFrame;
class SecurityOrigin; class SecurityOrigin;
...@@ -32,7 +32,7 @@ public: ...@@ -32,7 +32,7 @@ public:
static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&); static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&);
static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtr<DOMArrayBufferView>, int&); static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtr<DOMArrayBufferView>, int&);
static bool sendBeacon(LocalFrame*, int, const KURL&, Blob*, int&); static bool sendBeacon(LocalFrame*, int, const KURL&, Blob*, int&);
static bool sendBeacon(LocalFrame*, int, const KURL&, DOMFormData*, int&); static bool sendBeacon(LocalFrame*, int, const KURL&, FormData*, int&);
private: private:
class Sender; class Sender;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "core/InputTypeNames.h" #include "core/InputTypeNames.h"
#include "core/dom/Document.h" #include "core/dom/Document.h"
#include "core/events/Event.h" #include "core/events/Event.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "core/html/HTMLFormControlElement.h" #include "core/html/HTMLFormControlElement.h"
#include "core/html/HTMLFormElement.h" #include "core/html/HTMLFormElement.h"
#include "core/html/HTMLInputElement.h" #include "core/html/HTMLInputElement.h"
...@@ -209,7 +209,7 @@ PassRefPtrWillBeRawPtr<FormSubmission> FormSubmission::create(HTMLFormElement* f ...@@ -209,7 +209,7 @@ PassRefPtrWillBeRawPtr<FormSubmission> FormSubmission::create(HTMLFormElement* f
} }
} }
WTF::TextEncoding dataEncoding = isMailtoForm ? UTF8Encoding() : FormDataEncoder::encodingFromAcceptCharset(copiedAttributes.acceptCharset(), document.charset(), document.defaultCharset()); WTF::TextEncoding dataEncoding = isMailtoForm ? UTF8Encoding() : FormDataEncoder::encodingFromAcceptCharset(copiedAttributes.acceptCharset(), document.charset(), document.defaultCharset());
DOMFormData* domFormData = DOMFormData::create(dataEncoding.encodingForFormSubmission()); FormData* domFormData = FormData::create(dataEncoding.encodingForFormSubmission());
bool containsPasswordData = false; bool containsPasswordData = false;
for (unsigned i = 0; i < form->associatedElements().size(); ++i) { for (unsigned i = 0; i < form->associatedElements().size(); ++i) {
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include "core/frame/Settings.h" #include "core/frame/Settings.h"
#include "core/frame/UseCounter.h" #include "core/frame/UseCounter.h"
#include "core/frame/csp/ContentSecurityPolicy.h" #include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "core/html/HTMLDocument.h" #include "core/html/HTMLDocument.h"
#include "core/html/parser/TextResourceDecoder.h" #include "core/html/parser/TextResourceDecoder.h"
#include "core/inspector/ConsoleMessage.h" #include "core/inspector/ConsoleMessage.h"
...@@ -782,9 +782,9 @@ void XMLHttpRequest::send(Blob* body, ExceptionState& exceptionState) ...@@ -782,9 +782,9 @@ void XMLHttpRequest::send(Blob* body, ExceptionState& exceptionState)
createRequest(httpBody.release(), exceptionState); createRequest(httpBody.release(), exceptionState);
} }
void XMLHttpRequest::send(DOMFormData* body, ExceptionState& exceptionState) void XMLHttpRequest::send(FormData* body, ExceptionState& exceptionState)
{ {
WTF_LOG(Network, "XMLHttpRequest %p send() DOMFormData %p", this, body); WTF_LOG(Network, "XMLHttpRequest %p send() FormData %p", this, body);
if (!initSend(exceptionState)) if (!initSend(exceptionState))
return; return;
......
...@@ -51,11 +51,11 @@ class Blob; ...@@ -51,11 +51,11 @@ class Blob;
class BlobDataHandle; class BlobDataHandle;
class DOMArrayBuffer; class DOMArrayBuffer;
class DOMArrayBufferView; class DOMArrayBufferView;
class DOMFormData;
class Document; class Document;
class DocumentParser; class DocumentParser;
class ExceptionState; class ExceptionState;
class ExecutionContext; class ExecutionContext;
class FormData;
class ScriptState; class ScriptState;
class SharedBuffer; class SharedBuffer;
class Stream; class Stream;
...@@ -206,7 +206,7 @@ private: ...@@ -206,7 +206,7 @@ private:
void send(Document*, ExceptionState&); void send(Document*, ExceptionState&);
void send(const String&, ExceptionState&); void send(const String&, ExceptionState&);
void send(Blob*, ExceptionState&); void send(Blob*, ExceptionState&);
void send(DOMFormData*, ExceptionState&); void send(FormData*, ExceptionState&);
void send(DOMArrayBuffer*, ExceptionState&); void send(DOMArrayBuffer*, ExceptionState&);
void send(DOMArrayBufferView*, ExceptionState&); void send(DOMArrayBufferView*, ExceptionState&);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "core/frame/Settings.h" #include "core/frame/Settings.h"
#include "core/frame/UseCounter.h" #include "core/frame/UseCounter.h"
#include "core/frame/csp/ContentSecurityPolicy.h" #include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "core/loader/BeaconLoader.h" #include "core/loader/BeaconLoader.h"
namespace blink { namespace blink {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "bindings/core/v8/Dictionary.h" #include "bindings/core/v8/Dictionary.h"
#include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExecutionContext.h" #include "core/dom/ExecutionContext.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "modules/credentialmanager/FormDataOptions.h" #include "modules/credentialmanager/FormDataOptions.h"
#include "modules/credentialmanager/PasswordCredentialData.h" #include "modules/credentialmanager/PasswordCredentialData.h"
#include "platform/credentialmanager/PlatformPasswordCredential.h" #include "platform/credentialmanager/PlatformPasswordCredential.h"
...@@ -41,9 +41,9 @@ PasswordCredential::PasswordCredential(const String& id, const String& password, ...@@ -41,9 +41,9 @@ PasswordCredential::PasswordCredential(const String& id, const String& password,
{ {
} }
DOMFormData* PasswordCredential::toFormData(ScriptState* scriptState, const FormDataOptions& options) FormData* PasswordCredential::toFormData(ScriptState* scriptState, const FormDataOptions& options)
{ {
DOMFormData* fd = DOMFormData::create(); FormData* fd = FormData::create();
String errorMessage; String errorMessage;
if (!scriptState->executionContext()->isPrivilegedContext(errorMessage)) if (!scriptState->executionContext()->isPrivilegedContext(errorMessage))
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
namespace blink { namespace blink {
class DOMFormData; class FormData;
class FormDataOptions; class FormDataOptions;
class PasswordCredentialData; class PasswordCredentialData;
class WebPasswordCredential; class WebPasswordCredential;
...@@ -25,7 +25,7 @@ public: ...@@ -25,7 +25,7 @@ public:
static PasswordCredential* create(WebPasswordCredential*); static PasswordCredential* create(WebPasswordCredential*);
// PasswordCredential.idl // PasswordCredential.idl
DOMFormData* toFormData(ScriptState*, const FormDataOptions&); FormData* toFormData(ScriptState*, const FormDataOptions&);
DECLARE_VIRTUAL_TRACE(); DECLARE_VIRTUAL_TRACE();
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
#include "modules/fetch/FetchFormDataConsumerHandle.h" #include "modules/fetch/FetchFormDataConsumerHandle.h"
#include "core/dom/DOMTypedArray.h" #include "core/dom/DOMTypedArray.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "core/html/FormDataList.h"
#include "core/loader/ThreadableLoader.h" #include "core/loader/ThreadableLoader.h"
#include "core/loader/ThreadableLoaderClient.h" #include "core/loader/ThreadableLoaderClient.h"
#include "core/testing/DummyPageHolder.h" #include "core/testing/DummyPageHolder.h"
...@@ -262,7 +261,7 @@ TEST_F(FetchFormDataConsumerHandleTest, DrainAsFormDataFromArrayBuffer) ...@@ -262,7 +261,7 @@ TEST_F(FetchFormDataConsumerHandleTest, DrainAsFormDataFromArrayBuffer)
TEST_F(FetchFormDataConsumerHandleTest, DrainAsFormDataFromSimpleFormData) TEST_F(FetchFormDataConsumerHandleTest, DrainAsFormDataFromSimpleFormData)
{ {
DOMFormData* data = DOMFormData::create(UTF8Encoding()); FormData* data = FormData::create(UTF8Encoding());
data->append("name1", "value1"); data->append("name1", "value1");
data->append("name2", "value2"); data->append("name2", "value2");
RefPtr<EncodedFormData> inputFormData = data->createMultiPartFormData(); RefPtr<EncodedFormData> inputFormData = data->createMultiPartFormData();
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "bindings/core/v8/V8Blob.h" #include "bindings/core/v8/V8Blob.h"
#include "bindings/core/v8/V8FormData.h" #include "bindings/core/v8/V8FormData.h"
#include "core/fileapi/Blob.h" #include "core/fileapi/Blob.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "modules/fetch/FetchBlobDataConsumerHandle.h" #include "modules/fetch/FetchBlobDataConsumerHandle.h"
#include "modules/fetch/FetchFormDataConsumerHandle.h" #include "modules/fetch/FetchFormDataConsumerHandle.h"
#include "modules/fetch/Headers.h" #include "modules/fetch/Headers.h"
...@@ -51,7 +51,7 @@ RequestInit::RequestInit(ExecutionContext* context, const Dictionary& options, E ...@@ -51,7 +51,7 @@ RequestInit::RequestInit(ExecutionContext* context, const Dictionary& options, E
contentType = blobDataHandle->type(); contentType = blobDataHandle->type();
body = FetchBlobDataConsumerHandle::create(context, blobDataHandle.release()); body = FetchBlobDataConsumerHandle::create(context, blobDataHandle.release());
} else if (V8FormData::hasInstance(v8Body, isolate)) { } else if (V8FormData::hasInstance(v8Body, isolate)) {
DOMFormData* domFormData = V8FormData::toImpl(v8::Local<v8::Object>::Cast(v8Body)); FormData* domFormData = V8FormData::toImpl(v8::Local<v8::Object>::Cast(v8Body));
opaque = domFormData->opaque(); opaque = domFormData->opaque();
RefPtr<EncodedFormData> formData = domFormData->createMultiPartFormData(); RefPtr<EncodedFormData> formData = domFormData->createMultiPartFormData();
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "core/dom/DOMArrayBuffer.h" #include "core/dom/DOMArrayBuffer.h"
#include "core/dom/DOMArrayBufferView.h" #include "core/dom/DOMArrayBufferView.h"
#include "core/fileapi/Blob.h" #include "core/fileapi/Blob.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "modules/fetch/BodyStreamBuffer.h" #include "modules/fetch/BodyStreamBuffer.h"
#include "modules/fetch/FetchBlobDataConsumerHandle.h" #include "modules/fetch/FetchBlobDataConsumerHandle.h"
#include "modules/fetch/ResponseInit.h" #include "modules/fetch/ResponseInit.h"
...@@ -130,7 +130,7 @@ Response* Response::create(ExecutionContext* context, const BodyInit& body, cons ...@@ -130,7 +130,7 @@ Response* Response::create(ExecutionContext* context, const BodyInit& body, cons
return create(context, blob, ResponseInit(responseInit, exceptionState), exceptionState); return create(context, blob, ResponseInit(responseInit, exceptionState), exceptionState);
} }
if (body.isFormData()) { if (body.isFormData()) {
DOMFormData* domFormData = body.getAsFormData(); FormData* domFormData = body.getAsFormData();
OwnPtr<BlobData> blobData = BlobData::create(); OwnPtr<BlobData> blobData = BlobData::create();
// FIXME: the same code exist in RequestInit::RequestInit(). // FIXME: the same code exist in RequestInit::RequestInit().
RefPtr<EncodedFormData> httpBody = domFormData->createMultiPartFormData(); RefPtr<EncodedFormData> httpBody = domFormData->createMultiPartFormData();
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "core/HTMLNames.h" #include "core/HTMLNames.h"
#include "core/InputTypeNames.h" #include "core/InputTypeNames.h"
#include "core/dom/Document.h" #include "core/dom/Document.h"
#include "core/html/DOMFormData.h" #include "core/html/FormData.h"
#include "core/html/HTMLFormControlElement.h" #include "core/html/HTMLFormControlElement.h"
#include "core/html/HTMLFormElement.h" #include "core/html/HTMLFormElement.h"
#include "core/html/HTMLInputElement.h" #include "core/html/HTMLInputElement.h"
...@@ -210,7 +210,7 @@ bool buildSearchString(const HTMLFormElement& form, Vector<char>* encodedString, ...@@ -210,7 +210,7 @@ bool buildSearchString(const HTMLFormElement& form, Vector<char>* encodedString,
if (control.isDisabledFormControl() || control.name().isNull()) if (control.isDisabledFormControl() || control.name().isNull())
continue; continue;
DOMFormData* formData = DOMFormData::create(encoding); FormData* formData = FormData::create(encoding);
if (!control.appendFormData(*formData, false)) if (!control.appendFormData(*formData, false))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment