[Windows WebKit2] Use cookies set in WebKit1
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 May 2011 19:10:08 +0000 (19:10 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 May 2011 19:10:08 +0000 (19:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=60274

Reviewed by Darin Adler.

Source/WebCore:

Make sure any Private Browsing session is based off the default session.

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createPrivateBrowsingStorageSession):

Source/WebKit2:

Properly handle the case where there is no serialized default storage session by not trying
to encode or decode 0, while still making sure to decode any valid storage session.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
Only encode the storage session if there is one to encode.
(WebKit::WebProcessCreationParameters::decode):
Only decode the storage session there is one to decode.
* Shared/WebProcessCreationParameters.h:

WebKitLibraries:

Update WKSI with the changes to wkCreatePrivateStorageSession.

* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib/WebKitSystemInterface.lib:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86369 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebProcessCreationParameters.cpp
WebKitLibraries/ChangeLog
WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
WebKitLibraries/win/lib/WebKitSystemInterface.lib

index a1d831e..03a6247 100644 (file)
@@ -1,3 +1,15 @@
+2011-05-12  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Darin Adler.
+
+        [Windows WebKit2] Use cookies set in WebKit1
+        https://bugs.webkit.org/show_bug.cgi?id=60274
+
+        Make sure any Private Browsing session is based off the default session.
+
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
+
 2011-05-12  Rob Buis  <rbuis@rim.com>
 
         Reviewed by Eric Seidel.
index 5c47e5e..bf3c6bd 100644 (file)
@@ -736,7 +736,7 @@ bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame* frame)
 
 RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier)
 {
-    return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier));
+    return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier, defaultStorageSession()));
 }
 
 String ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase()
index 41224d8..36bfab6 100644 (file)
@@ -1,3 +1,21 @@
+2011-05-12  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Darin Adler.
+
+        [Windows WebKit2] Use cookies set in WebKit1
+        https://bugs.webkit.org/show_bug.cgi?id=60274
+
+        Properly handle the case where there is no serialized default storage session by not trying
+        to encode or decode 0, while still making sure to decode any valid storage session.
+
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
+        (WebKit::WebProcessCreationParameters::encode):
+        Only encode the storage session if there is one to encode.
+        (WebKit::WebProcessCreationParameters::decode):
+        Only decode the storage session there is one to decode.
+        * Shared/WebProcessCreationParameters.h:
+
 2011-05-11  Brian Weinstein  <bweinstein@apple.com>
 
         Reviewed by Anders Carlsson.
index 5c7fc70..001fa3c 100644 (file)
@@ -83,8 +83,10 @@ void WebProcessCreationParameters::encode(CoreIPC::ArgumentEncoder* encoder) con
     encoder->encode(cfURLCacheMemoryCapacity);
     encoder->encode(initialHTTPCookieAcceptPolicy);
 #if USE(CFURLSTORAGESESSIONS)
-    if (CFDataRef data = serializedDefaultStorageSession.get())
-        CoreIPC::encode(encoder, data);
+    CFDataRef storageSession = serializedDefaultStorageSession.get();
+    encoder->encodeBool(storageSession);
+    if (storageSession)
+        CoreIPC::encode(encoder, storageSession);
 #endif // USE(CFURLSTORAGESESSIONS)
 #endif
 }
@@ -157,7 +159,10 @@ bool WebProcessCreationParameters::decode(CoreIPC::ArgumentDecoder* decoder, Web
     if (!decoder->decode(parameters.initialHTTPCookieAcceptPolicy))
         return false;
 #if USE(CFURLSTORAGESESSIONS)
-    if (parameters.serializedDefaultStorageSession && !CoreIPC::decode(decoder, parameters.serializedDefaultStorageSession))
+    bool hasStorageSession = false;
+    if (!decoder->decode(hasStorageSession))
+        return false;
+    if (hasStorageSession && !CoreIPC::decode(decoder, parameters.serializedDefaultStorageSession))
         return false;
 #endif // USE(CFURLSTORAGESESSIONS)
 #endif
index 9966a56..0933167 100644 (file)
@@ -1,3 +1,15 @@
+2011-05-12  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Darin Adler.
+
+        [Windows WebKit2] Use cookies set in WebKit1
+        https://bugs.webkit.org/show_bug.cgi?id=60274
+
+        Update WKSI with the changes to wkCreatePrivateStorageSession.
+
+        * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+        * win/lib/WebKitSystemInterface.lib:
+
 2011-05-11  Jessie Berlin  <jberlin@apple.com>
 
         Reviewed by Steve Falkenburg.
index 6cf90d8..087476d 100644 (file)
@@ -99,7 +99,7 @@ void wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);
 CFArrayRef wkCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
 void wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
 
-CFURLStorageSessionRef wkCreatePrivateStorageSession(CFStringRef identifier);
+CFURLStorageSessionRef wkCreatePrivateStorageSession(CFStringRef identifier, CFURLStorageSessionRef defaultStorageSession);
 void wkSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
 CFURLCacheRef wkCopyURLCache(CFURLStorageSessionRef);
 CFHTTPCookieStorageRef wkCopyHTTPCookieStorage(CFURLStorageSessionRef);
index b1fe6a2..39b597e 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface.lib differ