WebKit2 does not have application cache
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Jul 2010 15:29:25 +0000 (15:29 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Jul 2010 15:29:25 +0000 (15:29 +0000)
commitffaa4184b5829fc1d017c9eb6c2fae0ccfb13c5a
treeeedc7288f2565c79768fc6885b2f5f7fa0f0ae9a
parent7ab6dad5d38c0f686a6657b015b50d04138af80e
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
21 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/Skipped
WebKit2/ChangeLog
WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
WebKit2/Shared/WebPreferencesStore.h
WebKit2/UIProcess/API/C/WKPreferences.cpp
WebKit2/UIProcess/API/C/WKPreferences.h
WebKit2/UIProcess/WebContext.h
WebKit2/UIProcess/WebPreferences.cpp
WebKit2/UIProcess/WebPreferences.h
WebKit2/UIProcess/WebProcessProxy.cpp
WebKit2/UIProcess/mac/WebContextMac.mm [new file with mode: 0644]
WebKit2/UIProcess/win/WebContextWin.cpp [new file with mode: 0644]
WebKit2/WebKit2.xcodeproj/project.pbxproj
WebKit2/WebProcess/WebPage/WebPage.cpp
WebKit2/WebProcess/WebProcess.cpp
WebKit2/WebProcess/WebProcess.h
WebKit2/win/WebKit2.vcproj
WebKitTools/ChangeLog
WebKitTools/WebKitTestRunner/TestInvocation.cpp
WebKitTools/WebKitTestRunner/TestInvocation.h