Diff
Modified: trunk/Source/WTF/ChangeLog (133232 => 133233)
--- trunk/Source/WTF/ChangeLog 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WTF/ChangeLog 2012-11-01 22:29:23 UTC (rev 133233)
@@ -1,5 +1,13 @@
2012-11-01 Alexey Proskuryakov <a...@apple.com>
+ Rename HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) to USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+
+ Rubber-stamped by Joe Pecoraro.
+
+ All CFNetwork based platforms have this now, but not all use it at the moment.
+
+2012-11-01 Alexey Proskuryakov <a...@apple.com>
+
Fix HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) build
https://bugs.webkit.org/show_bug.cgi?id=100979
Modified: trunk/Source/WTF/wtf/Platform.h (133232 => 133233)
--- trunk/Source/WTF/wtf/Platform.h 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WTF/wtf/Platform.h 2012-11-01 22:29:23 UTC (rev 133233)
@@ -592,11 +592,11 @@
#define ENABLE_ORIENTATION_EVENTS 1
#define ENABLE_REPAINT_THROTTLING 1
#define ENABLE_WEB_ARCHIVE 1
-#define HAVE_NETWORK_CFDATA_ARRAY_CALLBACK 1 // FIXME: All CFNetwork based platforms have this callback now, so it should be USE, not HAVE.
#define HAVE_PTHREAD_RWLOCK 1
#define HAVE_READLINE 1
#define WTF_USE_CF 1
#define WTF_USE_CFNETWORK 1
+#define WTF_USE_NETWORK_CFDATA_ARRAY_CALLBACK 1
#define WTF_USE_PTHREADS 1
#if PLATFORM(IOS_SIMULATOR)
Modified: trunk/Source/WebCore/ChangeLog (133232 => 133233)
--- trunk/Source/WebCore/ChangeLog 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/ChangeLog 2012-11-01 22:29:23 UTC (rev 133233)
@@ -1,5 +1,31 @@
2012-11-01 Alexey Proskuryakov <a...@apple.com>
+ Rename HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) to USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+
+ Rubber-stamped by Joe Pecoraro.
+
+ All CFNetwork based platforms have this now, but not all use it at the moment.
+
+ * loader/ResourceLoader.h:
+ * loader/SubresourceLoader.h:
+ * loader/cf/SubresourceLoaderCF.cpp:
+ * loader/mac/ResourceLoaderMac.mm:
+ * platform/SharedBuffer.cpp:
+ (WebCore::SharedBuffer::clear):
+ (WebCore::SharedBuffer::buffer):
+ (WebCore::SharedBuffer::getSomeData):
+ * platform/SharedBuffer.h:
+ * platform/cf/SharedBufferCF.cpp:
+ * platform/network/ResourceHandle.h:
+ * platform/network/ResourceHandleClient.h:
+ (ResourceHandleClient):
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::willCacheResponse):
+ (WebCore::ResourceHandle::createCFURLConnection):
+ * platform/network/mac/ResourceHandleMac.mm:
+
+2012-11-01 Alexey Proskuryakov <a...@apple.com>
+
Fix HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) build
https://bugs.webkit.org/show_bug.cgi?id=100979
Modified: trunk/Source/WebCore/loader/ResourceLoader.h (133232 => 133233)
--- trunk/Source/WebCore/loader/ResourceLoader.h 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/loader/ResourceLoader.h 2012-11-01 22:29:23 UTC (rev 133233)
@@ -84,7 +84,7 @@
void willStopBufferingData(const char*, int);
virtual void didFinishLoading(double finishTime);
virtual void didFail(const ResourceError&);
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
virtual void didReceiveDataArray(CFArrayRef dataArray);
#endif
@@ -110,7 +110,7 @@
virtual bool shouldUseCredentialStorage(ResourceHandle*) { return shouldUseCredentialStorage(); }
virtual void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge& challenge) { didReceiveAuthenticationChallenge(challenge); }
virtual void didCancelAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge& challenge) { didCancelAuthenticationChallenge(challenge); }
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
virtual void didReceiveDataArray(ResourceHandle*, CFArrayRef dataArray);
#endif
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
Modified: trunk/Source/WebCore/loader/SubresourceLoader.h (133232 => 133233)
--- trunk/Source/WebCore/loader/SubresourceLoader.h 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/loader/SubresourceLoader.h 2012-11-01 22:29:23 UTC (rev 133233)
@@ -67,7 +67,7 @@
virtual void willCancel(const ResourceError&);
virtual void didCancel(const ResourceError&) { }
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
virtual bool supportsDataArray() { return true; }
virtual void didReceiveDataArray(CFArrayRef);
#endif
Modified: trunk/Source/WebCore/loader/cf/SubresourceLoaderCF.cpp (133232 => 133233)
--- trunk/Source/WebCore/loader/cf/SubresourceLoaderCF.cpp 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/loader/cf/SubresourceLoaderCF.cpp 2012-11-01 22:29:23 UTC (rev 133233)
@@ -27,7 +27,7 @@
namespace WebCore {
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
void SubresourceLoader::didReceiveDataArray(CFArrayRef dataArray)
{
// Reference the object in this method since the additional processing can do
Modified: trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm (133232 => 133233)
--- trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm 2012-11-01 22:29:23 UTC (rev 133233)
@@ -33,7 +33,7 @@
#include "FrameLoaderClient.h"
#include "ResourceHandle.h"
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
#include "InspectorInstrumentation.h"
#endif
@@ -68,7 +68,7 @@
#endif
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
void ResourceLoader::didReceiveDataArray(CFArrayRef dataArray)
{
Modified: trunk/Source/WebCore/platform/SharedBuffer.cpp (133232 => 133233)
--- trunk/Source/WebCore/platform/SharedBuffer.cpp 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/platform/SharedBuffer.cpp 2012-11-01 22:29:23 UTC (rev 133233)
@@ -202,7 +202,7 @@
m_buffer.clear();
m_purgeableBuffer.clear();
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
m_dataArray.clear();
#endif
}
@@ -244,7 +244,7 @@
freeSegment(m_segments[i]);
}
m_segments.clear();
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
copyDataArrayAndClear(destination, bytesLeft);
#endif
}
@@ -294,7 +294,7 @@
someData = m_segments[segment] + positionInSegment;
return segment == segments - 1 ? segmentedSize - position : segmentSize - positionInSegment;
}
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
ASSERT(maxSegmentedSize <= position);
position -= maxSegmentedSize;
return copySomeDataFromDataArray(someData, position);
Modified: trunk/Source/WebCore/platform/SharedBuffer.h (133232 => 133233)
--- trunk/Source/WebCore/platform/SharedBuffer.h 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/platform/SharedBuffer.h 2012-11-01 22:29:23 UTC (rev 133233)
@@ -89,7 +89,7 @@
const char* platformData() const;
unsigned platformDataSize() const;
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
void append(CFDataRef);
#endif
@@ -137,7 +137,7 @@
mutable Vector<char> m_buffer;
mutable Vector<char*> m_segments;
OwnPtr<PurgeableBuffer> m_purgeableBuffer;
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
mutable Vector<RetainPtr<CFDataRef> > m_dataArray;
void copyDataArrayAndClear(char *destination, unsigned bytesToCopy) const;
unsigned copySomeDataFromDataArray(const char*& someData, unsigned position) const;
Modified: trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp (133232 => 133233)
--- trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp 2012-11-01 22:29:23 UTC (rev 133233)
@@ -91,7 +91,7 @@
m_cfData = 0;
}
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
void SharedBuffer::append(CFDataRef data)
{
ASSERT(data);
Modified: trunk/Source/WebCore/platform/network/ResourceHandle.h (133232 => 133233)
--- trunk/Source/WebCore/platform/network/ResourceHandle.h 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.h 2012-11-01 22:29:23 UTC (rev 133233)
@@ -220,7 +220,7 @@
static CFStringRef synchronousLoadRunLoopMode();
#endif
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
void handleDataArray(CFArrayRef dataArray);
#endif
Modified: trunk/Source/WebCore/platform/network/ResourceHandleClient.h (133232 => 133233)
--- trunk/Source/WebCore/platform/network/ResourceHandleClient.h 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/platform/network/ResourceHandleClient.h 2012-11-01 22:29:23 UTC (rev 133233)
@@ -77,7 +77,7 @@
virtual void wasBlocked(ResourceHandle*) { }
virtual void cannotShowURL(ResourceHandle*) { }
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
virtual bool supportsDataArray() { return false; }
virtual void didReceiveDataArray(ResourceHandle*, CFArrayRef) { }
#endif
Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (133232 => 133233)
--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp 2012-11-01 22:29:23 UTC (rev 133233)
@@ -233,7 +233,7 @@
handle->client()->didReceiveResponse(handle, cfResponse);
}
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
static void didReceiveDataArray(CFURLConnectionRef conn, CFArrayRef dataArray, const void* clientInfo)
{
#if LOG_DISABLED
@@ -498,7 +498,7 @@
0,
#endif
0,
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
didReceiveDataArray
#else
0
@@ -911,7 +911,7 @@
#endif // USE(CFNETWORK)
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
void ResourceHandle::handleDataArray(CFArrayRef dataArray)
{
ASSERT(client());
Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (133232 => 133233)
--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2012-11-01 22:26:55 UTC (rev 133232)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2012-11-01 22:29:23 UTC (rev 133233)
@@ -786,7 +786,7 @@
m_handle->client()->didReceiveResponse(m_handle, r);
}
-#if HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
- (void)connection:(NSURLConnection *)connection didReceiveDataArray:(NSArray *)dataArray
{
UNUSED_PARAM(connection);