summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 03:23:40 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 03:23:40 +0000
commit97467c9a3a1968b059db6020aad2a3fdeba33e57 (patch)
treea86b4577cbf6c3061ebec5f1f28599ec8e9bbf1e /webkit
parentfa7e11dea2d3510e2d4bd65a9696a5261f9b3464 (diff)
downloadchromium_src-97467c9a3a1968b059db6020aad2a3fdeba33e57.zip
chromium_src-97467c9a3a1968b059db6020aad2a3fdeba33e57.tar.gz
chromium_src-97467c9a3a1968b059db6020aad2a3fdeba33e57.tar.bz2
Enable DOM_STORAGE in our build. Put LocalStorage and SessionStorage behind their own flags. Add the beginnings of StorageNamespaceProxy since it implements WebCore::StorageNamespace::____StorageNamespace and we'd get link errors otherwise.--enable-local-storage and --enable-session-storage are the new flags. If you enable them and try to use DOM Storage, Chromium will crash.Originally Committed in http://src.chromium.org/viewvc/chrome?view=rev&revision=21059 but then backed out due to include path issues.BUG=4360TEST=none
Review URL: http://codereview.chromium.org/159059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21157 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/api/src/StorageNamespaceProxy.cpp47
-rw-r--r--webkit/api/src/StorageNamespaceProxy.h37
-rw-r--r--webkit/glue/webpreferences.h4
-rw-r--r--webkit/glue/webview_impl.cc2
-rw-r--r--webkit/webkit.gyp13
5 files changed, 94 insertions, 9 deletions
diff --git a/webkit/api/src/StorageNamespaceProxy.cpp b/webkit/api/src/StorageNamespaceProxy.cpp
new file mode 100644
index 0000000..8955c33
--- /dev/null
+++ b/webkit/api/src/StorageNamespaceProxy.cpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2009 Google 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. ``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
+ * 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 "StorageNamespaceProxy.h"
+
+#if ENABLE(DOM_STORAGE)
+
+namespace WebCore {
+
+PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const String& path)
+{
+ ASSERT_NOT_REACHED();
+ return NULL;
+}
+
+PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
+{
+ ASSERT_NOT_REACHED();
+ return NULL;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DOM_STORAGE)
diff --git a/webkit/api/src/StorageNamespaceProxy.h b/webkit/api/src/StorageNamespaceProxy.h
new file mode 100644
index 0000000..0b9058c
--- /dev/null
+++ b/webkit/api/src/StorageNamespaceProxy.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2009 Google 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. ``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
+ * 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 StorageNamespaceProxy_h
+#define StorageNamespaceProxy_h
+
+#if ENABLE(DOM_STORAGE)
+
+#include "StorageNamespace.h"
+
+// FIXME: Implement the StorageNamespaceProxy
+
+#endif // ENABLE(DOM_STORAGE)
+
+#endif // StorageNamespaceProxy_h
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index d75138a..dd0581e 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -42,6 +42,8 @@ struct WebPreferences {
bool uses_page_cache;
bool remote_fonts_enabled;
bool xss_auditor_enabled;
+ bool local_storage_enabled;
+ bool session_storage_enabled;
// TODO(tc): User style sheets will not work in chrome because it tries to
// load the style sheet using a request without a frame.
@@ -79,6 +81,8 @@ struct WebPreferences {
uses_page_cache(false),
remote_fonts_enabled(false),
xss_auditor_enabled(false),
+ local_storage_enabled(false),
+ session_storage_enabled(false),
user_style_sheet_enabled(false) {
}
};
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 29152bd..53a5f22 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -1424,6 +1424,8 @@ void WebViewImpl::SetPreferences(const WebPreferences& preferences) {
settings->setUsesPageCache(preferences.uses_page_cache);
settings->setDownloadableBinaryFontsEnabled(preferences.remote_fonts_enabled);
settings->setXSSAuditorEnabled(preferences.xss_auditor_enabled);
+ settings->setLocalStorageEnabled(preferences.local_storage_enabled);
+ settings->setSessionStorageEnabled(preferences.session_storage_enabled);
// This setting affects the behavior of links in an editable region:
// clicking the link should select it rather than navigate to it.
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index 2af73cb..0b16eb4 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -9,6 +9,7 @@
'ENABLE_DATABASE=1',
'ENABLE_DATAGRID=1',
'ENABLE_DASHBOARD_SUPPORT=0',
+ 'ENABLE_DOM_STORAGE=1',
'ENABLE_JAVASCRIPT_DEBUGGER=0',
'ENABLE_JSC_MULTIPLE_THREADS=0',
'ENABLE_ICONDATABASE=0',
@@ -594,9 +595,6 @@
# Exclude JSC custom bindings.
['exclude', '/third_party/WebKit/WebCore/bindings/js'],
- # Don't build bindings for storage.
- ['exclude', '/third_party/WebKit/WebCore/storage/Storage[^/]*\\.idl$'],
-
# SVG_FILTERS only.
['exclude', '/third_party/WebKit/WebCore/svg/SVG(FE|Filter)[^/]*\\.idl$'],
@@ -619,9 +617,6 @@
['exclude', '/third_party/WebKit/WebCore/svg/Filter[^/]*\\.cpp$'],
['exclude', '/third_party/WebKit/WebCore/svg/SVG(FE|Filter)[^/]*\\.cpp$'],
- # Exclude some, but not all, of storage.
- ['exclude', '/third_party/WebKit/WebCore/storage/(Local|Session)Storage[^/]*\\.cpp$'],
-
# Exclude PluginDebug.cpp since it doesn't compile properly without the
# correct npapi.h inclusion (http://crbug.com/17127
['exclude', '/third_party/WebKit/WebCore/plugins/PluginDebug.cpp'],
@@ -674,9 +669,7 @@
# A few things can't be excluded by patterns. List them individually.
- # Do not build StorageArea or StorageNamespace for Chromium. We (will)
- # have our own implementation.
- '../third_party/WebKit/WebCore/storage/StorageArea.cpp',
+ # Don't build StorageNamespace. We have our own implementation.
'../third_party/WebKit/WebCore/storage/StorageNamespace.cpp',
# Use history/BackForwardListChromium.cpp instead.
@@ -1047,6 +1040,8 @@
'api/src/LocalizedStrings.cpp',
'api/src/MediaPlayerPrivateChromium.cpp',
'api/src/ResourceHandle.cpp',
+ 'api/src/StorageNamespaceProxy.cpp',
+ 'api/src/StorageNamespaceProxy.h',
'api/src/TemporaryGlue.h',
'api/src/WebCache.cpp',
'api/src/WebCString.cpp',