diff options
Diffstat (limited to 'WebCore/xml')
-rw-r--r-- | WebCore/xml/XMLHttpRequest.cpp | 16 | ||||
-rw-r--r-- | WebCore/xml/XMLHttpRequest.h | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp index 6103703..b0c7a87 100644 --- a/WebCore/xml/XMLHttpRequest.cpp +++ b/WebCore/xml/XMLHttpRequest.cpp @@ -586,6 +586,22 @@ void XMLHttpRequest::send(DOMFormData* body, ExceptionCode& ec) createRequest(ec); } +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) +void XMLHttpRequest::send(ArrayBuffer* body, ExceptionCode& ec) +{ + if (!initSend(ec)) + return; + + if (m_method != "GET" && m_method != "HEAD" && m_url.protocolInHTTPFamily()) { + m_requestEntityBody = FormData::create(body->data(), body->byteLength()); + if (m_upload) + m_requestEntityBody->setAlwaysStream(true); + } + + createRequest(ec); +} +#endif + void XMLHttpRequest::createRequest(ExceptionCode& ec) { #if ENABLE(BLOB) diff --git a/WebCore/xml/XMLHttpRequest.h b/WebCore/xml/XMLHttpRequest.h index 098e19f..bc6815d 100644 --- a/WebCore/xml/XMLHttpRequest.h +++ b/WebCore/xml/XMLHttpRequest.h @@ -94,6 +94,9 @@ public: void send(const String&, ExceptionCode&); void send(Blob*, ExceptionCode&); void send(DOMFormData*, ExceptionCode&); +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) + void send(ArrayBuffer*, ExceptionCode&); +#endif void abort(); void setRequestHeader(const AtomicString& name, const String& value, ExceptionCode&); void overrideMimeType(const String& override); |