Use a Variant for FormDataElement
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2018 22:50:36 +0000 (22:50 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2018 22:50:36 +0000 (22:50 +0000)
commit02952fcd89f0f21ecbf7b4ec6820964635e3ad4b
tree97015b17750ed60862a579d8b52566effc2901c6
parentf184ded010b975359987d96c130e86a979bd7fec
Use a Variant for FormDataElement
https://bugs.webkit.org/show_bug.cgi?id=189777

Reviewed by Chris Dumez.

Source/WebCore:

* platform/network/FormData.cpp:
(WebCore::FormData::FormData):
(WebCore::FormDataElement::lengthInBytes const):
(WebCore::FormDataElement::isolatedCopy const):
(WebCore::FormData::appendData):
(WebCore::FormData::flatten const):
(WebCore::FormData::resolveBlobReferences):
(WebCore::FormData::generateFiles):
(WebCore::FormData::hasGeneratedFiles const):
(WebCore::FormData::hasOwnedGeneratedFiles const):
(WebCore::FormData::removeGeneratedFilesIfNeeded):
(WebCore::FormData::asSharedBuffer const):
(WebCore::FormData::asBlobURL const):
(WebCore::FormData::expandDataStore): Deleted.
* platform/network/FormData.h:
(WebCore::FormDataElement::FormDataElement):
(WebCore::FormDataElement::encode const):
(WebCore::FormDataElement::decode):
(WebCore::FormDataElement::EncodedFileData::isolatedCopy const):
(WebCore::FormDataElement::EncodedFileData::operator== const):
(WebCore::FormDataElement::EncodedFileData::encode const):
(WebCore::FormDataElement::EncodedFileData::decode):
(WebCore::FormDataElement::EncodedBlobData::operator== const):
(WebCore::FormDataElement::EncodedBlobData::encode const):
(WebCore::FormDataElement::EncodedBlobData::decode):
(WebCore::FormDataElement::operator== const):
(WebCore::FormDataElement::operator!= const):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::advanceCurrentStream):
(WebCore::createHTTPBodyCFReadStream):
(WebCore::setHTTPBody):
* platform/network/curl/CurlFormDataStream.cpp:
(WebCore::CurlFormDataStream::computeContentLength):
(WebCore::CurlFormDataStream::read):
(WebCore::CurlFormDataStream::readFromFile):
(WebCore::CurlFormDataStream::readFromData):
* platform/network/curl/CurlFormDataStream.h:

Source/WebKit:

* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
* NetworkProcess/NetworkResourceLoader.cpp:
* Shared/SessionState.h:
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toHTTPBody):

Source/WebKitLegacy/win:

* WebMutableURLRequest.cpp:
(WebMutableURLRequest::setHTTPBody):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/platform/network/FormData.cpp
Source/WebCore/platform/network/FormData.h
Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp
Source/WebCore/platform/network/curl/CurlFormDataStream.cpp
Source/WebCore/platform/network/curl/CurlFormDataStream.h
Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp
Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit/Platform/IPC/SharedBufferDataReference.h
Source/WebKit/Shared/SessionState.h
Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebMutableURLRequest.cpp