Changeset 194378 in webkit
- Timestamp:
- Dec 22, 2015, 3:52:00 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 37 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r194377 r194378 1 2015-12-22 Andy Estes <aestes@apple.com> 2 3 [CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI 4 https://bugs.webkit.org/show_bug.cgi?id=152463 5 6 Reviewed by Alexey Proskuryakov. 7 8 Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward 9 declared in CFNetworkSPI.h. 10 11 Also removed some unused declarations and renamed ResourceResponseMac.mm to ResourceResponseCocoa.mm. 12 13 * PlatformMac.cmake: 14 * WebCore.xcodeproj/project.pbxproj: 15 * platform/ios/WebCoreSystemInterfaceIOS.mm: 16 * platform/mac/WebCoreSystemInterface.h: 17 * platform/mac/WebCoreSystemInterface.mm: 18 * platform/network/NetworkStorageSession.h: 19 * platform/network/cf/CredentialStorageCFNet.cpp: 20 (WebCore::copyCredentialFromProtectionSpace): 21 (WebCore::CredentialStorage::getFromPersistentStorage): 22 * platform/network/cf/NetworkStorageSessionCFNet.cpp: 23 (WebCore::NetworkStorageSession::cookieStorage): 24 * platform/network/cf/ResourceHandleCFNet.cpp: 25 (WebCore::ResourceHandle::createCFURLConnection): 26 * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: 27 (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest): 28 * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: 29 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): 30 * platform/network/cf/ResourceRequestCFNet.cpp: 31 (WebCore::ResourceRequest::doUpdatePlatformRequest): 32 (WebCore::ResourceRequest::doUpdateResourceRequest): 33 (WebCore::ResourceRequest::setStorageSession): 34 (WebCore::initializeMaximumHTTPConnectionCountPerHost): 35 (WebCore::initializeHTTPConnectionSettingsOnStartup): 36 * platform/network/cf/ResourceRequestCFNet.h: 37 (WebCore::toResourceLoadPriority): 38 (WebCore::toPlatformRequestPriority): 39 * platform/network/cf/ResourceResponse.h: 40 * platform/network/cf/ResourceResponseCFNet.cpp: 41 (WebCore::ResourceResponse::platformCertificateInfo): 42 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: 43 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): 44 * platform/network/cocoa/ResourceRequestCocoa.mm: 45 (WebCore::ResourceRequest::doUpdateResourceRequest): 46 (WebCore::ResourceRequest::doUpdatePlatformRequest): 47 * platform/network/cocoa/ResourceResponseCocoa.mm: Renamed from Source/WebCore/platform/network/mac/ResourceResponseMac.mm. 48 (WebCore::ResourceResponse::platformCertificateInfo): 49 (WebCore::copyNSURLResponseStatusLine): 50 (WebCore::ResourceResponse::platformLazyInit): 51 * platform/network/ios/QuickLook.h: 52 * platform/network/ios/QuickLook.mm: 53 * platform/network/ios/WebCoreURLResponseIOS.mm: 54 (WebCore::adjustMIMETypeIfNecessary): 55 * platform/network/mac/ResourceHandleMac.mm: 56 (WebCore::ResourceHandle::createNSURLConnection): 57 * platform/network/mac/WebCoreURLResponse.h: 58 * platform/network/mac/WebCoreURLResponse.mm: 59 (WebCore::adjustMIMETypeIfNecessary): 60 * platform/spi/cf/CFNetworkConnectionCacheSPI.h: 61 * platform/spi/cf/CFNetworkSPI.h: 62 1 63 2015-12-22 Michael Catanzaro <mcatanzaro@igalia.com> 2 64 -
trunk/Source/WebCore/PlatformMac.cmake
r192412 r194378 521 521 platform/network/cocoa/ProtectionSpaceCocoa.mm 522 522 platform/network/cocoa/ResourceRequestCocoa.mm 523 platform/network/cocoa/ResourceResponseCocoa.mm 523 524 524 525 platform/network/mac/AuthenticationMac.mm … … 533 534 platform/network/mac/ResourceHandleMac.mm 534 535 platform/network/mac/ResourceRequestMac.mm 535 platform/network/mac/ResourceResponseMac.mm536 536 platform/network/mac/SynchronousLoaderClient.mm 537 537 platform/network/mac/UTIUtilities.mm -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r194319 r194378 1977 1977 514C76510CE9234E007EF3CD /* ResourceHandleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */; }; 1978 1978 514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */; }; 1979 514C76550CE9234F007EF3CD /* ResourceResponseMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C764B0CE9234E007EF3CD /* ResourceResponseMac.mm */; };1980 1979 514C766D0CE923A1007EF3CD /* CredentialBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76580CE923A1007EF3CD /* CredentialBase.cpp */; }; 1981 1980 514C766E0CE923A1007EF3CD /* Credential.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76590CE923A1007EF3CD /* Credential.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 4013 4012 A10BB5851484E3A700B2E87A /* RenderSVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = A10BB5831484E3A700B2E87A /* RenderSVGRect.h */; }; 4014 4013 A10BB58B1484E3B300B2E87A /* RenderSVGShape.h in Headers */ = {isa = PBXBuildFile; fileRef = A10BB5891484E3B300B2E87A /* RenderSVGShape.h */; }; 4014 A10D7FEC1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A10D7FEB1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4015 4015 A10DBF4718F92317000D70C6 /* QuickLookHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DBF4618F92317000D70C6 /* QuickLookHandleClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4016 4016 A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A10DC76814747BAB005E2471 /* StyleGridData.cpp */; }; … … 4096 4096 A1ED778D1BE3294000DC1791 /* Device.h in Headers */ = {isa = PBXBuildFile; fileRef = A1ED778B1BE3294000DC1791 /* Device.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4097 4097 A1ED778F1BE4291800DC1791 /* UIKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A1ED778E1BE4291800DC1791 /* UIKitSPI.h */; }; 4098 A1F78D0C1C25424C00245446 /* ResourceResponseCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1F78D0B1C25422C00245446 /* ResourceResponseCocoa.mm */; }; 4098 4099 A2B9217316C5CC420041DCD9 /* IntRectExtent.h in Headers */ = {isa = PBXBuildFile; fileRef = A2B9217216C5CC420041DCD9 /* IntRectExtent.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4099 4100 A31C4E4D16E02AA6002F7957 /* OESTextureHalfFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A31C4E4C16E02AA6002F7957 /* OESTextureHalfFloat.cpp */; }; … … 6124 6125 CE7B2DB51586ABAD0098B3FA /* TextAlternativeWithRange.h in Headers */ = {isa = PBXBuildFile; fileRef = CE7B2DB11586ABAD0098B3FA /* TextAlternativeWithRange.h */; settings = {ATTRIBUTES = (Private, ); }; }; 6125 6126 CE7B2DB61586ABAD0098B3FA /* TextAlternativeWithRange.mm in Sources */ = {isa = PBXBuildFile; fileRef = CE7B2DB21586ABAD0098B3FA /* TextAlternativeWithRange.mm */; }; 6126 CE8245F019B671BA00AC0122 /* CFNetworkConnectionCacheSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE8245EF19B671BA00AC0122 /* CFNetworkConnectionCacheSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };6127 6127 CE95208A1811B475007A5392 /* WebSafeIncrementalSweeperIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C4CB1D161A131200D214DA /* WebSafeIncrementalSweeperIOS.h */; }; 6128 6128 CEC337AD1A46071F009B8523 /* ServersSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CEC337AC1A46071F009B8523 /* ServersSPI.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 9400 9400 514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceHandleMac.mm; sourceTree = "<group>"; }; 9401 9401 514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceRequestMac.mm; sourceTree = "<group>"; }; 9402 514C764B0CE9234E007EF3CD /* ResourceResponseMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceResponseMac.mm; sourceTree = "<group>"; };9403 9402 514C76580CE923A1007EF3CD /* CredentialBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CredentialBase.cpp; sourceTree = "<group>"; }; 9404 9403 514C76590CE923A1007EF3CD /* Credential.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Credential.h; sourceTree = "<group>"; }; … … 11576 11575 A10BB5881484E3B300B2E87A /* RenderSVGShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGShape.cpp; sourceTree = "<group>"; }; 11577 11576 A10BB5891484E3B300B2E87A /* RenderSVGShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGShape.h; sourceTree = "<group>"; }; 11577 A10D7FEB1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFNetworkConnectionCacheSPI.h; sourceTree = "<group>"; }; 11578 11578 A10DBF4618F92317000D70C6 /* QuickLookHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuickLookHandleClient.h; sourceTree = "<group>"; }; 11579 11579 A10DC76814747BAB005E2471 /* StyleGridData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleGridData.cpp; sourceTree = "<group>"; }; … … 11655 11655 A1ED778B1BE3294000DC1791 /* Device.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Device.h; sourceTree = "<group>"; }; 11656 11656 A1ED778E1BE4291800DC1791 /* UIKitSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIKitSPI.h; sourceTree = "<group>"; }; 11657 A1F78D0B1C25422C00245446 /* ResourceResponseCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceResponseCocoa.mm; sourceTree = "<group>"; }; 11657 11658 A208E222A56A0C7575F2A72E /* RenderMathMLMenclose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLMenclose.h; sourceTree = "<group>"; }; 11658 11659 A2B9217216C5CC420041DCD9 /* IntRectExtent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntRectExtent.h; sourceTree = "<group>"; }; … … 13998 13999 CE7B2DB11586ABAD0098B3FA /* TextAlternativeWithRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextAlternativeWithRange.h; sourceTree = "<group>"; }; 13999 14000 CE7B2DB21586ABAD0098B3FA /* TextAlternativeWithRange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextAlternativeWithRange.mm; sourceTree = "<group>"; }; 14000 CE8245EF19B671BA00AC0122 /* CFNetworkConnectionCacheSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFNetworkConnectionCacheSPI.h; sourceTree = "<group>"; };14001 14001 CEC337AC1A46071F009B8523 /* ServersSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServersSPI.h; sourceTree = "<group>"; }; 14002 14002 CEC337AE1A46086D009B8523 /* GraphicsServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsServicesSPI.h; sourceTree = "<group>"; }; … … 17226 17226 E10A39E11AE84E7100A29AE3 /* CFBundleSPI.h */, 17227 17227 65086DA719AC1719009AF46B /* CFLocaleSPI.h */, 17228 CE8245EF19B671BA00AC0122/* CFNetworkConnectionCacheSPI.h */,17228 A10D7FEB1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h */, 17229 17229 CE12525A1A1C018200864480 /* CFNetworkSPI.h */, 17230 17230 4449A4041A964B0000B64AD5 /* CoreMediaSPI.h */, … … 17491 17491 514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */, 17492 17492 514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */, 17493 514C764B0CE9234E007EF3CD /* ResourceResponseMac.mm */,17494 17493 E180811416FCF9CB00B80D07 /* SynchronousLoaderClient.mm */, 17495 17494 1FAFBF1615A5FA5200083A20 /* UTIUtilities.h */, … … 17866 17865 372ADA39197F687600FC501E /* ProtectionSpaceCocoa.mm */, 17867 17866 7E7DE1FC195CEF260035363B /* ResourceRequestCocoa.mm */, 17867 A1F78D0B1C25422C00245446 /* ResourceResponseCocoa.mm */, 17868 17868 ); 17869 17869 path = cocoa; … … 24669 24669 85031B3D0A44EFC700F992E0 /* BeforeUnloadEvent.h in Headers */, 24670 24670 B2C3DA240D006C1D00EF6F26 /* BidiContext.h in Headers */, 24671 A10D7FEC1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h in Headers */, 24671 24672 B2C3DA250D006C1D00EF6F26 /* BidiResolver.h in Headers */, 24672 24673 BCE789861120E7A60060ECE5 /* BidiRun.h in Headers */, … … 24750 24751 5FA904CA178E61F5004C8A2D /* CertificateInfo.h in Headers */, 24751 24752 E10A39E21AE84E7100A29AE3 /* CFBundleSPI.h in Headers */, 24752 CE8245F019B671BA00AC0122 /* CFNetworkConnectionCacheSPI.h in Headers */,24753 24753 CE12525B1A1C018200864480 /* CFNetworkSPI.h in Headers */, 24754 24754 E1A8E56717552B2A007488E7 /* CFURLExtras.h in Headers */, … … 29065 29065 850657030AAB4763002D15C0 /* DOMStyleSheetList.mm in Sources */, 29066 29066 85ACA99D0A9B575900671E90 /* DOMText.mm in Sources */, 29067 A1F78D0C1C25424C00245446 /* ResourceResponseCocoa.mm in Sources */, 29067 29068 933A14AA0B7D1D0900A53FFD /* DOMTextEvent.mm in Sources */, 29068 29069 188604B30F2E654A000B6443 /* DOMTimer.cpp in Sources */, … … 30786 30787 514C767E0CE923A1007EF3CD /* ResourceResponseBase.cpp in Sources */, 30787 30788 7EE6847112D26E3800E79415 /* ResourceResponseCFNet.cpp in Sources */, 30788 514C76550CE9234F007EF3CD /* ResourceResponseMac.mm in Sources */,30789 30789 ADBAD6EE1BCDD95500381325 /* ResourceUsageOverlay.cpp in Sources */, 30790 30790 ADFE2B551BD5F61200DAB457 /* ResourceUsageOverlayCocoa.mm in Sources */, -
trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm
r191904 r194378 28 28 29 29 WEBCORE_EXPORT void (*wkCALayerEnumerateRectsBeingDrawnWithBlock)(CALayer *, CGContextRef context, void (^block)(CGRect rect)); 30 WEBCORE_EXPORT BOOL (*wkCGContextGetShouldSmoothFonts)(CGContextRef);31 30 WEBCORE_EXPORT CGPatternRef (*wkCGPatternCreateWithImageAndTransform)(CGImageRef, CGAffineTransform, int); 32 31 WEBCORE_EXPORT void (*wkClearGlyphVector)(void* glyphs); 33 32 WEBCORE_EXPORT OSStatus (*wkConvertCharToGlyphs)(void* styleGroup, const UniChar*, unsigned numCharacters, void* glyphs); 34 WEBCORE_EXPORT NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);35 33 WEBCORE_EXPORT bool (*wkCGContextIsPDFContext)(CGContextRef); 36 WEBCORE_EXPORT NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);37 WEBCORE_EXPORT void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);38 34 WEBCORE_EXPORT id (*wkCreateNSURLConnectionDelegateProxy)(void); 39 WEBCORE_EXPORT unsigned (*wkInitializeMaximumHTTPConnectionCountPerHost)(unsigned preferredConnectionCount);40 WEBCORE_EXPORT int (*wkGetHTTPRequestPriority)(CFURLRequestRef);41 WEBCORE_EXPORT void (*wkSetHTTPRequestMaximumPriority)(int priority);42 WEBCORE_EXPORT void (*wkSetHTTPRequestPriority)(CFURLRequestRef, int priority);43 WEBCORE_EXPORT void (*wkSetHTTPRequestMinimumFastLanePriority)(int priority);44 WEBCORE_EXPORT void (*wkHTTPRequestEnablePipelining)(CFURLRequestRef);45 35 WEBCORE_EXPORT void (*wkSetCONNECTProxyForStream)(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort); 46 36 WEBCORE_EXPORT void (*wkSetCONNECTProxyAuthorizationForStream)(CFReadStreamRef, CFStringRef proxyAuthorizationString); … … 48 38 WEBCORE_EXPORT CFHTTPMessageRef (*wkCopyCONNECTProxyResponse)(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort); 49 39 WEBCORE_EXPORT void (*wkSetLayerContentsScale)(CALayer *); 50 WEBCORE_EXPORT void (*wkCFURLRequestAllowAllPostCaching)(CFURLRequestRef);51 WEBCORE_EXPORT CFArrayRef (*wkCopyNSURLResponseCertificateChain)(NSURLResponse*);52 40 WEBCORE_EXPORT CFStringEncoding (*wkGetWebDefaultCFStringEncoding)(void); 53 54 #if USE(CFNETWORK)55 WEBCORE_EXPORT CFHTTPCookieStorageRef (*wkGetDefaultHTTPCookieStorage)();56 WEBCORE_EXPORT WKCFURLCredentialRef (*wkCopyCredentialFromCFPersistentStorage)(CFURLProtectionSpaceRef protectionSpace);57 WEBCORE_EXPORT void (*wkSetCFURLRequestShouldContentSniff)(CFMutableURLRequestRef, bool);58 WEBCORE_EXPORT void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRequestRef);59 #endif60 41 61 42 WEBCORE_EXPORT CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef); 62 43 WEBCORE_EXPORT NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*); 63 WEBCORE_EXPORT CFHTTPCookieStorageRef (*wkCopyHTTPCookieStorage)(CFURLStorageSessionRef);64 44 WEBCORE_EXPORT unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef); 65 WEBCORE_EXPORT void (*wkSetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef, unsigned);66 45 WEBCORE_EXPORT NSArray *(*wkHTTPCookies)(CFHTTPCookieStorageRef); 67 46 WEBCORE_EXPORT NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *, NSURL *); … … 69 48 WEBCORE_EXPORT void (*wkDeleteAllHTTPCookies)(CFHTTPCookieStorageRef); 70 49 WEBCORE_EXPORT void (*wkDeleteHTTPCookie)(CFHTTPCookieStorageRef, NSHTTPCookie *); 71 72 WEBCORE_EXPORT CFStringRef (*wkGetCFURLResponseMIMEType)(CFURLResponseRef);73 WEBCORE_EXPORT CFURLRef (*wkGetCFURLResponseURL)(CFURLResponseRef);74 WEBCORE_EXPORT CFHTTPMessageRef (*wkGetCFURLResponseHTTPResponse)(CFURLResponseRef);75 WEBCORE_EXPORT CFStringRef (*wkCopyCFURLResponseSuggestedFilename)(CFURLResponseRef);76 WEBCORE_EXPORT void (*wkSetCFURLResponseMIMEType)(CFURLResponseRef, CFStringRef mimeType);77 50 78 51 WEBCORE_EXPORT void(*wkDestroyRenderingResources)(void); -
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h
r191904 r194378 122 122 extern void (*wkCALayerEnumerateRectsBeingDrawnWithBlock)(CALayer *, CGContextRef, void (^block)(CGRect rect)); 123 123 124 extern BOOL (*wkCGContextGetShouldSmoothFonts)(CGContextRef);125 124 typedef enum { 126 125 wkPatternTilingNoDistortion, … … 132 131 #endif 133 132 extern CGPatternRef (*wkCGPatternCreateWithImageAndTransform)(CGImageRef, CGAffineTransform, int); 134 extern NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);135 extern CFArrayRef (*wkCopyNSURLResponseCertificateChain)(NSURLResponse*);136 133 extern CFStringEncoding (*wkGetWebDefaultCFStringEncoding)(void); 137 134 #if !PLATFORM(IOS) 138 extern void (*wkDrawCapsLockIndicator)(CGContextRef, CGRect);139 135 extern void (*wkDrawBezeledTextArea)(NSRect, BOOL enabled); 140 136 extern void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int); 141 137 extern bool (*wkDrawFocusRingAtTime)(CGContextRef, NSTimeInterval time); 142 138 extern bool (*wkDrawCellFocusRingWithFrameAtTime)(NSCell *cell, NSRect cellFrame, NSView *controlView, NSTimeInterval time); 143 #endif144 #if !PLATFORM(IOS)145 139 extern void (*wkDrawMediaSliderTrack)(CGContextRef context, CGRect rect, float timeLoaded, float currentTime, 146 140 float duration, unsigned state); 147 141 extern void (*wkDrawMediaUIPart)(int part, CGContextRef context, CGRect rect, unsigned state); 148 142 extern CFStringRef (*wkSignedPublicKeyAndChallengeString)(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription); 149 #endif150 #if !PLATFORM(IOS)151 143 extern double (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response); 152 #endif153 extern NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);154 #if !PLATFORM(IOS)155 144 extern BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response); 156 145 extern void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous); … … 179 168 extern float (*wkQTMovieMaxTimeLoaded)(QTMovie*); 180 169 extern NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void); 181 extern float (*wkQTMovieMaxTimeSeekable)(QTMovie*);182 170 extern int (*wkQTMovieGetType)(QTMovie*); 183 171 extern BOOL (*wkQTMovieHasClosedCaptions)(QTMovie*); … … 185 173 extern void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL); 186 174 extern void (*wkQTMovieSelectPreferredAlternates)(QTMovie*); 187 extern void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);188 175 extern NSArray *(*wkQTGetSitesInMediaDownloadCache)(); 189 176 extern void (*wkQTClearMediaDownloadCacheForSite)(NSString *site); 190 177 extern void (*wkQTClearMediaDownloadCache)(); 191 extern void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*, BOOL);192 178 extern void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL); 193 179 extern void (*wkSetDragImage)(NSImage*, NSPoint offset); 194 180 #endif 195 extern void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);196 181 extern bool (*wkCGContextIsPDFContext)(CGContextRef); 197 extern unsigned (*wkInitializeMaximumHTTPConnectionCountPerHost)(unsigned preferredConnectionCount);198 extern int (*wkGetHTTPRequestPriority)(CFURLRequestRef);199 extern void (*wkSetHTTPRequestMaximumPriority)(int maximumPriority);200 extern void (*wkSetHTTPRequestPriority)(CFURLRequestRef, int priority);201 extern void (*wkSetHTTPRequestMinimumFastLanePriority)(int priority);202 extern void (*wkHTTPRequestEnablePipelining)(CFURLRequestRef);203 182 extern void (*wkSetCONNECTProxyForStream)(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort); 204 183 extern void (*wkSetCONNECTProxyAuthorizationForStream)(CFReadStreamRef, CFStringRef proxyAuthorizationString); … … 242 221 243 222 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef; 244 extern CFHTTPCookieStorageRef (*wkCopyHTTPCookieStorage)(CFURLStorageSessionRef);245 223 extern unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef); 246 extern void (*wkSetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef, unsigned);247 224 extern NSArray *(*wkHTTPCookies)(CFHTTPCookieStorageRef); 248 225 extern NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *, NSURL *); … … 251 228 extern void (*wkDeleteAllHTTPCookies)(CFHTTPCookieStorageRef); 252 229 253 extern CFStringRef (*wkGetCFURLResponseMIMEType)(CFURLResponseRef);254 extern CFURLRef (*wkGetCFURLResponseURL)(CFURLResponseRef);255 extern CFHTTPMessageRef (*wkGetCFURLResponseHTTPResponse)(CFURLResponseRef);256 extern CFStringRef (*wkCopyCFURLResponseSuggestedFilename)(CFURLResponseRef);257 extern void (*wkSetCFURLResponseMIMEType)(CFURLResponseRef, CFStringRef mimeType);258 259 #if USE(CFNETWORK)260 extern CFHTTPCookieStorageRef (*wkGetDefaultHTTPCookieStorage)();261 extern WKCFURLCredentialRef (*wkCopyCredentialFromCFPersistentStorage)(CFURLProtectionSpaceRef protectionSpace);262 extern void (*wkSetCFURLRequestShouldContentSniff)(CFMutableURLRequestRef, bool);263 extern void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRequestRef);264 #endif265 230 #if !PLATFORM(IOS) 266 231 extern void (*wkSetMetadataURL)(NSString *urlString, NSString *referrer, NSString *path); 267 #endif268 269 extern void (*wkCFURLRequestAllowAllPostCaching)(CFURLRequestRef);270 271 #if !PLATFORM(IOS)272 232 extern CGFloat (*wkNSElasticDeltaForTimeDelta)(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime); 273 233 extern CGFloat (*wkNSElasticDeltaForReboundDelta)(CGFloat delta); -
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm
r191466 r194378 33 33 void (*wkAdvanceDefaultButtonPulseAnimation)(NSButtonCell *); 34 34 void (*wkCALayerEnumerateRectsBeingDrawnWithBlock)(CALayer *, CGContextRef context, void (^block)(CGRect rect)); 35 BOOL (*wkCGContextGetShouldSmoothFonts)(CGContextRef);36 35 bool (*wkCGContextDrawsWithCorrectShadowOffsets)(CGContextRef); 37 36 CGPatternRef (*wkCGPatternCreateWithImageAndTransform)(CGImageRef, CGAffineTransform, int); 38 NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);39 CFArrayRef (*wkCopyNSURLResponseCertificateChain)(NSURLResponse*);40 37 CFStringEncoding (*wkGetWebDefaultCFStringEncoding)(void); 41 void (*wkDrawCapsLockIndicator)(CGContextRef, CGRect);42 38 void (*wkDrawBezeledTextArea)(NSRect, BOOL enabled); 43 39 void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int); … … 55 51 CFStringRef (*wkSignedPublicKeyAndChallengeString)(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription); 56 52 NSTimeInterval (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response); 57 NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);58 53 BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response); 59 54 void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous); … … 64 59 float (*wkQTMovieMaxTimeLoaded)(QTMovie*); 65 60 NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void); 66 float (*wkQTMovieMaxTimeSeekable)(QTMovie*);67 61 int (*wkQTMovieGetType)(QTMovie*); 68 62 BOOL (*wkQTMovieHasClosedCaptions)(QTMovie*); … … 70 64 void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL); 71 65 void (*wkQTMovieSelectPreferredAlternates)(QTMovie*); 72 void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);73 66 NSArray *(*wkQTGetSitesInMediaDownloadCache)(); 74 67 void (*wkQTClearMediaDownloadCacheForSite)(NSString *site); 75 68 void (*wkQTClearMediaDownloadCache)(); 76 69 77 void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*, BOOL);78 70 void (*wkSetDragImage)(NSImage*, NSPoint offset); 79 71 bool (*wkCGContextIsPDFContext)(CGContextRef); 80 void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);81 unsigned (*wkInitializeMaximumHTTPConnectionCountPerHost)(unsigned preferredConnectionCount);82 int (*wkGetHTTPRequestPriority)(CFURLRequestRef);83 void (*wkSetHTTPRequestMaximumPriority)(int priority);84 void (*wkSetHTTPRequestPriority)(CFURLRequestRef, int priority);85 void (*wkSetHTTPRequestMinimumFastLanePriority)(int priority);86 void (*wkHTTPRequestEnablePipelining)(CFURLRequestRef);87 72 void (*wkSetCONNECTProxyForStream)(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort); 88 73 void (*wkSetCONNECTProxyAuthorizationForStream)(CFReadStreamRef, CFStringRef proxyAuthorizationString); 89 74 CFHTTPMessageRef (*wkCopyCONNECTProxyResponse)(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort); 90 91 #if USE(CFNETWORK)92 CFHTTPCookieStorageRef (*wkGetDefaultHTTPCookieStorage)();93 WKCFURLCredentialRef (*wkCopyCredentialFromCFPersistentStorage)(CFURLProtectionSpaceRef protectionSpace);94 void (*wkSetCFURLRequestShouldContentSniff)(CFMutableURLRequestRef, bool);95 void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRequestRef);96 #endif97 75 98 76 void* wkGetHyphenationLocationBeforeIndex; … … 120 98 CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef); 121 99 NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*); 122 CFHTTPCookieStorageRef (*wkCopyHTTPCookieStorage)(CFURLStorageSessionRef);123 100 unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef); 124 void (*wkSetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef, unsigned);125 101 NSArray *(*wkHTTPCookies)(CFHTTPCookieStorageRef); 126 102 NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *, NSURL *); … … 129 105 void (*wkDeleteHTTPCookie)(CFHTTPCookieStorageRef, NSHTTPCookie *); 130 106 131 CFStringRef (*wkGetCFURLResponseMIMEType)(CFURLResponseRef);132 CFURLRef (*wkGetCFURLResponseURL)(CFURLResponseRef);133 CFHTTPMessageRef (*wkGetCFURLResponseHTTPResponse)(CFURLResponseRef);134 CFStringRef (*wkCopyCFURLResponseSuggestedFilename)(CFURLResponseRef);135 void (*wkSetCFURLResponseMIMEType)(CFURLResponseRef, CFStringRef mimeType);136 107 void (*wkSetMetadataURL)(NSString *urlString, NSString *referrer, NSString *path); 137 138 void (*wkCFURLRequestAllowAllPostCaching)(CFURLRequestRef);139 108 140 109 #if !PLATFORM(IOS) -
trunk/Source/WebCore/platform/network/NetworkStorageSession.h
r186476 r194378 33 33 34 34 #if PLATFORM(COCOA) || USE(CFNETWORK) 35 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef; 36 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef; 35 #include "CFNetworkSPI.h" 37 36 #endif 38 37 -
trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp
r171801 r194378 30 30 31 31 #include "AuthenticationCF.h" 32 #include "CFNetworkSPI.h" 32 33 #include "Credential.h" 33 34 #include "ProtectionSpace.h" … … 45 46 46 47 namespace WebCore { 48 49 static inline CFURLCredentialRef copyCredentialFromProtectionSpace(CFURLProtectionSpaceRef protectionSpace) 50 { 51 auto storage = adoptCF(CFURLCredentialStorageCreate(kCFAllocatorDefault)); 52 return CFURLCredentialStorageCopyDefaultCredentialForProtectionSpace(storage.get(), protectionSpace); 53 } 47 54 48 55 Credential CredentialStorage::getFromPersistentStorage(const ProtectionSpace& protectionSpace) 49 56 { 50 57 #if PLATFORM(COCOA) 51 RetainPtr<CFURLCredentialRef> credentialCF = adoptCF(wkCopyCredentialFromCFPersistentStorage(protectionSpace.cfSpace()));58 auto credentialCF = adoptCF(copyCredentialFromProtectionSpace(protectionSpace.cfSpace())); 52 59 return Credential(credentialCF.get()); 53 60 #else 54 RetainPtr<CFURLProtectionSpaceRef>protectionSpaceCF = adoptCF(createCF(protectionSpace));55 RetainPtr<CFURLCredentialRef> credentialCF = adoptCF(wkCopyCredentialFromCFPersistentStorage(protectionSpaceCF.get()));61 auto protectionSpaceCF = adoptCF(createCF(protectionSpace)); 62 auto credentialCF = adoptCF(copyCredentialFromProtectionSpace(protectionSpaceCF.get())); 56 63 return core(credentialCF.get()); 57 64 #endif -
trunk/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
r186369 r194378 85 85 { 86 86 if (m_platformSession) 87 return adoptCF( wkCopyHTTPCookieStorage(m_platformSession.get()));87 return adoptCF(_CFURLStorageSessionCopyCookieStorage(kCFAllocatorDefault, m_platformSession.get())); 88 88 89 89 #if USE(CFNETWORK) 90 return wkGetDefaultHTTPCookieStorage();90 return _CFHTTPCookieStorageGetDefault(kCFAllocatorDefault); 91 91 #else 92 92 // When using NSURLConnection, we also use its shared cookie storage. -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r194161 r194378 117 117 LOG(Network, "CFNet - Destroying job %p (%s)", this, d->m_firstRequest.url().string().utf8().data()); 118 118 } 119 120 static inline CFStringRef shouldSniffConnectionProperty() 121 { 122 #if PLATFORM(WIN) 123 return CFSTR("_kCFURLConnectionPropertyShouldSniff"); 124 #else 125 return _kCFURLConnectionPropertyShouldSniff; 126 #endif 127 } 119 128 120 129 void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior schedulingBehavior, CFDictionaryRef clientProperties) … … 148 157 } 149 158 150 RetainPtr<CFMutableURLRequestRef> request = adoptCF(CFURLRequestCreateMutableCopy(kCFAllocatorDefault, firstRequest().cfURLRequest(UpdateHTTPBody))); 151 wkSetRequestStorageSession(d->m_storageSession.get(), request.get()); 159 auto request = adoptCF(CFURLRequestCreateMutableCopy(kCFAllocatorDefault, firstRequest().cfURLRequest(UpdateHTTPBody))); 160 if (auto storageSession = d->m_storageSession.get()) 161 _CFURLRequestSetStorageSession(request.get(), storageSession); 152 162 153 163 if (!shouldContentSniff) 154 wkSetCFURLRequestShouldContentSniff(request.get(), false);164 _CFURLRequestSetProtocolProperty(request.get(), shouldSniffConnectionProperty(), kCFBooleanFalse); 155 165 156 166 RetainPtr<CFMutableDictionaryRef> sslProps; -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp
r174787 r194378 159 159 RetainPtr<CFStringRef> newMethod = adoptCF(CFURLRequestCopyHTTPRequestMethod(cfRequest)); 160 160 if (CFStringCompareWithOptions(lastHTTPMethod.get(), newMethod.get(), CFRangeMake(0, CFStringGetLength(lastHTTPMethod.get())), kCFCompareCaseInsensitive)) { 161 RetainPtr<CFMutableURLRequestRef> mutableRequest = adoptCF(CFURLRequestCreateMutableCopy(0, cfRequest)); 162 wkSetRequestStorageSession(m_handle->storageSession(), mutableRequest.get()); 161 auto mutableRequest = adoptCF(CFURLRequestCreateMutableCopy(kCFAllocatorDefault, cfRequest)); 162 if (auto storageSession = m_handle->storageSession()) 163 _CFURLRequestSetStorageSession(mutableRequest.get(), storageSession); 163 164 CFURLRequestSetHTTPRequestMethod(mutableRequest.get(), lastHTTPMethod.get()); 164 165 -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp
r174787 r194378 31 31 #include "AuthenticationCF.h" 32 32 #include "AuthenticationChallenge.h" 33 #include "CFNetworkSPI.h" 33 34 #include "Logging.h" 34 35 #include "ResourceHandle.h" … … 36 37 #include "ResourceResponse.h" 37 38 #include "SharedBuffer.h" 38 #include "WebCoreSystemInterface.h"39 39 #include "WebCoreURLResponse.h" 40 40 #include <wtf/MainThread.h> … … 141 141 142 142 // Avoid MIME type sniffing if the response comes back as 304 Not Modified. 143 CFHTTPMessageRef msg = wkGetCFURLResponseHTTPResponse(cfResponse);143 auto msg = CFURLResponseGetHTTPResponse(cfResponse); 144 144 int statusCode = msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0; 145 145 … … 149 149 #if !PLATFORM(IOS) 150 150 if (_CFURLRequestCopyProtocolPropertyForKey(m_handle->firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR("ForceHTMLMIMEType"))) 151 wkSetCFURLResponseMIMEType(cfResponse, CFSTR("text/html"));151 CFURLResponseSetMIMEType(cfResponse, CFSTR("text/html")); 152 152 #endif // !PLATFORM(IOS) 153 153 -
trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
r186279 r194378 27 27 #include "ResourceRequestCFNet.h" 28 28 29 #include "CFNetworkSPI.h" 29 30 #include "HTTPHeaderNames.h" 30 31 #include "ResourceRequest.h" … … 38 39 #include <CFNetwork/CFURLRequestPriv.h> 39 40 #include <wtf/text/CString.h> 40 #endif41 42 #if PLATFORM(IOS)43 #include "CFNetworkConnectionCacheSPI.h"44 41 #endif 45 42 … … 155 152 156 153 if (httpPipeliningEnabled()) 157 wkHTTPRequestEnablePipelining(cfRequest);154 CFURLRequestSetShouldPipelineHTTP(cfRequest, true, true); 158 155 159 156 if (resourcePrioritiesEnabled()) 160 wkSetHTTPRequestPriority(cfRequest, toPlatformRequestPriority(priority()));157 CFURLRequestSetRequestPriority(cfRequest, toPlatformRequestPriority(priority())); 161 158 162 159 #if !PLATFORM(WIN) 163 wkCFURLRequestAllowAllPostCaching(cfRequest);160 _CFURLRequestSetProtocolProperty(cfRequest, kCFURLRequestAllowAllPOSTCaching, kCFBooleanTrue); 164 161 #endif 165 162 … … 262 259 263 260 if (resourcePrioritiesEnabled()) 264 m_priority = toResourceLoadPriority( wkGetHTTPRequestPriority(m_cfRequest.get()));261 m_priority = toResourceLoadPriority(CFURLRequestGetRequestPriority(m_cfRequest.get())); 265 262 266 263 m_httpHeaderFields.clear(); … … 317 314 updatePlatformRequest(); 318 315 319 CFMutableURLRequestRef cfRequest = CFURLRequestCreateMutableCopy(0, m_cfRequest.get()); 320 wkSetRequestStorageSession(storageSession, cfRequest); 316 auto cfRequest = CFURLRequestCreateMutableCopy(0, m_cfRequest.get()); 317 if (storageSession) 318 _CFURLRequestSetStorageSession(cfRequest, storageSession); 321 319 m_cfRequest = adoptCF(cfRequest); 322 320 #if PLATFORM(COCOA) … … 392 390 static const unsigned unlimitedRequestCount = 10000; 393 391 394 unsigned maximumHTTPConnectionCountPerHost = wkInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount); 392 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPLoadWidth, preferredConnectionCount); 393 unsigned maximumHTTPConnectionCountPerHost = _CFNetworkHTTPConnectionCacheGetLimit(kHTTPLoadWidth); 395 394 396 395 Boolean keyExistsAndHasValidFormat = false; … … 403 402 return maximumHTTPConnectionCountPerHost; 404 403 405 wkSetHTTPRequestMaximumPriority(toPlatformRequestPriority(ResourceLoadPriority::Highest));404 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPPriorityNumLevels, toPlatformRequestPriority(ResourceLoadPriority::Highest)); 406 405 #if !PLATFORM(WIN) 407 406 // FIXME: <rdar://problem/9375609> Implement minimum fast lane priority setting on Windows 408 wkSetHTTPRequestMinimumFastLanePriority(toPlatformRequestPriority(ResourceLoadPriority::Medium));407 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPMinimumFastLanePriority, toPlatformRequestPriority(ResourceLoadPriority::Medium)); 409 408 #endif 410 409 … … 421 420 static const unsigned preferredConnectionCount = 6; 422 421 static const unsigned fastLaneConnectionCount = 1; 423 wkInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount);424 wkSetHTTPRequestMaximumPriority(toPlatformRequestPriority(ResourceLoadPriority::Highest));425 wkSetHTTPRequestMinimumFastLanePriority(toPlatformRequestPriority(ResourceLoadPriority::Medium));422 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPLoadWidth, preferredConnectionCount); 423 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPPriorityNumLevels, toPlatformRequestPriority(ResourceLoadPriority::Highest)); 424 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPMinimumFastLanePriority, toPlatformRequestPriority(ResourceLoadPriority::Medium)); 426 425 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPNumFastLanes, fastLaneConnectionCount); 427 426 } -
trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.h
r183563 r194378 27 27 #define ResourceRequestCFNet_h 28 28 29 #include "CFNetworkSPI.h" 29 30 #include "ResourceLoadPriority.h" 30 31 #if USE(CFNETWORK)32 typedef const struct _CFURLRequest* CFURLRequestRef;33 #endif34 31 35 32 namespace WebCore { … … 42 39 #endif 43 40 44 inline ResourceLoadPriority toResourceLoadPriority( intpriority)41 inline ResourceLoadPriority toResourceLoadPriority(CFURLRequestPriority priority) 45 42 { 46 43 switch (priority) { … … 62 59 } 63 60 64 inline inttoPlatformRequestPriority(ResourceLoadPriority priority)61 inline CFURLRequestPriority toPlatformRequestPriority(ResourceLoadPriority priority) 65 62 { 66 63 switch (priority) { -
trunk/Source/WebCore/platform/network/cf/ResourceResponse.h
r182707 r194378 31 31 32 32 #if USE(CFNETWORK) 33 typedef struct _CFURLResponse* CFURLResponseRef; 33 #include "CFNetworkSPI.h" 34 34 #endif 35 35 -
trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp
r189203 r194378 114 114 } 115 115 116 #if !PLATFORM(COCOA) 116 117 CertificateInfo ResourceResponse::platformCertificateInfo() const 117 118 { 118 #if PLATFORM(COCOA) 119 return CertificateInfo(adoptCF(wkCopyNSURLResponseCertificateChain(nsURLResponse()))); 119 return { }; 120 } 120 121 #endif 121 return CertificateInfo();122 }123 122 124 123 String ResourceResponse::platformSuggestedFilename() const -
trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp
r189200 r194378 42 42 43 43 #if PLATFORM(COCOA) 44 #include "CFNetworkSPI.h" 44 45 #include "WebCoreSystemInterface.h" 45 46 #include "WebCoreURLResponse.h" … … 144 145 #if PLATFORM(COCOA) 145 146 // Avoid MIME type sniffing if the response comes back as 304 Not Modified. 146 CFHTTPMessageRef msg = wkGetCFURLResponseHTTPResponse(cfResponse);147 auto msg = CFURLResponseGetHTTPResponse(cfResponse); 147 148 int statusCode = msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0; 148 149 … … 152 153 #if !PLATFORM(IOS) 153 154 if (_CFURLRequestCopyProtocolPropertyForKey(m_handle->firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR("ForceHTMLMIMEType"))) 154 wkSetCFURLResponseMIMEType(cfResponse, CFSTR("text/html"));155 CFURLResponseSetMIMEType(cfResponse, CFSTR("text/html")); 155 156 #endif // !PLATFORM(IOS) 156 157 #else -
trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.h
r172814 r194378 32 32 33 33 #if USE(CFNETWORK) 34 typedef const struct _CFURLCredential* CFURLCredentialRef; 34 #include "CFNetworkSPI.h" 35 35 #endif 36 36 -
trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm
r186137 r194378 80 80 81 81 if (resourcePrioritiesEnabled()) 82 m_priority = toResourceLoadPriority( wkGetHTTPRequestPriority([m_nsRequest.get() _CFURLRequest]));82 m_priority = toResourceLoadPriority(m_nsRequest ? CFURLRequestGetRequestPriority([m_nsRequest _CFURLRequest]) : 0); 83 83 84 84 m_httpHeaderFields.clear(); … … 134 134 135 135 if (ResourceRequest::httpPipeliningEnabled()) 136 wkHTTPRequestEnablePipelining([nsRequest _CFURLRequest]);136 CFURLRequestSetShouldPipelineHTTP([nsRequest _CFURLRequest], true, true); 137 137 138 138 if (ResourceRequest::resourcePrioritiesEnabled()) 139 wkSetHTTPRequestPriority([nsRequest _CFURLRequest], toPlatformRequestPriority(priority()));139 CFURLRequestSetRequestPriority([nsRequest _CFURLRequest], toPlatformRequestPriority(priority())); 140 140 141 141 [nsRequest setCachePolicy:(NSURLRequestCachePolicy)cachePolicy()]; 142 wkCFURLRequestAllowAllPostCaching([nsRequest _CFURLRequest]);142 _CFURLRequestSetProtocolProperty([nsRequest _CFURLRequest], kCFURLRequestAllowAllPOSTCaching, kCFBooleanTrue); 143 143 144 144 double timeoutInterval = ResourceRequestBase::timeoutInterval(); -
trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm
r194377 r194378 27 27 #import "ResourceResponse.h" 28 28 29 #if PLATFORM(COCOA) 30 31 #import "CFNetworkSPI.h" 29 32 #import "HTTPParsers.h" 30 33 #import "WebCoreURLResponse.h" 31 #import "WebCoreSystemInterface.h"32 34 #import <Foundation/Foundation.h> 33 35 #import <limits> 34 36 #import <wtf/StdLibExtras.h> 35 36 @interface NSURLResponse (WebNSURLResponseDetails)37 - (NSTimeInterval)_calculatedExpiration;38 - (id)_initWithCFURLResponse:(CFURLResponseRef)response;39 - (CFURLResponseRef) _CFURLResponse;40 + (id)_responseWithCFURLResponse:(CFURLResponseRef)response;41 @end42 43 37 44 38 namespace WebCore { … … 72 66 } 73 67 68 CertificateInfo ResourceResponse::platformCertificateInfo() const 69 { 70 ASSERT(m_nsResponse); 71 auto cfResponse = [m_nsResponse _CFURLResponse]; 72 if (!cfResponse) 73 return { }; 74 75 CFDictionaryRef context = _CFURLResponseGetSSLCertificateContext(cfResponse); 76 if (!context) 77 return { }; 78 79 auto trustValue = CFDictionaryGetValue(context, kCFStreamPropertySSLPeerTrust); 80 if (!trustValue) 81 return { }; 82 ASSERT(CFGetTypeID(trustValue) == SecTrustGetTypeID()); 83 auto trust = (SecTrustRef)trustValue; 84 85 SecTrustResultType trustResultType; 86 OSStatus result = SecTrustGetTrustResult(trust, &trustResultType); 87 if (result != errSecSuccess) 88 return { }; 89 90 if (trustResultType == kSecTrustResultInvalid) { 91 result = SecTrustEvaluate(trust, &trustResultType); 92 if (result != errSecSuccess) 93 return { }; 94 } 95 96 CFIndex count = SecTrustGetCertificateCount(trust); 97 auto certificateChain = CFArrayCreateMutable(0, count, &kCFTypeArrayCallBacks); 98 for (CFIndex i = 0; i < count; i++) 99 CFArrayAppendValue(certificateChain, SecTrustGetCertificateAtIndex(trust, i)); 100 101 return CertificateInfo(adoptCF(certificateChain)); 102 } 103 74 104 #if USE(CFNETWORK) 75 105 … … 111 141 initNSURLResponse(); 112 142 return m_nsResponse.get(); 143 } 144 145 static NSString *copyNSURLResponseStatusLine(NSURLResponse *response) 146 { 147 CFURLResponseRef cfResponse = [response _CFURLResponse]; 148 if (!cfResponse) 149 return nil; 150 151 CFHTTPMessageRef cfHTTPMessage = CFURLResponseGetHTTPResponse(cfResponse); 152 if (!cfHTTPMessage) 153 return nil; 154 155 return (NSString *)CFHTTPMessageCopyResponseStatusLine(cfHTTPMessage); 113 156 } 114 157 … … 158 201 159 202 NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)m_nsResponse.get(); 160 if (RetainPtr<NSString> httpStatusLine = adoptNS( wkCopyNSURLResponseStatusLine(httpResponse)))203 if (RetainPtr<NSString> httpStatusLine = adoptNS(copyNSURLResponseStatusLine(httpResponse))) 161 204 m_httpStatusText = extractReasonPhraseFromHTTPStatusLine(httpStatusLine.get()); 162 205 else … … 174 217 } 175 218 176 CertificateInfo ResourceResponse::platformCertificateInfo() const177 {178 ASSERT(m_nsResponse);179 return CertificateInfo(adoptCF(wkCopyNSURLResponseCertificateChain(m_nsResponse.get())));180 }181 182 219 String ResourceResponse::platformSuggestedFilename() const 183 220 { … … 194 231 } // namespace WebCore 195 232 233 #endif // PLATFORM(COCOA) -
trunk/Source/WebCore/platform/network/ios/QuickLook.h
r188820 r194378 34 34 #import <wtf/RefPtr.h> 35 35 36 #if USE(CFNETWORK) 37 #include "CFNetworkSPI.h" 38 #endif 39 36 40 OBJC_CLASS NSData; 37 41 OBJC_CLASS NSDictionary; … … 44 48 OBJC_CLASS NSURLResponse; 45 49 OBJC_CLASS QLPreviewConverter; 46 47 #if USE(CFNETWORK)48 typedef struct _CFURLResponse* CFURLResponseRef;49 typedef struct _CFURLConnection* CFURLConnectionRef;50 #endif51 50 52 51 namespace WebCore { -
trunk/Source/WebCore/platform/network/ios/QuickLook.mm
r188594 r194378 47 47 #import <wtf/text/WTFString.h> 48 48 49 #if USE(CFNETWORK)50 #import <CFNetwork/CFURLConnection.h>51 52 @interface NSURLResponse (QuickLookDetails)53 +(NSURLResponse *)_responseWithCFURLResponse:(CFURLResponseRef)response;54 -(CFURLResponseRef)_CFURLResponse;55 @end56 #endif57 58 49 using namespace WebCore; 59 50 -
trunk/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm
r183598 r194378 49 49 void adjustMIMETypeIfNecessary(CFURLResponseRef cfResponse) 50 50 { 51 RetainPtr<CFStringRef> mimeType = wkGetCFURLResponseMIMEType(cfResponse);51 RetainPtr<CFStringRef> mimeType = CFURLResponseGetMIMEType(cfResponse); 52 52 RetainPtr<CFStringRef> updatedMIMEType = mimeType; 53 53 if (!updatedMIMEType) … … 58 58 // We filter the basic MIME types so that we don't do unnecessary work in standard browsing situations. 59 59 if (shouldUseQuickLookForMIMEType((NSString *)updatedMIMEType.get())) { 60 RetainPtr<CFStringRef> suggestedFilename = adoptCF( wkCopyCFURLResponseSuggestedFilename(cfResponse));60 RetainPtr<CFStringRef> suggestedFilename = adoptCF(CFURLResponseCopySuggestedFilename(cfResponse)); 61 61 RetainPtr<CFStringRef> quickLookMIMEType = adoptCF((CFStringRef)QLTypeCopyBestMimeTypeForFileNameAndMimeType((NSString *)suggestedFilename.get(), (NSString *)mimeType.get())); 62 62 if (!quickLookMIMEType) { 63 CFURLRef url = wkGetCFURLResponseURL(cfResponse); 64 NSURL *nsURL = (NSURL *)url; 65 if ([nsURL isFileURL]) { 63 auto url = CFURLResponseGetURL(cfResponse); 64 if ([(NSURL *)url isFileURL]) { 66 65 RetainPtr<CFStringRef> extension = adoptCF(CFURLCopyPathExtension(url)); 67 66 if (extension) { … … 77 76 #endif // USE(QUICK_LOOK) 78 77 if (!mimeType || CFStringCompare(mimeType.get(), updatedMIMEType.get(), kCFCompareCaseInsensitive) != kCFCompareEqualTo) 79 wkSetCFURLResponseMIMEType(cfResponse, updatedMIMEType.get());78 CFURLResponseSetMIMEType(cfResponse, updatedMIMEType.get()); 80 79 } 81 80 -
trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
r194159 r194378 169 169 if (!shouldContentSniff) { 170 170 NSMutableURLRequest *mutableRequest = [[nsRequest mutableCopy] autorelease]; 171 wkSetNSURLRequestShouldContentSniff(mutableRequest, NO);171 [mutableRequest _setProperty:@(NO) forKey:(NSString *)_kCFURLConnectionPropertyShouldSniff]; 172 172 nsRequest = mutableRequest; 173 173 } -
trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.h
r179861 r194378 27 27 */ 28 28 29 typedef struct _CFURLResponse* CFURLResponseRef; 29 #include "CFNetworkSPI.h" 30 30 31 31 #ifdef __OBJC__ 32 32 @interface NSURLResponse (Details) 33 - (CFURLResponseRef)_CFURLResponse;34 33 - (void)_setMIMEType:(NSString *)type; 35 34 @end -
trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm
r179364 r194378 289 289 void adjustMIMETypeIfNecessary(CFURLResponseRef cfResponse) 290 290 { 291 RetainPtr<CFStringRef> result = wkGetCFURLResponseMIMEType(cfResponse);291 RetainPtr<CFStringRef> result = CFURLResponseGetMIMEType(cfResponse); 292 292 RetainPtr<CFStringRef> originalResult = result; 293 293 294 294 if (!result) { 295 CFURLRef url = wkGetCFURLResponseURL(cfResponse); 296 NSURL *nsURL = (NSURL *)url; 297 if ([nsURL isFileURL]) { 295 auto url = CFURLResponseGetURL(cfResponse); 296 if ([(NSURL *)url isFileURL]) { 298 297 RetainPtr<CFStringRef> extension = adoptCF(CFURLCopyPathExtension(url)); 299 298 if (extension) { … … 322 321 323 322 if (result != originalResult) 324 wkSetCFURLResponseMIMEType(cfResponse, result.get());323 CFURLResponseSetMIMEType(cfResponse, result.get()); 325 324 } 326 325 #endif -
trunk/Source/WebCore/platform/spi/cf/CFNetworkConnectionCacheSPI.h
r173710 r194378 1 1 /* 2 * Copyright (C) 2014 Apple Inc.All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 11 11 * documentation and/or other materials provided with the distribution. 12 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 23 * THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 … … 31 31 #else 32 32 enum HTTPConnectionCacheLimitKeys { 33 kHTTPLoadWidth = 0, 34 kHTTPPriorityNumLevels = 3, 33 35 kHTTPNumFastLanes = 4, 36 kHTTPMinimumFastLanePriority = 5, 34 37 }; 35 38 #endif 36 39 37 extern "C" void _CFNetworkHTTPConnectionCacheSetLimit(HTTPConnectionCacheLimitKeys, int); 40 EXTERN_C int _CFNetworkHTTPConnectionCacheGetLimit(HTTPConnectionCacheLimitKeys); 41 EXTERN_C void _CFNetworkHTTPConnectionCacheSetLimit(HTTPConnectionCacheLimitKeys, int); 38 42 39 #endif 43 #endif // CFNetworkConnectionCacheSPI_h -
trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h
r194318 r194378 27 27 #define CFNetworkSPI_h 28 28 29 #include "CFNetworkConnectionCacheSPI.h" 29 30 #include <CFNetwork/CFNetwork.h> 30 31 31 32 #if PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK) 32 33 33 #include <CFNetwork/CFHTTPCookies.h>34 34 #include <CFNetwork/CFHTTPCookiesPriv.h> 35 #include <CFNetwork/CFProxySupportPriv.h> 35 36 #include <CFNetwork/CFURLCachePriv.h> 37 #include <CFNetwork/CFURLConnectionPriv.h> 38 #include <CFNetwork/CFURLCredentialStorage.h> 36 39 #include <CFNetwork/CFURLProtocolPriv.h> 37 #include <CFNetwork/CFURLRequest.h> 40 #include <CFNetwork/CFURLRequestPriv.h> 41 #include <CFNetwork/CFURLResponsePriv.h> 42 #include <CFNetwork/CFURLStorageSession.h> 38 43 39 44 // FIXME: Remove the defined(__OBJC__)-guard onnce we fix <rdar://problem/19033610>. … … 54 59 #else // PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK) 55 60 56 #if defined(__OBJC__)57 @interface NSURLSessionTask (TimingData)58 - (NSDictionary *)_timingData;59 @end60 #endif61 62 61 typedef CF_ENUM(int64_t, _TimingDataOptions) 63 62 { … … 65 64 }; 66 65 67 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;68 66 typedef const struct _CFCachedURLResponse* CFCachedURLResponseRef; 69 67 typedef const struct _CFURLCache* CFURLCacheRef; 70 typedef const struct _CFURLRequest *CFURLRequestRef; 68 typedef const struct _CFURLCredential* CFURLCredentialRef; 69 typedef const struct _CFURLRequest* CFURLRequestRef; 71 70 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef; 72 typedef const struct __CFData *CFDataRef; 71 typedef const struct __CFData* CFDataRef; 72 typedef struct _CFURLConnection* CFURLConnectionRef; 73 typedef struct _CFURLCredentialStorage* CFURLCredentialStorageRef; 74 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef; 75 typedef struct _CFURLRequest* CFMutableURLRequestRef; 76 typedef struct _CFURLResponse* CFURLResponseRef; 77 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef; 78 typedef CFIndex CFURLRequestPriority; 79 typedef int CFHTTPCookieStorageAcceptPolicy; 73 80 74 81 #ifdef __BLOCKS__ 75 82 typedef void (^CFCachedURLResponseCallBackBlock)(CFCachedURLResponseRef); 83 #endif 84 85 #if defined(__OBJC__) 86 @interface NSURLRequest () 87 - (void)_setProperty:(id)value forKey:(NSString *)key; 88 @end 89 90 @interface NSURLResponse () 91 + (NSURLResponse *)_responseWithCFURLResponse:(CFURLResponseRef)response; 92 - (CFURLResponseRef)_CFURLResponse; 93 - (NSDate *)_lastModifiedDate; 94 @end 95 96 @interface NSURLSessionTask (TimingData) 97 - (NSDictionary *)_timingData; 98 @end 76 99 #endif 77 100 … … 103 126 104 127 EXTERN_C CFStringRef const kCFHTTPCookieLocalFileDomain; 128 EXTERN_C const CFStringRef kCFURLRequestAllowAllPOSTCaching; 129 130 #if !PLATFORM(WIN) 131 EXTERN_C const CFStringRef _kCFURLConnectionPropertyShouldSniff; 132 #endif 133 134 EXTERN_C CFHTTPCookieStorageRef _CFHTTPCookieStorageGetDefault(CFAllocatorRef); 135 EXTERN_C void CFHTTPCookieStorageSetCookieAcceptPolicy(CFHTTPCookieStorageRef, CFHTTPCookieStorageAcceptPolicy); 136 EXTERN_C void _CFNetworkSetOverrideSystemProxySettings(CFDictionaryRef); 137 EXTERN_C CFURLCredentialStorageRef CFURLCredentialStorageCreate(CFAllocatorRef); 138 EXTERN_C CFURLCredentialRef CFURLCredentialStorageCopyDefaultCredentialForProtectionSpace(CFURLCredentialStorageRef, CFURLProtectionSpaceRef); 139 EXTERN_C CFURLRequestPriority CFURLRequestGetRequestPriority(CFURLRequestRef); 140 EXTERN_C void _CFURLRequestSetProtocolProperty(CFURLRequestRef, CFStringRef, CFTypeRef); 141 EXTERN_C void CFURLRequestSetRequestPriority(CFURLRequestRef, CFURLRequestPriority); 142 EXTERN_C void CFURLRequestSetShouldPipelineHTTP(CFURLRequestRef, Boolean, Boolean); 143 EXTERN_C void _CFURLRequestSetStorageSession(CFMutableURLRequestRef, CFURLStorageSessionRef); 144 EXTERN_C CFStringRef CFURLResponseCopySuggestedFilename(CFURLResponseRef); 145 EXTERN_C CFHTTPMessageRef CFURLResponseGetHTTPResponse(CFURLResponseRef); 146 EXTERN_C CFStringRef CFURLResponseGetMIMEType(CFURLResponseRef); 147 EXTERN_C CFDictionaryRef _CFURLResponseGetSSLCertificateContext(CFURLResponseRef); 148 EXTERN_C CFURLRef CFURLResponseGetURL(CFURLResponseRef); 149 EXTERN_C void CFURLResponseSetMIMEType(CFURLResponseRef, CFStringRef); 150 EXTERN_C CFHTTPCookieStorageRef _CFURLStorageSessionCopyCookieStorage(CFAllocatorRef, CFURLStorageSessionRef); 105 151 106 152 // FIXME: We should only forward declare this SPI when building for iOS without the Apple Internal SDK. -
trunk/Source/WebKit/mac/ChangeLog
r194322 r194378 1 2015-12-22 Andy Estes <aestes@apple.com> 2 3 [CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI 4 https://bugs.webkit.org/show_bug.cgi?id=152463 5 6 Reviewed by Alexey Proskuryakov. 7 8 Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward 9 declared in CFNetworkSPI.h. 10 11 * Plugins/Hosted/HostedNetscapePluginStream.mm: 12 (WebKit::HostedNetscapePluginStream::didReceiveResponse): 13 * Plugins/WebNetscapePluginStream.mm: 14 (WebNetscapePluginStream::didReceiveResponse): 15 * WebCoreSupport/WebSystemInterface.mm: 16 (InitWebCoreSystemInterface): Deleted. 17 * WebView/WebPreferences.mm: 18 (+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]): 19 1 20 2015-12-20 Dan Bernstein <mitz@apple.com> 2 21 -
trunk/Source/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
r192995 r194378 38 38 #import "WebNSURLRequestExtras.h" 39 39 #import "WebResourceLoadScheduler.h" 40 #import <WebCore/CFNetworkSPI.h> 40 41 #import <WebCore/Document.h> 41 42 #import <WebCore/DocumentLoader.h> … … 190 191 } 191 192 192 startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r MIMEType], theHeaders);193 startStream([r URL], expectedContentLength, [r _lastModifiedDate], [r MIMEType], theHeaders); 193 194 } 194 195 -
trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm
r192995 r194378 40 40 #import "WebResourceLoadScheduler.h" 41 41 #import <Foundation/NSURLResponse.h> 42 #import <WebCore/CFNetworkSPI.h> 42 43 #import <WebCore/Document.h> 43 44 #import <WebCore/DocumentLoader.h> … … 359 360 } 360 361 361 startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), response.mimeType(), theHeaders);362 startStream([r URL], expectedContentLength, [r _lastModifiedDate], response.mimeType(), theHeaders); 362 363 } 363 364 -
trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
r191904 r194378 47 47 #endif 48 48 INIT(CALayerEnumerateRectsBeingDrawnWithBlock); 49 #if !PLATFORM(IOS)50 INIT(CGContextGetShouldSmoothFonts);51 #endif52 49 INIT(CGPatternCreateWithImageAndTransform); 53 50 #if !PLATFORM(IOS) … … 55 52 #endif 56 53 INIT(CopyCONNECTProxyResponse); 57 INIT(CopyNSURLResponseStatusLine);58 INIT(CopyNSURLResponseCertificateChain);59 54 #if !PLATFORM(IOS) 60 INIT(DrawCapsLockIndicator);61 55 INIT(DrawBezeledTextArea); 62 56 INIT(DrawFocusRing); … … 66 60 INIT(DrawMediaSliderTrack); 67 61 #endif 68 INIT(GetHTTPRequestPriority);69 INIT(GetNSURLResponseLastModifiedDate);70 62 INIT(GetWebDefaultCFStringEncoding); 71 63 #if !PLATFORM(IOS) … … 74 66 INIT(GetNSEventKeyChar); 75 67 INIT(HitTestMediaUIPart); 76 #endif77 INIT(InitializeMaximumHTTPConnectionCountPerHost);78 #if !PLATFORM(IOS)79 68 INIT(MeasureMediaUIPart); 80 69 INIT(CreateMediaUIBackgroundView); … … 82 71 INIT(WindowSetAlpha); 83 72 INIT(WindowSetScaledFrame); 84 INIT(SetCGFontRenderingMode);85 73 #endif 86 74 INIT(SetCONNECTProxyAuthorizationForStream); … … 89 77 INIT(SetDragImage); 90 78 #endif 91 INIT(SetHTTPRequestMaximumPriority);92 INIT(SetHTTPRequestPriority);93 INIT(SetHTTPRequestMinimumFastLanePriority);94 INIT(HTTPRequestEnablePipelining);95 INIT(SetNSURLRequestShouldContentSniff);96 79 INIT(CGContextIsPDFContext); 97 80 #if ENABLE(VIDEO) && !PLATFORM(IOS) … … 100 83 INIT(QTMovieMaxTimeLoaded); 101 84 INIT(QTMovieMaxTimeLoadedChangeNotification); 102 INIT(QTMovieMaxTimeSeekable);103 85 INIT(QTMovieGetType); 104 86 INIT(QTMovieHasClosedCaptions); … … 106 88 INIT(QTMovieSetShowClosedCaptions); 107 89 INIT(QTMovieSelectPreferredAlternates); 108 INIT(QTMovieViewSetDrawSynchronously);109 90 INIT(QTGetSitesInMediaDownloadCache); 110 91 INIT(QTClearMediaDownloadCacheForSite); … … 116 97 INIT(CopyDefaultSearchProviderDisplayName); 117 98 INIT(Cursor); 118 #endif119 120 #if USE(CFNETWORK)121 INIT(GetDefaultHTTPCookieStorage);122 INIT(CopyCredentialFromCFPersistentStorage);123 INIT(SetCFURLRequestShouldContentSniff);124 INIT(SetRequestStorageSession);125 #endif126 127 #if !PLATFORM(IOS)128 99 INIT(SpeechSynthesisGetVoiceIdentifiers); 129 100 INIT(SpeechSynthesisGetDefaultVoiceIdentifierForLocale); … … 141 112 INIT(CreatePrivateStorageSession); 142 113 INIT(CopyRequestWithStorageSession); 143 INIT(CopyHTTPCookieStorage);144 114 INIT(GetHTTPCookieAcceptPolicy); 145 115 INIT(HTTPCookies); … … 149 119 INIT(DeleteHTTPCookie); 150 120 151 INIT(GetCFURLResponseMIMEType);152 INIT(GetCFURLResponseURL);153 INIT(GetCFURLResponseHTTPResponse);154 INIT(CopyCFURLResponseSuggestedFilename);155 INIT(SetCFURLResponseMIMEType);156 157 121 #if !PLATFORM(IOS) 158 122 INIT(SetMetadataURL); 159 #endif160 161 INIT(CFURLRequestAllowAllPostCaching);162 163 #if !PLATFORM(IOS)164 123 INIT(NSElasticDeltaForTimeDelta); 165 124 INIT(NSElasticDeltaForReboundDelta); -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r194000 r194378 42 42 #import <WebCore/ApplicationCacheStorage.h> 43 43 #import <WebCore/AudioSession.h> 44 #import <WebCore/CFNetworkSPI.h> 44 45 #import <WebCore/NetworkStorageSession.h> 45 46 #import <WebCore/PlatformCookieJar.h> … … 51 52 #import <wtf/RetainPtr.h> 52 53 #import <wtf/RunLoop.h> 53 54 enum {55 NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain = 356 };57 54 58 55 using namespace WebCore; … … 1768 1765 RetainPtr<CFHTTPCookieStorageRef> cookieStorage = NetworkStorageSession::defaultStorageSession().cookieStorage(); 1769 1766 ASSERT(cookieStorage); // Will fail when building without USE(CFNETWORK) and NetworkStorageSession::switchToNewTestingSession() was not called beforehand. 1770 WKSetHTTPCookieAcceptPolicy(cookieStorage.get(), policy);1767 CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage.get(), policy); 1771 1768 } 1772 1769 -
trunk/Source/WebKit2/ChangeLog
r194367 r194378 1 2015-12-22 Andy Estes <aestes@apple.com> 2 3 [CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI 4 https://bugs.webkit.org/show_bug.cgi?id=152463 5 6 Reviewed by Alexey Proskuryakov. 7 8 Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward 9 declared in CFNetworkSPI.h. 10 11 * NetworkProcess/cocoa/NetworkProcessCocoa.mm: 12 (WebKit::initializeNetworkSettings): 13 * NetworkProcess/mac/NetworkProcessMac.mm: 14 (WebKit::overrideSystemProxies): 15 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 16 (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): 17 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 18 (InitWebCoreSystemInterface): 19 1 20 2015-12-22 Brent Fulgham <bfulgham@apple.com> 2 21 -
trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm
r194318 r194378 52 52 static const unsigned preferredConnectionCount = 6; 53 53 54 WKInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount);54 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPLoadWidth, preferredConnectionCount); 55 55 56 56 Boolean keyExistsAndHasValidFormat = false; … … 60 60 61 61 if (WebCore::ResourceRequest::resourcePrioritiesEnabled()) { 62 WKSetHTTPRequestMaximumPriority(toPlatformRequestPriority(WebCore::ResourceLoadPriority::Highest)); 63 WKSetHTTPRequestMinimumFastLanePriority(toPlatformRequestPriority(WebCore::ResourceLoadPriority::Medium)); 62 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPPriorityNumLevels, toPlatformRequestPriority(WebCore::ResourceLoadPriority::Highest)); 63 #if PLATFORM(IOS) 64 _CFNetworkHTTPConnectionCacheSetLimit(kHTTPMinimumFastLanePriority, toPlatformRequestPriority(WebCore::ResourceLoadPriority::Medium)); 65 #endif 64 66 } 65 67 } -
trunk/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm
r192697 r194378 37 37 #import "SecItemShim.h" 38 38 #import "StringUtilities.h" 39 #import <WebCore/CFNetworkSPI.h> 39 40 #import <WebCore/CertificateInfo.h> 40 41 #import <WebCore/FileSystem.h> … … 96 97 97 98 if ([proxySettings count] > 0) 98 WKCFNetworkSetOverrideSystemProxySettings((CFDictionaryRef)proxySettings);99 _CFNetworkSetOverrideSystemProxySettings((CFDictionaryRef)proxySettings); 99 100 } 100 101 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r191998 r194378 32 32 #include "WebPage.h" 33 33 #include "WebProcess.h" 34 #include <WebCore/CFNetworkSPI.h> 34 35 #include <WebCore/Frame.h> 35 36 #include <WebCore/FrameLoader.h> … … 70 71 71 72 if (RetainPtr<CFHTTPCookieStorageRef> cookieStorage = NetworkStorageSession::defaultStorageSession().cookieStorage()) 72 WKSetHTTPCookieAcceptPolicy(cookieStorage.get(), policy);73 CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage.get(), policy); 73 74 74 75 for (const auto& session : SessionTracker::storageSessionMap().values()) { 75 76 if (session) 76 WKSetHTTPCookieAcceptPolicy(session->cookieStorage().get(), policy);77 CFHTTPCookieStorageSetCookieAcceptPolicy(session->cookieStorage().get(), policy); 77 78 } 78 79 } -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
r191904 r194378 41 41 #endif 42 42 INIT(CALayerEnumerateRectsBeingDrawnWithBlock); 43 INIT(CGContextGetShouldSmoothFonts);44 43 INIT(CGPatternCreateWithImageAndTransform); 45 44 #if !PLATFORM(IOS) … … 47 46 #endif 48 47 INIT(CopyCONNECTProxyResponse); 49 INIT(CopyNSURLResponseStatusLine);50 INIT(CopyNSURLResponseCertificateChain);51 48 #if !PLATFORM(IOS) 52 49 INIT(DrawBezeledTextArea); 53 INIT(DrawCapsLockIndicator);54 50 INIT(DrawFocusRing); 55 51 INIT(DrawFocusRingAtTime); … … 57 53 INIT(DrawMediaSliderTrack); 58 54 INIT(DrawMediaUIPart); 59 #endif60 INIT(GetHTTPRequestPriority);61 INIT(GetNSURLResponseLastModifiedDate);62 #if !PLATFORM(IOS)63 55 INIT(SignedPublicKeyAndChallengeString); 64 56 #endif … … 69 61 INIT(GetNSEventKeyChar); 70 62 INIT(HitTestMediaUIPart); 71 #endif72 INIT(InitializeMaximumHTTPConnectionCountPerHost);73 INIT(HTTPRequestEnablePipelining);74 #if !PLATFORM(IOS)75 63 INIT(MeasureMediaUIPart); 76 64 INIT(QTIncludeOnlyModernMediaFileTypes); … … 80 68 INIT(QTMovieMaxTimeLoaded); 81 69 INIT(QTMovieMaxTimeLoadedChangeNotification); 82 INIT(QTMovieMaxTimeSeekable);83 70 INIT(QTMovieResolvedURL); 84 71 INIT(QTMovieSelectPreferredAlternates); 85 72 INIT(QTMovieSetShowClosedCaptions); 86 INIT(QTMovieViewSetDrawSynchronously);87 73 INIT(QTGetSitesInMediaDownloadCache); 88 74 INIT(QTClearMediaDownloadCacheForSite); 89 75 INIT(QTClearMediaDownloadCache); 90 INIT(SetCGFontRenderingMode);91 76 #endif 92 77 INIT(SetCONNECTProxyAuthorizationForStream); … … 95 80 INIT(SetDragImage); 96 81 #endif 97 INIT(SetHTTPRequestMaximumPriority);98 INIT(SetHTTPRequestPriority);99 INIT(SetHTTPRequestMinimumFastLanePriority);100 INIT(SetNSURLRequestShouldContentSniff);101 82 INIT(CreatePrivateStorageSession); 102 83 INIT(CopyRequestWithStorageSession); 103 INIT(CopyHTTPCookieStorage);104 84 INIT(GetHTTPCookieAcceptPolicy); 105 INIT(SetHTTPCookieAcceptPolicy);106 85 INIT(HTTPCookies); 107 86 INIT(HTTPCookiesForURL); … … 112 91 #if !PLATFORM(IOS) 113 92 INIT(SetMetadataURL); 114 #endif // !PLATFORM(IOS)115 116 #if !PLATFORM(IOS)117 93 INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard); 118 94 INIT(CopyDefaultSearchProviderDisplayName); … … 120 96 INIT(WindowSetScaledFrame); 121 97 INIT(WindowSetAlpha); 122 #endif // !PLATFORM(IOS)123 124 #if USE(CFNETWORK)125 INIT(GetDefaultHTTPCookieStorage);126 INIT(CopyCredentialFromCFPersistentStorage);127 INIT(SetCFURLRequestShouldContentSniff);128 INIT(SetRequestStorageSession);129 #endif130 131 #if !PLATFORM(IOS)132 98 INIT(SpeechSynthesisGetVoiceIdentifiers); 133 99 INIT(SpeechSynthesisGetDefaultVoiceIdentifierForLocale); … … 142 108 INIT(CreateAXUIElementRef); 143 109 INIT(UnregisterUniqueIdForElement); 144 #endif145 146 INIT(GetCFURLResponseMIMEType);147 INIT(GetCFURLResponseURL);148 INIT(GetCFURLResponseHTTPResponse);149 INIT(CopyCFURLResponseSuggestedFilename);150 INIT(SetCFURLResponseMIMEType);151 152 INIT(CFURLRequestAllowAllPostCaching);153 154 #if !PLATFORM(IOS)155 110 INIT(NSElasticDeltaForTimeDelta); 156 111 INIT(NSElasticDeltaForReboundDelta);
Note:
See TracChangeset
for help on using the changeset viewer.