[WK2][Soup] Use didReceiveBuffer instead of didReceiveData
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Dec 2013 14:10:18 +0000 (14:10 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Dec 2013 14:10:18 +0000 (14:10 +0000)
commited3782f344a48a6c413cff262051b94ce3ad26db
tree74b528a95ec9812042f5e394dfb501a9e6764ea3
parent5fd4d2bffa68eb77a13c6c5e01a5fd958d38ba62
[WK2][Soup] Use didReceiveBuffer instead of didReceiveData
https://bugs.webkit.org/show_bug.cgi?id=118598

Reviewed by Gustavo Noronha Silva.

Original patch by Kwang Yul Seo  <skyul@company100.net> and Csaba Osztrogonác  <ossy@webkit.org>.

Switch from using didReceiveData to didReceiveBuffer for the Soup backend and
let SharedBuffer wrap a SoupBuffer. This is necessary because the NetworkProcess
only supports getting data via SharedBuffer.

Source/WebCore:

* GNUmakefile.list.am: Add the new SharedBufferSoup.cpp file to the list.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformNix.cmake:
* platform/SharedBuffer.cpp: We no longer used the no-op version of the platformFoo methods.
* platform/SharedBuffer.h: Ditto.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:  Use didReceiveBuffer instead of didReceiveData.
* platform/network/ResourceHandleInternal.h: Have only a m_soupBuffer member instead of three to manage the buffer.
* platform/network/soup/GOwnPtrSoup.cpp: Add support for SoupBuffer.
* platform/network/soup/GOwnPtrSoup.h: Ditto.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::WebCoreSynchronousLoader::didReceiveData): ASSERT_NOT_REACHED here, since it should never be
called now.
(WebCore::WebCoreSynchronousLoader::didReceiveBuffer): Handle this call properly.
(WebCore::ResourceHandle::ensureReadBuffer): Now we package up our buffer into a SoupBuffer.
(WebCore::redirectSkipCallback): Use the new m_soupBuffer member.
(WebCore::cleanupSoupRequestOperation): Ditto.
(WebCore::nextMultipartResponsePartCallback): Ditto.
(WebCore::sendRequestCallback): Ditto.
(WebCore::readCallback):
* platform/soup/SharedBufferSoup.cpp: Added.

Source/WebKit/gtk:

* webkit/webkitdownload.cpp:
(DownloadClient::didReceiveData): Replace with ASSERT_NOT_REACHED.
(DownloadClient::didReceiveBuffer): Use this to process incoming data.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformNix.cmake
Source/WebCore/platform/SharedBuffer.cpp
Source/WebCore/platform/SharedBuffer.h
Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
Source/WebCore/platform/network/ResourceHandleInternal.h
Source/WebCore/platform/network/soup/GOwnPtrSoup.cpp
Source/WebCore/platform/network/soup/GOwnPtrSoup.h
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Source/WebCore/platform/soup/SharedBufferSoup.cpp [new file with mode: 0644]
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitdownload.cpp