[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 11:19:24 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ffaa4184b5829fc1d017c9eb6c2fae0ccfb13c5a
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 19 15:29:25 2010 +0000
WebKit2 does not have application cache
https://bugs.webkit.org/show_bug.cgi?id=42552
Reviewed by Adam Roben.
WebKit2:
* Shared/CoreIPCSupport/WebProcessMessageKinds.h:
(WebProcessMessage::):
Add SetApplicationCacheDirectory.
* Shared/WebPreferencesStore.h:
(WebKit::WebPreferencesStore::encode):
(WebKit::WebPreferencesStore::decode):
add offlineWebApplicationCacheEnabled.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetOfflineWebApplicationCacheEnabled):
(WKPreferencesGetOfflineWebApplicationCacheEnabled):
* UIProcess/API/C/WKPreferences.h:
Add getters/setters for whether the application cache is enabled.
* UIProcess/WebContext.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::setOfflineWebApplicationCacheEnabled):
Update the store and call update().
* UIProcess/WebPreferences.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
Ask the web process to set the application cache directory.
* UIProcess/mac/WebContextMac.mm: Added.
(WebKit::WebContext::applicationCacheDirectory):
Return the application cache directory.
* UIProcess/win/WebContextWin.cpp: Added.
(WebKit::WebContext::applicationCacheDirectory):
Ditto.
* WebKit2.xcodeproj/project.pbxproj:
Add WebContextMac.mm
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::preferencesDidChange):
(WebKit::WebPage::didReceiveMessage):
Handle PreferencesDidChange. Get rid of the default: case statement so we'll
get warnings if we have unhandled message kinds.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setApplicationCacheDirectory):
Set the application cache directory.
(WebKit::WebProcess::didReceiveMessage):
Handle SetApplicationCacheDirectory.
win/WebKit2.vcproj:
Add WebContextWin.cpp
WebKitTools:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::resetPreferencesToConsistentValues):
Set up default preferences. Right now just enables the web application cache.
(WTR::TestInvocation::invoke):
Call resetPreferencesToConsistentValues.
* WebKitTestRunner/TestInvocation.h:
LayoutTests:
* platform/mac-wk2/Skipped:
Remove http/tests/appcache from skipped list.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f557f0b..ee7bcd4 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-19 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2 does not have application cache
+ https://bugs.webkit.org/show_bug.cgi?id=42552
+
+ * platform/mac-wk2/Skipped:
+ Remove http/tests/appcache from skipped list.
+
2010-07-19 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 8d8ab4e..e1e143c 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -2312,7 +2312,3 @@ transitions/transition-drt-api.html
transitions/transition-hit-test.html
transitions/transition-hit-test-transform.html
transitions/transition-shorthand-delay.html
-
-# WebKit2 does not have application cache
-# <https://bugs.webkit.org/show_bug.cgi?id=42552>
-http/tests/appcache
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 94fb35c..0aca7d9 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,63 @@
+2010-07-19 Anders carlsson <andersca at apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2 does not have application cache
+ https://bugs.webkit.org/show_bug.cgi?id=42552
+
+ * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
+ (WebProcessMessage::):
+ Add SetApplicationCacheDirectory.
+
+ * Shared/WebPreferencesStore.h:
+ (WebKit::WebPreferencesStore::encode):
+ (WebKit::WebPreferencesStore::decode):
+ add offlineWebApplicationCacheEnabled.
+
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetOfflineWebApplicationCacheEnabled):
+ (WKPreferencesGetOfflineWebApplicationCacheEnabled):
+ * UIProcess/API/C/WKPreferences.h:
+ Add getters/setters for whether the application cache is enabled.
+
+ * UIProcess/WebContext.h:
+ * UIProcess/WebPreferences.cpp:
+ (WebKit::WebPreferences::setOfflineWebApplicationCacheEnabled):
+ Update the store and call update().
+
+ * UIProcess/WebPreferences.h:
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::WebProcessProxy):
+ Ask the web process to set the application cache directory.
+
+ * UIProcess/mac/WebContextMac.mm: Added.
+ (WebKit::WebContext::applicationCacheDirectory):
+ Return the application cache directory.
+
+ * UIProcess/win/WebContextWin.cpp: Added.
+ (WebKit::WebContext::applicationCacheDirectory):
+ Ditto.
+
+ * WebKit2.xcodeproj/project.pbxproj:
+ Add WebContextMac.mm
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::preferencesDidChange):
+
+ (WebKit::WebPage::didReceiveMessage):
+ Handle PreferencesDidChange. Get rid of the default: case statement so we'll
+ get warnings if we have unhandled message kinds.
+
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::setApplicationCacheDirectory):
+ Set the application cache directory.
+
+ (WebKit::WebProcess::didReceiveMessage):
+ Handle SetApplicationCacheDirectory.
+
+ win/WebKit2.vcproj:
+ Add WebContextWin.cpp
+
2010-07-18 Anders Carlsson <andersca at apple.com>
Another attempt at fixing the Windows build.
diff --git a/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h b/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
index 0e4cf44..d09a043 100644
--- a/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
+++ b/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
@@ -34,6 +34,7 @@ namespace WebProcessMessage {
enum Kind {
LoadInjectedBundle,
+ SetApplicationCacheDirectory,
Create,
PostMessage,
#if PLATFORM(MAC)
diff --git a/WebKit2/Shared/WebPreferencesStore.h b/WebKit2/Shared/WebPreferencesStore.h
index 52d2536..0ef0f52 100644
--- a/WebKit2/Shared/WebPreferencesStore.h
+++ b/WebKit2/Shared/WebPreferencesStore.h
@@ -44,6 +44,7 @@ struct WebPreferencesStore {
encoder.encode(javaScriptEnabled);
encoder.encode(loadsImagesAutomatically);
encoder.encode(pluginsEnabled);
+ encoder.encode(offlineWebApplicationCacheEnabled);
encoder.encode(minimumFontSize);
encoder.encode(minimumLogicalFontSize);
encoder.encode(defaultFontSize);
@@ -64,6 +65,8 @@ struct WebPreferencesStore {
return false;
if (!decoder.decode(s.pluginsEnabled))
return false;
+ if (!decoder.decode(s.offlineWebApplicationCacheEnabled))
+ return false;
if (!decoder.decode(s.minimumFontSize))
return false;
if (!decoder.decode(s.minimumLogicalFontSize))
@@ -90,7 +93,8 @@ struct WebPreferencesStore {
bool javaScriptEnabled;
bool loadsImagesAutomatically;
bool pluginsEnabled;
-
+ bool offlineWebApplicationCacheEnabled;
+
uint32_t minimumFontSize;
uint32_t minimumLogicalFontSize;
uint32_t defaultFontSize;
diff --git a/WebKit2/UIProcess/API/C/WKPreferences.cpp b/WebKit2/UIProcess/API/C/WKPreferences.cpp
index 6eeb4d5..2228ff8 100644
--- a/WebKit2/UIProcess/API/C/WKPreferences.cpp
+++ b/WebKit2/UIProcess/API/C/WKPreferences.cpp
@@ -64,6 +64,16 @@ bool WKPreferencesGetLoadsImagesAutomatically(WKPreferencesRef preferencesRef)
return toWK(preferencesRef)->loadsImagesAutomatically();
}
+void WKPreferencesSetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferencesRef, bool offlineWebApplicationCacheEnabled)
+{
+ toWK(preferencesRef)->setOfflineWebApplicationCacheEnabled(offlineWebApplicationCacheEnabled);
+}
+
+bool WKPreferencesGetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferencesRef)
+{
+ return toWK(preferencesRef)->offlineWebApplicationCacheEnabled();
+}
+
WKPreferencesRef WKPreferencesRetain(WKPreferencesRef preferencesRef)
{
toWK(preferencesRef)->ref();
diff --git a/WebKit2/UIProcess/API/C/WKPreferences.h b/WebKit2/UIProcess/API/C/WKPreferences.h
index cdc4086..f861542 100644
--- a/WebKit2/UIProcess/API/C/WKPreferences.h
+++ b/WebKit2/UIProcess/API/C/WKPreferences.h
@@ -43,6 +43,8 @@ WK_EXPORT void WKPreferencesSetJavaScriptEnabled(WKPreferencesRef preferences, b
WK_EXPORT bool WKPreferencesGetJavaScriptEnabled(WKPreferencesRef preferences);
WK_EXPORT void WKPreferencesSetLoadsImagesAutomatically(WKPreferencesRef preferences, bool loadsImagesAutomatically);
WK_EXPORT bool WKPreferencesGetLoadsImagesAutomatically(WKPreferencesRef preferences);
+WK_EXPORT void WKPreferencesSetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferences, bool offlineWebApplicationCacheEnabled);
+WK_EXPORT bool WKPreferencesGetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferences);
WK_EXPORT WKPreferencesRef WKPreferencesRetain(WKPreferencesRef preferences);
WK_EXPORT void WKPreferencesRelease(WKPreferencesRef preferences);
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index 08b46f0..22d96c0 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -84,6 +84,7 @@ public:
void setAdditionalPluginPath(const WebCore::String&);
PluginInfoStore* pluginInfoStore() { return &m_pluginInfoStore; }
+ WebCore::String applicationCacheDirectory();
private:
WebContext(ProcessModel, const WebCore::String& injectedBundlePath);
diff --git a/WebKit2/UIProcess/WebPreferences.cpp b/WebKit2/UIProcess/WebPreferences.cpp
index 612849c..5d7dc0f 100644
--- a/WebKit2/UIProcess/WebPreferences.cpp
+++ b/WebKit2/UIProcess/WebPreferences.cpp
@@ -86,4 +86,15 @@ bool WebPreferences::loadsImagesAutomatically() const
return m_store.loadsImagesAutomatically;
}
+void WebPreferences::setOfflineWebApplicationCacheEnabled(bool b)
+{
+ m_store.offlineWebApplicationCacheEnabled = b;
+ update();
+}
+
+bool WebPreferences::offlineWebApplicationCacheEnabled() const
+{
+ return m_store.offlineWebApplicationCacheEnabled;
+}
+
} // namespace WebKit
diff --git a/WebKit2/UIProcess/WebPreferences.h b/WebKit2/UIProcess/WebPreferences.h
index f6d1163..89ed11b 100644
--- a/WebKit2/UIProcess/WebPreferences.h
+++ b/WebKit2/UIProcess/WebPreferences.h
@@ -61,6 +61,9 @@ public:
void setLoadsImagesAutomatically(bool);
bool loadsImagesAutomatically() const;
+ void setOfflineWebApplicationCacheEnabled(bool);
+ bool offlineWebApplicationCacheEnabled() const;
+
private:
WebPreferences();
WebPreferences(WebPreferences*);
diff --git a/WebKit2/UIProcess/WebProcessProxy.cpp b/WebKit2/UIProcess/WebProcessProxy.cpp
index 9101f7b..61c9cca 100644
--- a/WebKit2/UIProcess/WebProcessProxy.cpp
+++ b/WebKit2/UIProcess/WebProcessProxy.cpp
@@ -58,6 +58,10 @@ WebProcessProxy::WebProcessProxy(WebContext* context)
{
connect();
+ // FIXME: Instead of sending three separate initialization related messages here, we should just send a
+ // single "Initialize" messages with a struct that has all the needed information.
+ send(WebProcessMessage::SetApplicationCacheDirectory, 0, CoreIPC::In(m_context->applicationCacheDirectory()));
+
// FIXME: We could instead send the bundle path as part of the arguments to process creation?
// Would that be better than sending a connection?
if (!context->injectedBundlePath().isEmpty())
@@ -66,6 +70,7 @@ WebProcessProxy::WebProcessProxy(WebContext* context)
#if USE(ACCELERATED_COMPOSITING)
setUpAcceleratedCompositing();
#endif
+
}
WebProcessProxy::~WebProcessProxy()
diff --git a/WebKit2/UIProcess/mac/WebContextMac.mm b/WebKit2/UIProcess/mac/WebContextMac.mm
new file mode 100644
index 0000000..3c5bdd6
--- /dev/null
+++ b/WebKit2/UIProcess/mac/WebContextMac.mm
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+#include "WebContext.h"
+
+#include <sys/param.h>
+
+using namespace WebCore;
+
+NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
+
+namespace WebKit {
+
+String WebContext::applicationCacheDirectory()
+{
+ NSString *appName = [[NSBundle mainBundle] bundleIdentifier];
+ if (!appName)
+ appName = [[NSProcessInfo processInfo] processName];
+
+ ASSERT(appName);
+
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSString *cacheDir = [defaults objectForKey:WebKitLocalCacheDefaultsKey];
+
+ if (!cacheDir || ![cacheDir isKindOfClass:[NSString class]]) {
+#ifdef BUILDING_ON_TIGER
+ cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
+#else
+ char cacheDirectory[MAXPATHLEN];
+ size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
+
+ if (cacheDirectoryLen)
+ cacheDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:cacheDirectory length:cacheDirectoryLen - 1];
+#endif
+ }
+
+ return [cacheDir stringByAppendingPathComponent:appName];
+}
+
+} // namespace WebKit
+
diff --git a/WebKit2/UIProcess/win/WebContextWin.cpp b/WebKit2/UIProcess/win/WebContextWin.cpp
new file mode 100644
index 0000000..cb83fb0
--- /dev/null
+++ b/WebKit2/UIProcess/win/WebContextWin.cpp
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#include "WebContext.h"
+
+#include <WebCore/FileSystem.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+String WebContext::applicationCacheDirectory()
+{
+ return localUserSpecificStorageDirectory();
+}
+
+} // namespace WebKit
+
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 341870e..fe6344f 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -32,6 +32,7 @@
0F52667411DD4A490006D33C /* WebProcessProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F52667311DD4A490006D33C /* WebProcessProxyMac.mm */; };
1A10475A110A5AD500A43ECD /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */; };
1A1C4EC810D06099005E67E7 /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C79A100E7FC50078DEBC /* WebCore.framework */; };
+ 1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1C648611F415B700553C19 /* WebContextMac.mm */; };
1A2161B011F37664008AD0F5 /* NPJSObjectMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2161AE11F37664008AD0F5 /* NPJSObjectMap.h */; };
1A2161B111F37664008AD0F5 /* NPJSObjectMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2161AF11F37664008AD0F5 /* NPJSObjectMap.cpp */; };
1A2162B011F38971008AD0F5 /* NPRuntimeUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */; };
@@ -301,6 +302,7 @@
0F5265BB11DD37860006D33C /* LayerBackedDrawingAreaProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LayerBackedDrawingAreaProxyMac.mm; sourceTree = "<group>"; };
0F52667311DD4A490006D33C /* WebProcessProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessProxyMac.mm; sourceTree = "<group>"; };
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 1A1C648611F415B700553C19 /* WebContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMac.mm; sourceTree = "<group>"; };
1A2161AE11F37664008AD0F5 /* NPJSObjectMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPJSObjectMap.h; sourceTree = "<group>"; };
1A2161AF11F37664008AD0F5 /* NPJSObjectMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPJSObjectMap.cpp; sourceTree = "<group>"; };
1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeUtilities.cpp; sourceTree = "<group>"; };
@@ -1121,6 +1123,7 @@
BC2651F511825EF800243E12 /* ChunkedUpdateDrawingAreaProxyMac.mm */,
0F5265BB11DD37860006D33C /* LayerBackedDrawingAreaProxyMac.mm */,
0F52667311DD4A490006D33C /* WebProcessProxyMac.mm */,
+ 1A1C648611F415B700553C19 /* WebContextMac.mm */,
);
path = mac;
sourceTree = "<group>";
@@ -1440,6 +1443,7 @@
BC0092F8115837A300E0AE2A /* WorkQueueMac.cpp in Sources */,
1A2161B111F37664008AD0F5 /* NPJSObjectMap.cpp in Sources */,
1A2162B011F38971008AD0F5 /* NPRuntimeUtilities.cpp in Sources */,
+ 1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 0ace2a2..e260f5d 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -327,6 +327,7 @@ void WebPage::preferencesDidChange(const WebPreferencesStore& store)
{
m_page->settings()->setJavaScriptEnabled(store.javaScriptEnabled);
m_page->settings()->setLoadsImagesAutomatically(store.loadsImagesAutomatically);
+ m_page->settings()->setOfflineWebApplicationCacheEnabled(store.offlineWebApplicationCacheEnabled);
}
bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt)
@@ -374,7 +375,7 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
return;
setActive(active);
- break;
+ return;
}
case WebPageMessage::SetFocused: {
bool focused;
@@ -382,7 +383,7 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
return;
setFocused(focused);
- break;
+ return;
}
case WebPageMessage::SetIsInWindow: {
bool isInWindow;
@@ -390,7 +391,7 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
return;
setIsInWindow(isInWindow);
- break;
+ return;
}
case WebPageMessage::MouseEvent: {
WebMouseEvent event;
@@ -399,7 +400,15 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
connection->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In((uint32_t)event.type()));
PlatformMouseEvent platformEvent = platform(event);
mouseEvent(platformEvent);
- break;
+ return;
+ }
+ case WebPageMessage::PreferencesDidChange: {
+ WebPreferencesStore store;
+ if (!arguments.decode(store))
+ return;
+
+ preferencesDidChange(store);
+ return;
}
case WebPageMessage::WheelEvent: {
WebWheelEvent event;
@@ -408,7 +417,7 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
connection->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In((uint32_t)event.type()));
PlatformWheelEvent platformEvent = platform(event);
wheelEvent(platformEvent);
- break;
+ return;
}
case WebPageMessage::KeyEvent: {
WebKeyboardEvent event;
@@ -417,7 +426,7 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
connection->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In((uint32_t)event.type()));
PlatformKeyboardEvent platformEvent = platform(event);
keyEvent(platformEvent);
- break;
+ return;
}
case WebPageMessage::LoadURL: {
String url;
@@ -425,7 +434,7 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
return;
loadURL(url);
- break;
+ return;
}
case WebPageMessage::StopLoading:
stopLoading();
@@ -436,28 +445,28 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
return;
reload(reloadFromOrigin);
- break;
+ return;
}
case WebPageMessage::GoForward: {
uint64_t backForwardItemID;
if (!arguments.decode(CoreIPC::Out(backForwardItemID)))
return;
goForward(backForwardItemID);
- break;
+ return;
}
case WebPageMessage::GoBack: {
uint64_t backForwardItemID;
if (!arguments.decode(CoreIPC::Out(backForwardItemID)))
return;
goBack(backForwardItemID);
- break;
+ return;
}
case WebPageMessage::GoToBackForwardItem: {
uint64_t backForwardItemID;
if (!arguments.decode(CoreIPC::Out(backForwardItemID)))
return;
goToBackForwardItem(backForwardItemID);
- break;
+ return;
}
case WebPageMessage::DidReceivePolicyDecision: {
uint64_t frameID;
@@ -466,7 +475,7 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
if (!arguments.decode(CoreIPC::Out(frameID, listenerID, policyAction)))
return;
didReceivePolicyDecision(webFrame(frameID), listenerID, (WebCore::PolicyAction)policyAction);
- break;
+ return;
}
case WebPageMessage::RunJavaScriptInMainFrame: {
String script;
@@ -474,27 +483,26 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
if (!arguments.decode(CoreIPC::Out(script, callbackID)))
return;
runJavaScriptInMainFrame(script, callbackID);
- break;
+ return;
}
case WebPageMessage::GetRenderTreeExternalRepresentation: {
uint64_t callbackID;
if (!arguments.decode(callbackID))
return;
getRenderTreeExternalRepresentation(callbackID);
- break;
+ return;
}
case WebPageMessage::Close: {
close();
- break;
+ return;
}
case WebPageMessage::TryClose: {
tryClose();
- break;
+ return;
}
- default:
- ASSERT_NOT_REACHED();
- break;
}
+
+ ASSERT_NOT_REACHED();
}
} // namespace WebKit
diff --git a/WebKit2/WebProcess/WebProcess.cpp b/WebKit2/WebProcess/WebProcess.cpp
index 17a1094..142f20b 100644
--- a/WebKit2/WebProcess/WebProcess.cpp
+++ b/WebKit2/WebProcess/WebProcess.cpp
@@ -36,6 +36,7 @@
#include "WebPlatformStrategies.h"
#include "WebPreferencesStore.h"
#include "WebProcessMessageKinds.h"
+#include <WebCore/ApplicationCacheStorage.h>
#include <wtf/PassRefPtr.h>
#ifndef NDEBUG
@@ -87,6 +88,11 @@ void WebProcess::loadInjectedBundle(const String& path)
}
}
+void WebProcess::setApplicationCacheDirectory(const String& directory)
+{
+ cacheStorage().setCacheDirectory(directory);
+}
+
void WebProcess::forwardMessageToInjectedBundle(const String& message)
{
if (!m_injectedBundle)
@@ -159,6 +165,14 @@ void WebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
loadInjectedBundle(path);
return;
}
+ case WebProcessMessage::SetApplicationCacheDirectory: {
+ String directory;
+ if (!arguments->decode(CoreIPC::Out(directory)))
+ return;
+
+ setApplicationCacheDirectory(directory);
+ return;
+ }
case WebProcessMessage::Create: {
uint64_t pageID = arguments->destinationID();
IntSize viewSize;
diff --git a/WebKit2/WebProcess/WebProcess.h b/WebKit2/WebProcess/WebProcess.h
index 852d09a..cb54625 100644
--- a/WebKit2/WebProcess/WebProcess.h
+++ b/WebKit2/WebProcess/WebProcess.h
@@ -67,6 +67,7 @@ private:
void shutdown();
void loadInjectedBundle(const WebCore::String&);
+ void setApplicationCacheDirectory(const WebCore::String&);
void forwardMessageToInjectedBundle(const WebCore::String&);
// CoreIPC::Connection::Client
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index a86c5f6..44bfc79 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -1193,6 +1193,10 @@
>
</File>
<File
+ RelativePath="..\UIProcess\win\WebContextWin.cpp"
+ >
+ </File>
+ <File
RelativePath="..\UIProcess\win\WebView.cpp"
>
</File>
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 269340f..92ca433 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-07-19 Anders carlsson <andersca at apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2 does not have application cache
+ https://bugs.webkit.org/show_bug.cgi?id=42552
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::resetPreferencesToConsistentValues):
+ Set up default preferences. Right now just enables the web application cache.
+
+ (WTR::TestInvocation::invoke):
+ Call resetPreferencesToConsistentValues.
+
+ * WebKitTestRunner/TestInvocation.h:
+
2010-07-19 Kent Tamura <tkent at chromium.org>
Reviewed by Adam Roben.
diff --git a/WebKitTools/WebKitTestRunner/TestInvocation.cpp b/WebKitTools/WebKitTestRunner/TestInvocation.cpp
index e4e4dc6..1434d50 100644
--- a/WebKitTools/WebKitTestRunner/TestInvocation.cpp
+++ b/WebKitTools/WebKitTestRunner/TestInvocation.cpp
@@ -96,9 +96,18 @@ static void sizeWebViewForCurrentTest(char* pathOrURL)
TestController::shared().mainWebView()->resizeTo(normalWidth, normalHeight);
}
+void TestInvocation::resetPreferencesToConsistentValues()
+{
+ WKPreferencesRef preferences = WKContextGetPreferences(TestController::shared().context());
+
+ WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true);
+}
+
void TestInvocation::invoke()
{
sizeWebViewForCurrentTest(m_pathOrURL);
+ resetPreferencesToConsistentValues();
+
WKRetainPtr<WKStringRef> message(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTest")));
WKContextPostMessageToInjectedBundle(TestController::shared().context(), message.get());
diff --git a/WebKitTools/WebKitTestRunner/TestInvocation.h b/WebKitTools/WebKitTestRunner/TestInvocation.h
index ea1e840..b5fc041 100644
--- a/WebKitTools/WebKitTestRunner/TestInvocation.h
+++ b/WebKitTools/WebKitTestRunner/TestInvocation.h
@@ -42,6 +42,8 @@ public:
private:
void dump(const char*);
+ void resetPreferencesToConsistentValues();
+
// Helper
static void runUntil(bool& done);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list