Changeset 95120 in webkit
- Timestamp:
- Sep 14, 2011 2:03:20 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95117 r95120 1 2011-09-14 Anders Carlsson <andersca@apple.com> 2 3 Get rid of ResourceHandle::bufferedData() 4 https://bugs.webkit.org/show_bug.cgi?id=68112 5 6 Reviewed by David Hyatt. 7 8 ResourceHandle::bufferedData() was only implemented on Mac, and the support in the underlying 9 NSURLConnection class hasn't been there for several OS releases. 10 11 * loader/ResourceLoader.cpp: 12 (WebCore::ResourceLoader::resourceData): 13 (WebCore::ResourceLoader::addData): 14 * platform/network/ResourceHandle.h: 15 * platform/network/cf/ResourceHandleCFNet.cpp: 16 * platform/network/curl/ResourceHandleCurl.cpp: 17 * platform/network/mac/ResourceHandleMac.mm: 18 * platform/network/qt/ResourceHandleQt.cpp: 19 * platform/network/soup/ResourceHandleSoup.cpp: 20 * platform/network/win/ResourceHandleWin.cpp: 21 1 22 2011-09-14 Mark Hahnenberg <mhahnenberg@apple.com> 2 23 -
trunk/Source/WebCore/loader/ResourceLoader.cpp
r93923 r95120 50 50 PassRefPtr<SharedBuffer> ResourceLoader::resourceData() 51 51 { 52 if (m_resourceData) 53 return m_resourceData; 54 55 if (ResourceHandle::supportsBufferedData() && m_handle) 56 return m_handle->bufferedData(); 57 58 return 0; 52 return m_resourceData; 59 53 } 60 54 … … 203 197 } 204 198 205 if (ResourceHandle::supportsBufferedData()) { 206 // Buffer data only if the connection has handed us the data because is has stopped buffering it. 207 if (m_resourceData) 208 m_resourceData->append(data, length); 209 } else { 210 if (!m_resourceData) 211 m_resourceData = SharedBuffer::create(data, length); 212 else 213 m_resourceData->append(data, length); 214 } 199 if (!m_resourceData) 200 m_resourceData = SharedBuffer::create(data, length); 201 else 202 m_resourceData->append(data, length); 215 203 } 216 204 -
trunk/Source/WebCore/platform/network/ResourceHandle.h
r94358 r95120 159 159 #endif 160 160 161 PassRefPtr<SharedBuffer> bufferedData();162 static bool supportsBufferedData();163 164 161 bool shouldContentSniff() const; 165 162 static bool shouldContentSniffURL(const KURL&); -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r94358 r95120 527 527 } 528 528 529 PassRefPtr<SharedBuffer> ResourceHandle::bufferedData()530 {531 ASSERT_NOT_REACHED();532 return 0;533 }534 535 bool ResourceHandle::supportsBufferedData()536 {537 return false;538 }539 540 529 void ResourceHandle::willSendRequest(ResourceRequest& request, const ResourceResponse& redirectResponse) 541 530 { -
trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp
r84260 r95120 115 115 } 116 116 117 PassRefPtr<SharedBuffer> ResourceHandle::bufferedData()118 {119 return 0;120 }121 122 bool ResourceHandle::supportsBufferedData()123 {124 return false;125 }126 127 117 #if PLATFORM(WIN) && USE(CF) 128 118 static HashSet<String>& allowsAnyHTTPSCertificateHosts() -
trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
r94358 r95120 72 72 @end 73 73 74 @interface NSURLConnection (NSURLConnectionTigerPrivate)75 - (NSData *)_bufferedData;76 @end77 78 74 @interface NSURLConnection (Details) 79 75 -(id)_initWithRequest:(NSURLRequest *)request delegate:(id)delegate usesCache:(BOOL)usesCacheFlag maxContentLength:(long long)maxContentLength startImmediately:(BOOL)startImmediately connectionProperties:(NSDictionary *)connectionProperties; … … 373 369 [d->m_delegate.get() detachHandle]; 374 370 d->m_delegate = nil; 375 }376 377 bool ResourceHandle::supportsBufferedData()378 {379 static bool supportsBufferedData = [NSURLConnection instancesRespondToSelector:@selector(_bufferedData)];380 return supportsBufferedData;381 }382 383 PassRefPtr<SharedBuffer> ResourceHandle::bufferedData()384 {385 if (ResourceHandle::supportsBufferedData())386 return SharedBuffer::wrapNSData([d->m_connection.get() _bufferedData]);387 388 return 0;389 371 } 390 372 -
trunk/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp
r89213 r95120 151 151 } 152 152 153 bool ResourceHandle::supportsBufferedData()154 {155 return false;156 }157 158 PassRefPtr<SharedBuffer> ResourceHandle::bufferedData()159 {160 ASSERT_NOT_REACHED();161 return 0;162 }163 164 153 void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const ResourceRequest& request, StoredCredentials /*storedCredentials*/, ResourceError& error, ResourceResponse& response, Vector<char>& data) 165 154 { -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r92271 r95120 686 686 } 687 687 688 PassRefPtr<SharedBuffer> ResourceHandle::bufferedData()689 {690 ASSERT_NOT_REACHED();691 return 0;692 }693 694 bool ResourceHandle::supportsBufferedData()695 {696 return false;697 }698 699 688 void ResourceHandle::platformSetDefersLoading(bool defersLoading) 700 689 { -
trunk/Source/WebCore/platform/network/win/ResourceHandleWin.cpp
r84260 r95120 440 440 } 441 441 442 PassRefPtr<SharedBuffer> ResourceHandle::bufferedData() 443 { 444 ASSERT_NOT_REACHED(); 445 return 0; 446 } 447 448 bool ResourceHandle::supportsBufferedData() 442 bool ResourceHandle::loadsBlocked() 449 443 { 450 444 return false; 451 445 } 452 446 453 bool ResourceHandle::loadsBlocked()454 {455 return false;456 }457 458 447 void ResourceHandle::platformSetDefersLoading(bool) 459 448 {
Note: See TracChangeset
for help on using the changeset viewer.