summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/api/public/WebKit.h4
-rw-r--r--webkit/api/public/WebSettings.h1
-rw-r--r--webkit/api/src/WebKit.cpp15
-rw-r--r--webkit/api/src/WebSettingsImpl.cpp5
-rw-r--r--webkit/api/src/WebSettingsImpl.h1
-rw-r--r--webkit/glue/webpreferences.cc1
-rw-r--r--webkit/glue/webpreferences.h2
-rw-r--r--webkit/tools/test_shell/test_shell.cc1
8 files changed, 11 insertions, 19 deletions
diff --git a/webkit/api/public/WebKit.h b/webkit/api/public/WebKit.h
index 445e2a5..cf2cea1 100644
--- a/webkit/api/public/WebKit.h
+++ b/webkit/api/public/WebKit.h
@@ -87,10 +87,6 @@ namespace WebKit {
WEBKIT_API void enableWebSockets();
WEBKIT_API bool webSocketsEnabled();
- // Enables HTML5 DOM Storage support.
- WEBKIT_API void setLocalStorageEnabled(bool enabled);
- WEBKIT_API void setSessionStorageEnabled(bool enabled);
-
} // namespace WebKit
#endif
diff --git a/webkit/api/public/WebSettings.h b/webkit/api/public/WebSettings.h
index ecbeda6..ab6dbd2 100644
--- a/webkit/api/public/WebSettings.h
+++ b/webkit/api/public/WebSettings.h
@@ -71,6 +71,7 @@ namespace WebKit {
virtual void setDownloadableBinaryFontsEnabled(bool) = 0;
virtual void setXSSAuditorEnabled(bool) = 0;
virtual void setLocalStorageEnabled(bool) = 0;
+ virtual void setSessionStorageEnabled(bool) = 0;
virtual void setEditableLinkBehaviorNeverLive() = 0;
virtual void setFontRenderingModeNormal() = 0;
virtual void setShouldPaintCustomScrollbars(bool) = 0;
diff --git a/webkit/api/src/WebKit.cpp b/webkit/api/src/WebKit.cpp
index 915031c..c0ea7a3 100644
--- a/webkit/api/src/WebKit.cpp
+++ b/webkit/api/src/WebKit.cpp
@@ -39,7 +39,6 @@
#include "FrameLoader.h"
#include "Page.h"
#include "SecurityOrigin.h"
-#include "Storage.h"
#include "TextEncoding.h"
#include "WebSocket.h"
#include "WorkerContextExecutionProxy.h"
@@ -163,18 +162,4 @@ bool webSocketsEnabled()
#endif
}
-void setLocalStorageEnabled(bool enabled)
-{
-#if ENABLE(DOM_STORAGE)
- WebCore::Storage::setLocalStorageAvailable(enabled);
-#endif
-}
-
-void setSessionStorageEnabled(bool enabled)
-{
-#if ENABLE(DOM_STORAGE)
- WebCore::Storage::setSessionStorageAvailable(enabled);
-#endif
-}
-
} // namespace WebKit
diff --git a/webkit/api/src/WebSettingsImpl.cpp b/webkit/api/src/WebSettingsImpl.cpp
index a193871d..c74c16f 100644
--- a/webkit/api/src/WebSettingsImpl.cpp
+++ b/webkit/api/src/WebSettingsImpl.cpp
@@ -195,6 +195,11 @@ void WebSettingsImpl::setLocalStorageEnabled(bool enabled)
m_settings->setLocalStorageEnabled(enabled);
}
+void WebSettingsImpl::setSessionStorageEnabled(bool enabled)
+{
+ m_settings->setSessionStorageEnabled(enabled);
+}
+
void WebSettingsImpl::setEditableLinkBehaviorNeverLive()
{
// FIXME: If you ever need more behaviors than this, then we should probably
diff --git a/webkit/api/src/WebSettingsImpl.h b/webkit/api/src/WebSettingsImpl.h
index 0fd6c3f..cd56497 100644
--- a/webkit/api/src/WebSettingsImpl.h
+++ b/webkit/api/src/WebSettingsImpl.h
@@ -73,6 +73,7 @@ namespace WebKit {
virtual void setDownloadableBinaryFontsEnabled(bool);
virtual void setXSSAuditorEnabled(bool);
virtual void setLocalStorageEnabled(bool);
+ virtual void setSessionStorageEnabled(bool);
virtual void setEditableLinkBehaviorNeverLive();
virtual void setFontRenderingModeNormal();
virtual void setShouldPaintCustomScrollbars(bool);
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index a2a2b71..cdb7260 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -51,6 +51,7 @@ void WebPreferences::Apply(WebView* web_view) const {
settings->setXSSAuditorEnabled(xss_auditor_enabled);
settings->setLocalStorageEnabled(local_storage_enabled);
settings->setDatabasesEnabled(WebKit::databasesEnabled() || databases_enabled);
+ settings->setSessionStorageEnabled(session_storage_enabled);
settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled);
settings->setExperimentalNotificationsEnabled(
experimental_notifications_enabled);
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index 13a8c7b3..0693fb9 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -48,6 +48,7 @@ struct WebPreferences {
bool xss_auditor_enabled;
bool local_storage_enabled;
bool databases_enabled;
+ bool session_storage_enabled;
bool application_cache_enabled;
bool tabs_to_links;
@@ -93,6 +94,7 @@ struct WebPreferences {
xss_auditor_enabled(false),
local_storage_enabled(false),
databases_enabled(false),
+ session_storage_enabled(false),
application_cache_enabled(false),
tabs_to_links(true),
user_style_sheet_enabled(false),
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 4fb5e82..5c28287 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -425,6 +425,7 @@ void TestShell::ResetWebPreferences() {
// lose the coverage of dynamic font tests in webkit test.
web_prefs_->remote_fonts_enabled = true;
web_prefs_->local_storage_enabled = true;
+ web_prefs_->session_storage_enabled = true;
web_prefs_->application_cache_enabled = true;
web_prefs_->databases_enabled = true;
// LayoutTests were written with Safari Mac in mind which does not allow