[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
ap at apple.com
ap at apple.com
Wed Dec 22 14:54:13 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 167426a37c730b7e2a1c22263361e438c617a6f7
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 23 22:17:20 2010 +0000
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=48083
<rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0fce9b1..9bdf778 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,56 @@
+2010-10-23 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48083
+ <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ Added CookieStorage.h to build files that contain headers.
+
+ * WebCore.xcodeproj/project.pbxproj: Added CookieStorage.h and CookieStorageMac.mm.
+
+ * WebCore.exp.in: Export _wkSetCookieStoragePrivateBrowsingEnabled (WebKit initializes WKSI
+ on WebCore's behalf).
+
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+ More work for passing the function pointer down to WebCore.
+
+ * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): Tell cookie manager to
+ when to use private browsing mode. Note that although this is a per-page setting, it
+ actually has global effect.
+
+ * page/Settings.h: Extended a comment about what private browsing does.
+
+ * platform/android/TemporaryLinkStubs.cpp: (setCookieStoragePrivateBrowsingEnabled):
+ * platform/chromium/TemporaryLinkStubs.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+ * platform/efl/TemporaryLinkStubs.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+ * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+ * platform/haiku/TemporaryLinkStubs.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+ * platform/qt/TemporaryLinkStubsQt.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+ Added an empty implementation for ports that don't implement private browsing, or implement
+ it in ways I cannot discover.
+
+ * platform/network/CookieStorage.h: Added. I'm not entirely sure how this is different from
+ CookieJar.h, just following a precedent already set by Windows port with CookieStorageWin.h.
+
+ * platform/network/mac/CookieStorageMac.mm: Added.
+ (WebCore::setCookieStoragePrivateBrowsingEnabled): Call a WKSI function to enable private
+ browsing mode for cookies.
+
+ * platform/network/cf/CookieStorageCFNet.cpp:
+ (WebCore::currentCookieStorage): Added ASSERT(isMainThread()).
+ (WebCore::setCurrentCookieStorage): Ditto.
+ (WebCore::setCookieStoragePrivateBrowsingEnabled): Set cookie storage to a private one
+ when in private browsing mode. ResourceHandle applies the storage to each individual request.
+
+ * platform/network/cf/CookieStorageCFNet.h: Added a comment explaining that these functions
+ are only for WebKit1.
+
2010-10-23 David Kilzer <ddkilzer at apple.com>
<http://webkit.org/b/48181> Add missing include of MacErrors.h
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 26b692d..c9689f7 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -2372,6 +2372,7 @@ webcore_sources += \
WebCore/platform/network/BlobResourceHandle.cpp \
WebCore/platform/network/BlobResourceHandle.h \
WebCore/platform/network/BlobStorageData.h \
+ WebCore/platform/network/CookieStorage.h \
WebCore/platform/network/Credential.cpp \
WebCore/platform/network/Credential.h \
WebCore/platform/network/DNS.h \
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index a58699f..233de29 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -1178,6 +1178,7 @@ _wkQTMovieViewSetDrawSynchronously
_wkSetCGFontRenderingMode
_wkSetCONNECTProxyAuthorizationForStream
_wkSetCONNECTProxyForStream
+_wkSetCookieStoragePrivateBrowsingEnabled
_wkSetDragImage
_wkSetNSURLConnectionDefersCallbacks
_wkSetNSURLRequestShouldContentSniff
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 4a417f3..ddde4fd 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3014,6 +3014,7 @@
'platform/network/BlobData.h',
'platform/network/BlobRegistry.h',
'platform/network/BlobStorageData.h',
+ 'platform/network/CookieStorage.h',
'platform/network/Credential.cpp',
'platform/network/Credential.h',
'platform/network/DNS.h',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index b6ac4ae..bf31b67 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2103,6 +2103,7 @@ HEADERS += \
platform/network/BlobRegistryImpl.h \
platform/network/BlobResourceHandle.h \
platform/network/BlobStorageData.h \
+ platform/network/CookieStorage.h \
platform/network/Credential.h \
platform/network/FormDataBuilder.h \
platform/network/FormData.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index bd669fa..629baed 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -27506,6 +27506,10 @@
>
</File>
<File
+ RelativePath="..\platform\network\CookieStorage.h"
+ >
+ </File>
+ <File
RelativePath="..\platform\network\Credential.cpp"
>
</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 9e3abd4..8f09b8b 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -5333,6 +5333,8 @@
E1284BD61044A01E00EAEB52 /* DOMPageTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E1284BD41044A01E00EAEB52 /* DOMPageTransitionEvent.h */; };
E12EDB7B0B308A78002704B6 /* EventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = E12EDB7A0B308A78002704B6 /* EventTarget.h */; settings = {ATTRIBUTES = (Private, ); }; };
E12EDBEA0B308E0B002704B6 /* EventTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12EDBE90B308E0B002704B6 /* EventTarget.cpp */; };
+ E13F01EB1270E10D00DFBA71 /* CookieStorage.h in Resources */ = {isa = PBXBuildFile; fileRef = E13F01EA1270E10D00DFBA71 /* CookieStorage.h */; };
+ E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E13F01F01270E19000DFBA71 /* CookieStorageMac.mm */; };
E15A36D71104572000B7B639 /* XMLNSNames.h in Headers */ = {isa = PBXBuildFile; fileRef = E15A36D61104572000B7B639 /* XMLNSNames.h */; };
E15A36D91104572700B7B639 /* XMLNSNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E15A36D81104572700B7B639 /* XMLNSNames.cpp */; };
E169803D1133542D00894115 /* CRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E169803C1133542D00894115 /* CRuntimeObject.h */; };
@@ -11347,6 +11349,8 @@
E1284BD41044A01E00EAEB52 /* DOMPageTransitionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMPageTransitionEvent.h; sourceTree = "<group>"; };
E12EDB7A0B308A78002704B6 /* EventTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTarget.h; sourceTree = "<group>"; };
E12EDBE90B308E0B002704B6 /* EventTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTarget.cpp; sourceTree = "<group>"; };
+ E13F01EA1270E10D00DFBA71 /* CookieStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CookieStorage.h; sourceTree = "<group>"; };
+ E13F01F01270E19000DFBA71 /* CookieStorageMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CookieStorageMac.mm; sourceTree = "<group>"; };
E15A36D61104572000B7B639 /* XMLNSNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLNSNames.h; sourceTree = "<group>"; };
E15A36D81104572700B7B639 /* XMLNSNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNSNames.cpp; sourceTree = "<group>"; };
E169803C1133542D00894115 /* CRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRuntimeObject.h; sourceTree = "<group>"; };
@@ -12954,6 +12958,7 @@
2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */,
2EDEF1F2121B0EFC00726DB2 /* BlobStorageData.h */,
514C76580CE923A1007EF3CD /* Credential.cpp */,
+ E13F01EA1270E10D00DFBA71 /* CookieStorage.h */,
514C76590CE923A1007EF3CD /* Credential.h */,
51A052321058774F00CC9E95 /* CredentialStorage.cpp */,
51A052311058774F00CC9E95 /* CredentialStorage.h */,
@@ -13001,6 +13006,7 @@
934F71430D5A6F5300018D69 /* AuthenticationChallenge.h */,
514C76420CE9234E007EF3CD /* AuthenticationMac.h */,
514C76430CE9234E007EF3CD /* AuthenticationMac.mm */,
+ E13F01F01270E19000DFBA71 /* CookieStorageMac.mm */,
E1B4CD2410B322E200BFFD7E /* CredentialStorageMac.mm */,
514C76440CE9234E007EF3CD /* FormDataStreamMac.h */,
514C76450CE9234E007EF3CD /* FormDataStreamMac.mm */,
@@ -21267,6 +21273,7 @@
85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
+ E13F01EB1270E10D00DFBA71 /* CookieStorage.h in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -23696,6 +23703,7 @@
9728C3131268E4390041E89B /* MarkupAccumulator.cpp in Sources */,
E18772F1126E2629003DD586 /* Language.cpp in Sources */,
7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */,
+ E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 3c95b59..dc8fcb5 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -28,6 +28,7 @@
#include "BackForwardList.h"
#include "CachedResourceLoader.h"
+#include "CookieStorage.h"
#include "DOMTimer.h"
#include "Database.h"
#include "Frame.h"
@@ -312,6 +313,9 @@ void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
if (m_privateBrowsingEnabled == privateBrowsingEnabled)
return;
+ // FIXME: We can only enable cookie private browsing mode globally, so it's misleading to have it as a per-page setting.
+ setCookieStoragePrivateBrowsingEnabled(privateBrowsingEnabled);
+
m_privateBrowsingEnabled = privateBrowsingEnabled;
m_page->privateBrowsingStateChanged();
}
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index c217a0d..a8018dd 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -147,6 +147,8 @@ namespace WebCore {
// - Application Cache
// - Back/Forward Page History
// - Page Search Results
+ // - HTTP Cookies
+ // - Plug-ins (that support NPNVprivateModeBool)
void setPrivateBrowsingEnabled(bool);
bool privateBrowsingEnabled() const { return m_privateBrowsingEnabled; }
diff --git a/WebCore/platform/android/TemporaryLinkStubs.cpp b/WebCore/platform/android/TemporaryLinkStubs.cpp
index fe4514b..a4d0a95 100644
--- a/WebCore/platform/android/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/android/TemporaryLinkStubs.cpp
@@ -36,6 +36,7 @@
#include "ContextMenu.h"
#include "ContextMenuItem.h"
#include "CookieJar.h"
+#include "CookieStorage.h"
#include "Cursor.h"
#include "Database.h"
#include "DocumentFragment.h"
@@ -500,4 +501,9 @@ OpaqueJSClassContextData::~OpaqueJSClassContextData()
notImplemented();
}
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+ notImplemented();
+}
+
#endif
diff --git a/WebCore/platform/chromium/TemporaryLinkStubs.cpp b/WebCore/platform/chromium/TemporaryLinkStubs.cpp
index 1f60d95..3c747d0 100644
--- a/WebCore/platform/chromium/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/chromium/TemporaryLinkStubs.cpp
@@ -30,6 +30,7 @@
#include "config.h"
+#include "CookieStorage.h"
#include "KURL.h"
#include "NotImplemented.h"
#include "SharedBuffer.h"
@@ -48,4 +49,9 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String&)
return 0;
}
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+ notImplemented();
+}
+
} // namespace WebCore
diff --git a/WebCore/platform/efl/TemporaryLinkStubs.cpp b/WebCore/platform/efl/TemporaryLinkStubs.cpp
index 24f1111..ef6e6f7 100644
--- a/WebCore/platform/efl/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/efl/TemporaryLinkStubs.cpp
@@ -30,6 +30,7 @@
#include "config.h"
#include "AXObjectCache.h"
+#include "CookieStorage.h"
#include "Editor.h"
#include "FTPDirectoryDocument.h"
#include "FrameView.h"
@@ -61,5 +62,10 @@ float userIdleTime()
return FLT_MAX;
}
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+ notImplemented();
+}
+
}
diff --git a/WebCore/platform/gtk/TemporaryLinkStubs.cpp b/WebCore/platform/gtk/TemporaryLinkStubs.cpp
index 8c12fcb..5c27080 100644
--- a/WebCore/platform/gtk/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/gtk/TemporaryLinkStubs.cpp
@@ -28,6 +28,7 @@
#include "config.h"
#include "AXObjectCache.h"
+#include "CookieStorage.h"
#include "DNS.h"
#include "Editor.h"
#include "FrameView.h"
@@ -46,5 +47,6 @@ namespace WebCore {
void getSupportedKeySizes(Vector<String>&) { notImplemented(); }
String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url) { return String(); }
float userIdleTime() { notImplemented(); return FLT_MAX; } // return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed
+void setCookieStoragePrivateBrowsingEnabled(bool) { notImplemented(); }
}
diff --git a/WebCore/platform/haiku/TemporaryLinkStubs.cpp b/WebCore/platform/haiku/TemporaryLinkStubs.cpp
index aa3d538..58ab873 100644
--- a/WebCore/platform/haiku/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/haiku/TemporaryLinkStubs.cpp
@@ -33,6 +33,7 @@
#include "config.h"
+#include "CookieStorage.h"
#include "KURL.h"
#include "NotImplemented.h"
#include "PlatformString.h"
@@ -76,5 +77,10 @@ String KURL::fileSystemPath() const
return String();
}
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+ notImplemented();
+}
+
} // namespace WebCore
diff --git a/WebCore/platform/mac/WebCoreSystemInterface.h b/WebCore/platform/mac/WebCoreSystemInterface.h
index 7cac443..64fc54a 100644
--- a/WebCore/platform/mac/WebCoreSystemInterface.h
+++ b/WebCore/platform/mac/WebCoreSystemInterface.h
@@ -132,6 +132,7 @@ extern void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
extern void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
extern void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
extern void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
+extern void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
extern void (*wkSetDragImage)(NSImage*, NSPoint offset);
extern void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
extern void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
diff --git a/WebCore/platform/mac/WebCoreSystemInterface.mm b/WebCore/platform/mac/WebCoreSystemInterface.mm
index 52e0064..217f04c 100644
--- a/WebCore/platform/mac/WebCoreSystemInterface.mm
+++ b/WebCore/platform/mac/WebCoreSystemInterface.mm
@@ -67,6 +67,7 @@ void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
+void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
void (*wkSetDragImage)(NSImage*, NSPoint offset);
void (*wkSetPatternBaseCTM)(CGContextRef, CGAffineTransform);
void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
diff --git a/WebCore/platform/network/CookieStorage.h b/WebCore/platform/network/CookieStorage.h
new file mode 100644
index 0000000..56ca5dc
--- /dev/null
+++ b/WebCore/platform/network/CookieStorage.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CookieStorage_h
+#define CookieStorage_h
+
+namespace WebCore {
+
+void setCookieStoragePrivateBrowsingEnabled(bool);
+
+}
+
+#endif
diff --git a/WebCore/platform/network/cf/CookieStorageCFNet.cpp b/WebCore/platform/network/cf/CookieStorageCFNet.cpp
index aefbcfb..f407899 100644
--- a/WebCore/platform/network/cf/CookieStorageCFNet.cpp
+++ b/WebCore/platform/network/cf/CookieStorageCFNet.cpp
@@ -36,6 +36,8 @@ static RetainPtr<CFHTTPCookieStorageRef> s_cookieStorage;
CFHTTPCookieStorageRef currentCookieStorage()
{
+ ASSERT(isMainThread());
+
if (s_cookieStorage)
return s_cookieStorage.get();
return wkGetDefaultHTTPCookieStorage();
@@ -43,7 +45,19 @@ CFHTTPCookieStorageRef currentCookieStorage()
void setCurrentCookieStorage(CFHTTPCookieStorageRef cookieStorage)
{
+ ASSERT(isMainThread());
+
s_cookieStorage = cookieStorage;
}
+void setCookieStoragePrivateBrowsingEnabled(bool enabled)
+{
+ ASSERT(isMainThread());
+
+ if (enabled)
+ s_cookieStorage.adoptPtr(wkCreatePrivateHTTPCookieStorage());
+ else
+ s_cookieStorage = 0;
+}
+
}
diff --git a/WebCore/platform/network/cf/CookieStorageCFNet.h b/WebCore/platform/network/cf/CookieStorageCFNet.h
index 59bc3ce..fc980c5 100644
--- a/WebCore/platform/network/cf/CookieStorageCFNet.h
+++ b/WebCore/platform/network/cf/CookieStorageCFNet.h
@@ -31,7 +31,8 @@ typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
namespace WebCore {
CFHTTPCookieStorageRef currentCookieStorage();
-
+
+ // Needed for WebKit1 API only.
void setCurrentCookieStorage(CFHTTPCookieStorageRef cookieStorage);
}
diff --git a/WebCore/platform/network/mac/CookieStorageMac.mm b/WebCore/platform/network/mac/CookieStorageMac.mm
new file mode 100644
index 0000000..ab26f7b
--- /dev/null
+++ b/WebCore/platform/network/mac/CookieStorageMac.mm
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CookieStorage.h"
+
+#import "WebCoreSystemInterface.h"
+
+namespace WebCore {
+
+void setCookieStoragePrivateBrowsingEnabled(bool enabled)
+{
+ wkSetCookieStoragePrivateBrowsingEnabled(enabled);
+}
+
+}
diff --git a/WebCore/platform/qt/TemporaryLinkStubsQt.cpp b/WebCore/platform/qt/TemporaryLinkStubsQt.cpp
index 15933e8..d7b5104 100644
--- a/WebCore/platform/qt/TemporaryLinkStubsQt.cpp
+++ b/WebCore/platform/qt/TemporaryLinkStubsQt.cpp
@@ -35,6 +35,7 @@
#include "AXObjectCache.h"
#include "CachedResource.h"
#include "CookieJar.h"
+#include "CookieStorage.h"
#include "Cursor.h"
#include "DNS.h"
#include "FTPDirectoryDocument.h"
@@ -123,6 +124,11 @@ float userIdleTime()
}
#endif
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+ notImplemented();
+}
+
}
// vim: ts=4 sw=4 et
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index af45a63..e33dbb3 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-23 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48083
+ <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+ * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Initialize the new method.
+
2010-10-22 Sam Weinig <sam at webkit.org>
Reviewed by Anders Carlsson.
diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.mm b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
index 03cb33f..caea204 100644
--- a/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
+++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
@@ -73,6 +73,7 @@ void InitWebCoreSystemInterface(void)
INIT(SetCGFontRenderingMode);
INIT(SetCONNECTProxyAuthorizationForStream);
INIT(SetCONNECTProxyForStream);
+ INIT(SetCookieStoragePrivateBrowsingEnabled);
INIT(SetDragImage);
INIT(SetNSURLConnectionDefersCallbacks);
INIT(SetNSURLRequestShouldContentSniff);
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 4f77e08..f8e6cf2 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-23 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48083
+ <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+ * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
+ Initialize the new method.
+
2010-10-21 Timothy Hatcher <timothy at apple.com>
Stub out WebInspectorFrontendClient.
diff --git a/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm b/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
index caff262..6c89bbd 100644
--- a/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
+++ b/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
@@ -79,6 +79,7 @@ void InitWebCoreSystemInterface(void)
INIT(SetCGFontRenderingMode);
INIT(SetCONNECTProxyAuthorizationForStream);
INIT(SetCONNECTProxyForStream);
+ INIT(SetCookieStoragePrivateBrowsingEnabled);
INIT(SetDragImage);
INIT(SetNSURLConnectionDefersCallbacks);
INIT(SetNSURLRequestShouldContentSniff);
diff --git a/WebKitLibraries/ChangeLog b/WebKitLibraries/ChangeLog
index a3d1d8a..8d61b46 100644
--- a/WebKitLibraries/ChangeLog
+++ b/WebKitLibraries/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-23 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48083
+ <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+ * WebKitSystemInterface.h:
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+ * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+ * win/lib/WebKitSystemInterface.lib:
+ * win/lib/WebKitSystemInterface_debug.lib:
+ Updated WebKitSystemInterface with necessary methods.
+
2010-10-22 Adam Roben <aroben at apple.com>
Turn on ENABLE_3D_RENDERING on all Windows builds
diff --git a/WebKitLibraries/WebKitSystemInterface.h b/WebKitLibraries/WebKitSystemInterface.h
index b67906d..79e816f 100644
--- a/WebKitLibraries/WebKitSystemInterface.h
+++ b/WebKitLibraries/WebKitSystemInterface.h
@@ -60,6 +60,8 @@ void WKDisableCGDeferredUpdates(void);
Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
+void WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
+
unsigned WKGetNSAutoreleasePoolCount(void);
void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
diff --git a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
index 87e9b2d..0de4a0b 100644
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
diff --git a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
index 7ac0fcb..2a5ca23 100644
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
diff --git a/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h b/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
index a87cfb6..52aac61 100644
--- a/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
+++ b/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
@@ -85,6 +85,7 @@ CFDictionaryRef wkGetSSLCertificateInfo(CFURLResponseRef);
void* wkGetSSLPeerCertificateData(CFDictionaryRef);
void* wkGetSSLCertificateChainContext(CFDictionaryRef);
CFHTTPCookieStorageRef wkGetDefaultHTTPCookieStorage();
+CFHTTPCookieStorageRef wkCreatePrivateHTTPCookieStorage();
void wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool);
CFStringRef wkCopyFoundationCacheDirectory();
void wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);
diff --git a/WebKitLibraries/win/lib/WebKitSystemInterface.lib b/WebKitLibraries/win/lib/WebKitSystemInterface.lib
index 6e2018b..7ef03bf 100644
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface.lib differ
diff --git a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib
index b9f1433..c07a17b 100644
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib differ
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list