https://bugs.webkit.org/show_bug.cgi?id=55435
Reviewed by Adam Roben.
Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
* WebCore.exp.in:
Support using WKCopyRequestWithStorageSession in WebCore.
* platform/mac/WebCoreSystemInterface.h:
Ditto.
* platform/mac/WebCoreSystemInterface.mm:
Ditto.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::makeFinalRequest):
If Private Browsing is enabled, set the Private Browsing Storage Session on the request.
(WebCore::ResourceHandle::willSendRequest):
Ditto.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
Ditto.
(WebCore::ResourceHandle::willSendRequest):
Ditto.
* platform/network/cf/ResourceRequest.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::setStorageSession):
Call through to WKSI.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::setStorageSession):
Ditto.
Source/WebKit/mac: WebKit2: Use CFNetwork Sessions API.
https://bugs.webkit.org/show_bug.cgi?id=55435.
Reviewed by Adam Roben.
Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Support using WKCopyRequestWithStorageSession in WebCore.
Source/WebKit2: WebKit2: Use CFNetwork Sessions API.
https://bugs.webkit.org/show_bug.cgi?id=55435
Reviewed by Adam Roben.
Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Support using WKCopyRequestWithStorageSession in WebCore.
WebKitLibraries: WebKit2: Use CFNetwork Sessions API.
https://bugs.webkit.org/show_bug.cgi?id=55435
Reviewed by Adam Roben.
Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
Update WebKitSystemInterface headers and libraries with the new functions.
* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceSnowLeopard.a:
* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib/WebKitSystemInterface.lib:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80294
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-03-03 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2: Use CFNetwork Sessions API.
+ https://bugs.webkit.org/show_bug.cgi?id=55435
+
+ Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
+
+ * WebCore.exp.in:
+ Support using WKCopyRequestWithStorageSession in WebCore.
+ * platform/mac/WebCoreSystemInterface.h:
+ Ditto.
+ * platform/mac/WebCoreSystemInterface.mm:
+ Ditto.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::makeFinalRequest):
+ If Private Browsing is enabled, set the Private Browsing Storage Session on the request.
+ (WebCore::ResourceHandle::willSendRequest):
+ Ditto.
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::createNSURLConnection):
+ Ditto.
+ (WebCore::ResourceHandle::willSendRequest):
+ Ditto.
+
+ * platform/network/cf/ResourceRequest.h:
+ * platform/network/cf/ResourceRequestCFNet.cpp:
+ (WebCore::ResourceRequest::setStorageSession):
+ Call through to WKSI.
+ * platform/network/mac/ResourceRequestMac.mm:
+ (WebCore::ResourceRequest::setStorageSession):
+ Ditto.
+
2011-03-03 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
_wkSignalCFReadStreamError
_wkSignalCFReadStreamHasBytes
_wkCreatePrivateStorageSession
+_wkCopyRequestWithStorageSession
#if !defined(NDEBUG)
__ZN7WebCore20LogNotYetImplementedE
typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
extern CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
+extern NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
}
AXUIElementRef (*wkCreateAXUIElementRef)(id element);
CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
-
+NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
static CFURLRequestRef makeFinalRequest(const ResourceRequest& request, bool shouldContentSniff)
{
CFMutableURLRequestRef newRequest = CFURLRequestCreateMutableCopy(kCFAllocatorDefault, request.cfURLRequest());
+
+ if (CFURLStorageSessionRef storageSession = ResourceHandle::privateBrowsingStorageSession())
+ wkSetRequestStorageSession(storageSession, newRequest);
if (!shouldContentSniff)
wkSetCFURLRequestShouldContentSniff(newRequest, false);
if (!protocolHostAndPortAreEqual(request.url(), redirectResponse.url()))
request.clearHTTPAuthorization();
+ if (CFURLStorageSessionRef storageSession = privateBrowsingStorageSession())
+ request.setStorageSession(storageSession);
+
client()->willSendRequest(this, request, redirectResponse);
}
#endif
#endif
+#if USE(CFURLSTORAGESESSIONS)
+typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
+#endif
+
namespace WebCore {
class ResourceRequest : public ResourceRequestBase {
NSURLRequest* nsURLRequest() const;
#endif
+#if USE(CFURLSTORAGESESSIONS)
+ void setStorageSession(CFURLStorageSessionRef);
+#endif
+
private:
friend class ResourceRequestBase;
m_httpBody = httpBodyFromRequest(m_cfRequest.get());
}
+void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
+{
+ CFMutableURLRequestRef cfRequest = CFURLRequestCreateMutableCopy(0, m_cfRequest.get());
+ wkSetRequestStorageSession(storageSession, cfRequest);
+ m_cfRequest.adoptCF(cfRequest);
+}
+
#endif // USE(CFNETWORK)
unsigned initializeMaximumHTTPConnectionCountPerHost()
static bool supportsSettingConnectionProperties = [NSURLConnection instancesRespondToSelector:@selector(_initWithRequest:delegate:usesCache:maxContentLength:startImmediately:connectionProperties:)];
#endif
+ if (CFURLStorageSessionRef storageSession = privateBrowsingStorageSession())
+ nsRequest = [wkCopyRequestWithStorageSession(storageSession, nsRequest) autorelease];
+
if (supportsSettingConnectionProperties) {
NSDictionary *sessionID = shouldUseCredentialStorage ? [NSDictionary dictionary] : [NSDictionary dictionaryWithObject:@"WebKitPrivateSession" forKey:@"_kCFURLConnectionSessionID"];
NSDictionary *propertyDictionary = [NSDictionary dictionaryWithObject:sessionID forKey:@"kCFURLConnectionSocketStreamProperties"];
if (!protocolHostAndPortAreEqual(request.url(), redirectResponse.url()))
request.clearHTTPAuthorization();
+ if (CFURLStorageSessionRef storageSession = privateBrowsingStorageSession())
+ request.setStorageSession(storageSession);
+
client()->willSendRequest(this, request, redirectResponse);
}
[NSURLProtocol setProperty:@"" forKey:@"WebDataRequest" inRequest:(NSMutableURLRequest *)nsURLRequest()];
}
+void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
+{
+ m_nsRequest = wkCopyRequestWithStorageSession(storageSession, m_nsRequest.get());
+}
+
} // namespace WebCore
#endif // !USE(CFNETWORK)
+2011-03-03 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2: Use CFNetwork Sessions API.
+ https://bugs.webkit.org/show_bug.cgi?id=55435.
+
+ Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+ Support using WKCopyRequestWithStorageSession in WebCore.
+
2011-03-02 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
INIT(CreateAXUIElementRef);
INIT(UnregisterUniqueIdForElement);
INIT(CreatePrivateStorageSession);
+ INIT(CopyRequestWithStorageSession);
didInit = true;
}
+2011-03-03 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2: Use CFNetwork Sessions API.
+ https://bugs.webkit.org/show_bug.cgi?id=55435
+
+ Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
+
+ * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+ Support using WKCopyRequestWithStorageSession in WebCore.
+
2011-03-03 Adam Roben <aroben@apple.com>
Don't try to paint outside the page's bounds
INIT(SignalCFReadStreamError);
INIT(SignalCFReadStreamHasBytes);
INIT(CreatePrivateStorageSession);
+ INIT(CopyRequestWithStorageSession);
#if !defined(BUILDING_ON_SNOW_LEOPARD)
INIT(IOSurfaceContextCreate);
+2011-03-03 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2: Use CFNetwork Sessions API.
+ https://bugs.webkit.org/show_bug.cgi?id=55435
+
+ Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
+
+ Update WebKitSystemInterface headers and libraries with the new functions.
+
+ * WebKitSystemInterface.h:
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+ * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+ * win/lib/WebKitSystemInterface.lib:
+
2011-03-02 Jessie Berlin <jberlin@apple.com>
Update WebKitSystemInterface libraries. Library changes reviewed by Darin Adler.
typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
+NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
void WKSetVisibleApplicationName(CFStringRef);
void wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
CFURLStorageSessionRef wkCreatePrivateStorageSession(CFStringRef identifier);
+void wkSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
CFArrayRef wkCFURLCacheCopyAllHostNamesInPersistentStore();
void wkCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostNames);