-
psolanki@apple.com authored
Reviewed by David Kilzer. Implement -connection:didReceiveDataArray: NSURLConnection delegate method https://bugs.webkit.org/show_bug.cgi?id=56838 Add experimental support for the didReceiveDataArray callback on NSURLConnection. A RessourceHandleClient indicates its ability to handle this callback by returning true from supportsDataArray() method. Currently only SubresourceLoader uses this so we get the benefit for CSS, JS and image loads. For other clients we call didReceiveData with the CFData contents as before. * WebCore.xcodeproj/project.pbxproj: * loader/ResourceLoader.h: * loader/SubresourceLoader.h: (WebCore::SubresourceLoader::supportsDataArray): * loader/cf/SubresourceLoaderCF.cpp: Added. (WebCore::SubresourceLoader::didReceiveDataArray): * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::didReceiveDataArray): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::clear): (WebCore::SharedBuffer::buffer): * platform/SharedBuffer.h: * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::append): (WebCore::SharedBuffer::copyDataArrayAndClear): * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::supportsDataArray): (WebCore::ResourceHandleClient::didReceiveDataArray): * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
82da28fc