diff options
author | Feng Qian <fqian@google.com> | 2009-06-18 14:00:49 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-06-18 14:00:49 -0700 |
commit | c9c4d65c1547996ed3748026904d6e7f09aec2b4 (patch) | |
tree | 5298ee7f87a0f97f06d5b2e66c37dedd88238ccf /WebCore | |
parent | ad9f76210e4cbae75d762b7a65b39af424879b6b (diff) | |
parent | 36747fa778285f57f2f53c047028be83e9d8776d (diff) | |
download | external_webkit-c9c4d65c1547996ed3748026904d6e7f09aec2b4.zip external_webkit-c9c4d65c1547996ed3748026904d6e7f09aec2b4.tar.gz external_webkit-c9c4d65c1547996ed3748026904d6e7f09aec2b4.tar.bz2 |
Merge commit 'goog/master' into webkit_merge
Resolved conflicts:
WebCore/Android.mk
WebCore/storage/LocalStorageArea.h
WebCore/storage/SessionStorageArea.cpp
WebCore/storage/StorageEvent.cpp
Diffstat (limited to 'WebCore')
34 files changed, 310 insertions, 43 deletions
diff --git a/WebCore/Android.derived.mk b/WebCore/Android.derived.mk index 9be3a26..0e75e41 100644 --- a/WebCore/Android.derived.mk +++ b/WebCore/Android.derived.mk @@ -60,7 +60,6 @@ # If an entry starts with '/', any subdirectory may match # If an entry starts with '^', the first directory must match # LOCAL_DIR_WILDCARD_EXCLUDED := \ -# ^storage/* \ # ^workers/* \ # This comment block is read by tools/webkitsync/diff.cpp @@ -215,7 +214,7 @@ js_binding_scripts := $(addprefix $(LOCAL_PATH)/,\ bindings/scripts/generate-bindings.pl \ ) -FEATURE_DEFINES := ANDROID_ORIENTATION_SUPPORT ENABLE_TOUCH_EVENTS=1 ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 +FEATURE_DEFINES := ANDROID_ORIENTATION_SUPPORT ENABLE_TOUCH_EVENTS=1 ENABLE_DATABASE=1 ENABLE_OFFLINE_WEB_APPLICATIONS=1 ENABLE_DOM_STORAGE=1 GEN := \ $(intermediates)/css/JSCSSCharsetRule.h \ @@ -500,6 +499,21 @@ LOCAL_GENERATED_SOURCES += $(GEN) $(GEN:%.h=%.cpp) # above rules. Specifying this explicitly makes -j2 work. $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/storage/%.cpp : $(intermediates)/storage/%.h +# new section for DOM Storage APIs +GEN := \ + $(intermediates)/storage/JSStorage.h \ + $(intermediates)/storage/JSStorageEvent.h + +$(GEN): PRIVATE_PATH := $(LOCAL_PATH) +$(GEN): PRIVATE_CUSTOM_TOOL = perl -I$(PRIVATE_PATH)/bindings/scripts $(PRIVATE_PATH)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --include dom --include html --outputdir $(dir $@) $< +$(GEN): $(intermediates)/storage/JS%.h : $(LOCAL_PATH)/storage/%.idl $(js_binding_scripts) + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) $(GEN:%.h=%.cpp) + +# We also need the .cpp files, which are generated as side effects of the +# above rules. Specifying this explicitly makes -j2 work. +$(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/storage/%.cpp : $(intermediates)/storage/%.h + #new section for svg ifeq ($(ENABLE_SVG), true) GEN := \ diff --git a/WebCore/Android.mk b/WebCore/Android.mk index bcb8b58..8ecb7e0 100644 --- a/WebCore/Android.mk +++ b/WebCore/Android.mk @@ -26,7 +26,6 @@ # bindings/js/JSCustomVersionChangeCallback.cpp \ # bindings/js/JSHTMLAudioElementConstructor.cpp \ # bindings/js/JSInspectorControllerCustom.cpp \ -# bindings/js/JSStorageCustom.cpp \ # bindings/js/JSXSLTProcessor*.cpp \ # bindings/js/JSWorker*.cpp \ # bindings/js/Worker*.cpp \ @@ -189,7 +188,8 @@ LOCAL_SRC_FILES := \ bindings/js/JSQuarantinedObjectWrapper.cpp \ bindings/js/JSRGBColor.cpp \ bindings/js/JSSQLResultSetRowListCustom.cpp \ - bindings/js/JSSQLTransactionCustom.cpp + bindings/js/JSSQLTransactionCustom.cpp \ + bindings/js/JSStorageCustom.cpp \ ifeq ($(ENABLE_SVG), true) LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ @@ -661,6 +661,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ platform/android/SearchPopupMenuAndroid.cpp \ platform/android/SharedTimerAndroid.cpp \ platform/android/SoundAndroid.cpp \ + platform/android/SSLKeyGeneratorAndroid.cpp \ platform/android/SystemTimeAndroid.cpp \ platform/android/TemporaryLinkStubs.cpp \ platform/android/WidgetAndroid.cpp \ @@ -955,12 +956,22 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ storage/DatabaseTask.cpp \ storage/DatabaseThread.cpp \ storage/DatabaseTracker.cpp \ + storage/LocalStorage.cpp \ + storage/LocalStorageArea.cpp \ + storage/LocalStorageTask.cpp \ + storage/LocalStorageThread.cpp \ storage/OriginQuotaManager.cpp \ + storage/SessionStorage.cpp \ + storage/SessionStorageArea.cpp \ storage/OriginUsageRecord.cpp \ storage/SQLResultSet.cpp \ storage/SQLResultSetRowList.cpp \ storage/SQLStatement.cpp \ storage/SQLTransaction.cpp \ + storage/Storage.cpp \ + storage/StorageArea.cpp \ + storage/StorageEvent.cpp \ + storage/StorageMap.cpp \ ifeq ($(ENABLE_SVG), true) LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ diff --git a/WebCore/config.h b/WebCore/config.h index df5a502..362edb8 100644 --- a/WebCore/config.h +++ b/WebCore/config.h @@ -97,6 +97,8 @@ // center place to handle which option feature ANDROID will enable #undef ENABLE_DATABASE #define ENABLE_DATABASE 1 +#undef ENABLE_DOM_STORAGE +#define ENABLE_DOM_STORAGE 1 #undef ENABLE_FTPDIR #define ENABLE_FTPDIR 0 #ifndef ENABLE_SVG diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp index f0951eb..f098211 100644 --- a/WebCore/page/PageGroup.cpp +++ b/WebCore/page/PageGroup.cpp @@ -97,8 +97,8 @@ void PageGroup::closeLocalStorage() PageGroupMap::iterator end = pageGroups->end(); for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) { - if (LocalStorage* localStorage = it->second->localStorage()) - localStorage->close(); + if (it->second->hasLocalStorage()) + it->second->localStorage()->close(); } #endif } @@ -108,10 +108,6 @@ void PageGroup::addPage(Page* page) ASSERT(page); ASSERT(!m_pages.contains(page)); m_pages.add(page); -#if ENABLE(DOM_STORAGE) - if (!m_localStorage) - m_localStorage = LocalStorage::localStorage(page->settings()->localStorageDatabasePath()); -#endif } void PageGroup::removePage(Page* page) @@ -187,6 +183,13 @@ void PageGroup::setShouldTrackVisitedLinks(bool shouldTrack) #if ENABLE(DOM_STORAGE) LocalStorage* PageGroup::localStorage() { + if (!m_localStorage) { + // Need a page in this page group to query the settings for the local storage database path. + Page* page = *m_pages.begin(); + ASSERT(page); + m_localStorage = LocalStorage::localStorage(page->settings()->localStorageDatabasePath()); + } + return m_localStorage.get(); } #endif diff --git a/WebCore/page/PageGroup.h b/WebCore/page/PageGroup.h index 097fb87..d9ffabd 100644 --- a/WebCore/page/PageGroup.h +++ b/WebCore/page/PageGroup.h @@ -44,7 +44,7 @@ namespace WebCore { static PageGroup* pageGroup(const String& groupName); static void closeLocalStorage(); - + const HashSet<Page*>& pages() const { return m_pages; } void addPage(Page*); @@ -68,7 +68,9 @@ namespace WebCore { private: void addVisitedLink(LinkHash stringHash); - +#if ENABLE(DOM_STORAGE) + bool hasLocalStorage() { return m_localStorage; } +#endif String m_name; HashSet<Page*> m_pages; diff --git a/WebCore/page/android/InspectorControllerAndroid.cpp b/WebCore/page/android/InspectorControllerAndroid.cpp index 922c743..d84d4b7 100644 --- a/WebCore/page/android/InspectorControllerAndroid.cpp +++ b/WebCore/page/android/InspectorControllerAndroid.cpp @@ -62,8 +62,15 @@ namespace WebCore { struct InspectorResource : public RefCounted<InspectorResource> { }; +#if ENABLE(DATABASE) struct InspectorDatabaseResource : public RefCounted<InspectorDatabaseResource> { }; +#endif + +#if ENABLE(DOM_STORAGE) +struct InspectorDOMStorageResource : public RefCounted<InspectorDatabaseResource> { +}; +#endif InspectorController::InspectorController(Page*, InspectorClient* client) { @@ -87,6 +94,9 @@ void InspectorController::addMessageToConsole(MessageSource, MessageLevel, const #if ENABLE(DATABASE) void InspectorController::didOpenDatabase(Database*, String const&, String const&, String const&) {} #endif +#if ENABLE(DOM_STORAGE) + void InspectorController::didUseDOMStorage(StorageArea* storageArea, bool isLocalStorage, Frame* frame) {} +#endif bool InspectorController::enabled() const { return false; } void InspectorController::inspect(Node*) {} bool InspectorController::windowVisible() { return false; } diff --git a/WebCore/platform/android/KeyGeneratorClient.h b/WebCore/platform/android/KeyGeneratorClient.h new file mode 100644 index 0000000..614cc08 --- /dev/null +++ b/WebCore/platform/android/KeyGeneratorClient.h @@ -0,0 +1,47 @@ +/* + * Copyright 2009, The Android Open Source Project + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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 THE COPYRIGHT HOLDERS ``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. + */ + +#ifndef KEY_GENERATOR_CLIENT_H +#define KEY_GENERATOR_CLIENT_H + +#include <wtf/Vector.h> +#include "KURL.h" +#include "PlatformString.h" + +using namespace WebCore; + +namespace android { + + class KeyGeneratorClient { + public: + virtual ~KeyGeneratorClient() {} + virtual WTF::Vector<String> getSupportedKeyStrengthList() = 0; + virtual String getSignedPublicKeyAndChallengeString(unsigned index, + const String& challenge, const KURL& url) = 0; + }; + +} +#endif + diff --git a/WebCore/platform/android/SSLKeyGeneratorAndroid.cpp b/WebCore/platform/android/SSLKeyGeneratorAndroid.cpp new file mode 100644 index 0000000..509d338 --- /dev/null +++ b/WebCore/platform/android/SSLKeyGeneratorAndroid.cpp @@ -0,0 +1,53 @@ +/* + * Copyright 2009, The Android Open Source Project + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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 THE COPYRIGHT HOLDERS ``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 "SSLKeyGenerator.h" + +#include "JavaSharedClient.h" +#include "KeyGeneratorClient.h" + +namespace WebCore { + +void getSupportedKeySizes(Vector<String>& keys) +{ + if (android::JavaSharedClient::GetKeyGeneratorClient()) { + keys = android::JavaSharedClient::GetKeyGeneratorClient()-> + getSupportedKeyStrengthList(); + } +} + +String signedPublicKeyAndChallengeString(unsigned index, + const String& challenge, const KURL& url) +{ + if (android::JavaSharedClient::GetKeyGeneratorClient()) { + return android::JavaSharedClient::GetKeyGeneratorClient()-> + getSignedPublicKeyAndChallengeString(index, challenge, url); + } + return String(); +} + +} diff --git a/WebCore/platform/android/TemporaryLinkStubs.cpp b/WebCore/platform/android/TemporaryLinkStubs.cpp index 395d18b..b48f006 100644 --- a/WebCore/platform/android/TemporaryLinkStubs.cpp +++ b/WebCore/platform/android/TemporaryLinkStubs.cpp @@ -428,17 +428,6 @@ String searchMenuClearRecentSearchesText() return String(); } -Vector<String> supportedKeySizes() -{ - notImplemented(); - return Vector<String>(); -} - -String signedPublicKeyAndChallengeString(unsigned int, String const&, WebCore::KURL const&) -{ - return String(); -} - } // namespace WebCore namespace WebCore { @@ -493,11 +482,6 @@ void prefetchDNS(const String&) notImplemented(); } -void getSupportedKeySizes(Vector<String>&) -{ - notImplemented(); -} - PassRefPtr<Icon> Icon::createIconForFile(const String&) { notImplemented(); diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp index f102c2c..04a6855 100644 --- a/WebCore/plugins/PluginView.cpp +++ b/WebCore/plugins/PluginView.cpp @@ -59,6 +59,9 @@ #include "RenderObject.h" #include "npruntime_impl.h" #include "Settings.h" +#if defined(ANDROID_PLUGINS) +#include "TouchEvent.h" +#endif #if USE(JSC) #include "JSDOMWindow.h" @@ -160,8 +163,13 @@ void PluginView::handleEvent(Event* event) handleMouseEvent(static_cast<MouseEvent*>(event)); else if (event->isKeyboardEvent()) handleKeyboardEvent(static_cast<KeyboardEvent*>(event)); +#if defined(ANDROID_PLUGINS) + else if (event->isTouchEvent()) + handleTouchEvent(static_cast<TouchEvent*>(event)); +#endif } + bool PluginView::start() { if (m_isStarted) diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h index 9853eb7..d0cfacb 100644 --- a/WebCore/plugins/PluginView.h +++ b/WebCore/plugins/PluginView.h @@ -73,6 +73,9 @@ namespace WebCore { class Frame; class KeyboardEvent; class MouseEvent; +#ifdef ANDROID_PLUGINS + class TouchEvent; +#endif class KURL; #if PLATFORM(WIN_OS) && !PLATFORM(WX) && ENABLE(NETSCAPE_PLUGIN_API) class PluginMessageThrottlerWin; @@ -211,6 +214,11 @@ namespace WebCore { static bool isCallingPlugin(); +#ifdef ANDROID_PLUGINS + Frame* getParentFrame() const { return m_parentFrame; } + Element* getElement() const { return m_element; } +#endif + private: PluginView(Frame* parentFrame, const IntSize&, PluginPackage*, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually); @@ -262,6 +270,7 @@ namespace WebCore { void handleMouseEvent(MouseEvent*); #ifdef ANDROID_PLUGINS + void handleTouchEvent(TouchEvent*); // called at the end of the base constructor void platformInit(); #endif diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp index f10ac45..51dd4e9 100644 --- a/WebCore/plugins/android/PluginViewAndroid.cpp +++ b/WebCore/plugins/android/PluginViewAndroid.cpp @@ -50,6 +50,7 @@ #include "PlatformKeyboardEvent.h" #include "PluginMainThreadScheduler.h" #include "PluginPackage.h" +#include "TouchEvent.h" #include "android_graphics.h" #include "SkCanvas.h" #include "npruntime_impl.h" @@ -203,25 +204,45 @@ void PluginView::init() m_status = PluginStatusLoadedSuccessfully; } +void PluginView::handleTouchEvent(TouchEvent* event) +{ + if (!m_window->isAcceptingEvent(kTouch_ANPEventFlag)) + return; + + ANPEvent evt; + SkANP::InitEvent(&evt, kTouch_ANPEventType); + + const AtomicString& type = event->type(); + if (eventNames().touchstartEvent == type) + evt.data.touch.action = kDown_ANPTouchAction; + else if (eventNames().touchendEvent == type) + evt.data.touch.action = kUp_ANPTouchAction; + else if (eventNames().touchmoveEvent == type) + evt.data.touch.action = kMove_ANPTouchAction; + else if (eventNames().touchcancelEvent == type) + evt.data.touch.action = kCancel_ANPTouchAction; + else + return; + + evt.data.touch.modifiers = 0; // todo + // these are relative to plugin + evt.data.touch.x = event->pageX() - m_npWindow.x; + evt.data.touch.y = event->pageY() - m_npWindow.y; + + if (m_plugin->pluginFuncs()->event(m_instance, &evt)) { + event->setDefaultHandled(); + } +} + void PluginView::handleMouseEvent(MouseEvent* event) { const AtomicString& type = event->type(); - bool isDown = (eventNames().mousedownEvent == type); - bool isUp = (eventNames().mouseupEvent == type); bool isOver = (eventNames().mouseoverEvent == type); bool isOut = (eventNames().mouseoutEvent == type); ANPEvent evt; - if (isDown || isUp) { - SkANP::InitEvent(&evt, kTouch_ANPEventType); - evt.data.touch.action = isDown ? kDown_ANPTouchAction : kUp_ANPTouchAction; - evt.data.touch.modifiers = 0; // todo - // these are relative to plugin - evt.data.touch.x = event->pageX() - m_npWindow.x; - evt.data.touch.y = event->pageY() - m_npWindow.y; - } - else if (isOver || isOut) { + if (isOver || isOut) { SkANP::InitEvent(&evt, kLifecycle_ANPEventType); evt.data.lifecycle.action = isOver ? kGainFocus_ANPLifecycleAction : kLooseFocus_ANPLifecycleAction; } @@ -247,6 +268,9 @@ static ANPKeyModifier make_modifiers(bool shift, bool alt) { void PluginView::handleKeyboardEvent(KeyboardEvent* event) { + if (!m_window->isAcceptingEvent(kKey_ANPEventFlag)) + return; + const PlatformKeyboardEvent* pke = event->keyEvent(); if (NULL == pke) { return; @@ -487,6 +511,15 @@ NPError PluginView::platformSetValue(NPPVariable variable, void* value) default: break; } + break; + } + case kAcceptEvents_ANPSetValue : { + if(value) { + ANPEventFlags flags = *reinterpret_cast<ANPEventFlags*>(value); + m_window->updateEventFlags(flags); + error = NPERR_NO_ERROR; + } + break; } default: break; diff --git a/WebCore/storage/LocalStorage.cpp b/WebCore/storage/LocalStorage.cpp index 8b84e17..8c4cce9 100644 --- a/WebCore/storage/LocalStorage.cpp +++ b/WebCore/storage/LocalStorage.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "LocalStorage.h" +#if ENABLE(DOM_STORAGE) + #include "CString.h" #include "EventNames.h" #include "FileSystem.h" @@ -97,7 +99,7 @@ PassRefPtr<StorageArea> LocalStorage::storageArea(SecurityOrigin* origin) RefPtr<LocalStorageArea> storageArea; if (storageArea = m_storageAreaMap.get(origin)) return storageArea.release(); - + storageArea = LocalStorageArea::create(origin, this); m_storageAreaMap.set(origin, storageArea); return storageArea.release(); @@ -170,3 +172,6 @@ void LocalStorage::scheduleSync(PassRefPtr<LocalStorageArea> area) } } // namespace WebCore + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/LocalStorage.h b/WebCore/storage/LocalStorage.h index 1fd1f7a..393edf0 100644 --- a/WebCore/storage/LocalStorage.h +++ b/WebCore/storage/LocalStorage.h @@ -26,6 +26,8 @@ #ifndef LocalStorage_h #define LocalStorage_h +#if ENABLE(DOM_STORAGE) + #include "LocalStorageArea.h" #include "LocalStorageTask.h" #include "LocalStorageThread.h" @@ -78,4 +80,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // LocalStorage_h diff --git a/WebCore/storage/LocalStorageArea.cpp b/WebCore/storage/LocalStorageArea.cpp index bec0233..27701c7 100644 --- a/WebCore/storage/LocalStorageArea.cpp +++ b/WebCore/storage/LocalStorageArea.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "LocalStorageArea.h" +#if ENABLE(DOM_STORAGE) + #include "CString.h" #include "DOMWindow.h" #include "EventNames.h" @@ -450,3 +452,6 @@ void LocalStorageArea::performSync() } } // namespace WebCore + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/LocalStorageArea.h b/WebCore/storage/LocalStorageArea.h index f3c6dce..26d9ccf 100644 --- a/WebCore/storage/LocalStorageArea.h +++ b/WebCore/storage/LocalStorageArea.h @@ -26,6 +26,8 @@ #ifndef LocalStorageArea_h #define LocalStorageArea_h +#if ENABLE(DOM_STORAGE) + #include "SQLiteDatabase.h" #include "StorageArea.h" #include "StringHash.h" @@ -97,4 +99,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // LocalStorageArea_h diff --git a/WebCore/storage/LocalStorageTask.cpp b/WebCore/storage/LocalStorageTask.cpp index 3d5b987..e5c42fd 100644 --- a/WebCore/storage/LocalStorageTask.cpp +++ b/WebCore/storage/LocalStorageTask.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "LocalStorageTask.h" +#if ENABLE(DOM_STORAGE) + #include "LocalStorage.h" #include "LocalStorageArea.h" #include "LocalStorageThread.h" @@ -82,3 +84,6 @@ void LocalStorageTask::performTask() } } + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/LocalStorageTask.h b/WebCore/storage/LocalStorageTask.h index 79063d0..d3ec315 100644 --- a/WebCore/storage/LocalStorageTask.h +++ b/WebCore/storage/LocalStorageTask.h @@ -26,6 +26,8 @@ #ifndef LocalStorageTask_h #define LocalStorageTask_h +#if ENABLE(DOM_STORAGE) + #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> #include <wtf/Threading.h> @@ -61,4 +63,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // LocalStorageTask_h diff --git a/WebCore/storage/LocalStorageThread.cpp b/WebCore/storage/LocalStorageThread.cpp index da50c90..f35d44f 100644 --- a/WebCore/storage/LocalStorageThread.cpp +++ b/WebCore/storage/LocalStorageThread.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "LocalStorageThread.h" +#if ENABLE(DOM_STORAGE) + #include "LocalStorage.h" #include "LocalStorageArea.h" #include "LocalStorageTask.h" @@ -137,3 +139,6 @@ void LocalStorageThread::performTerminate() } } + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/LocalStorageThread.h b/WebCore/storage/LocalStorageThread.h index eb7d1ef..36f14cc 100644 --- a/WebCore/storage/LocalStorageThread.h +++ b/WebCore/storage/LocalStorageThread.h @@ -26,6 +26,8 @@ #ifndef LocalStorageThread_h #define LocalStorageThread_h +#if ENABLE(DOM_STORAGE) + #include <wtf/HashSet.h> #include <wtf/MessageQueue.h> #include <wtf/PassRefPtr.h> @@ -71,4 +73,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // LocalStorageThread_h diff --git a/WebCore/storage/SessionStorage.cpp b/WebCore/storage/SessionStorage.cpp index e70227a..c10a1be 100644 --- a/WebCore/storage/SessionStorage.cpp +++ b/WebCore/storage/SessionStorage.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "SessionStorage.h" +#if ENABLE(DOM_STORAGE) + #include "EventNames.h" #include "Frame.h" #include "FrameTree.h" @@ -73,3 +75,6 @@ PassRefPtr<StorageArea> SessionStorage::storageArea(SecurityOrigin* origin) } } + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/SessionStorage.h b/WebCore/storage/SessionStorage.h index 7b59aeb..13de203 100644 --- a/WebCore/storage/SessionStorage.h +++ b/WebCore/storage/SessionStorage.h @@ -26,6 +26,8 @@ #ifndef SessionStorage_h #define SessionStorage_h +#if ENABLE(DOM_STORAGE) + #include "SecurityOriginHash.h" #include "SessionStorageArea.h" @@ -61,4 +63,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // SessionStorage_h diff --git a/WebCore/storage/SessionStorageArea.cpp b/WebCore/storage/SessionStorageArea.cpp index 60c9501..168c493 100644 --- a/WebCore/storage/SessionStorageArea.cpp +++ b/WebCore/storage/SessionStorageArea.cpp @@ -26,7 +26,8 @@ #include "config.h" #include "SessionStorageArea.h" -#include "DOMWindow.h" +#if ENABLE(DOM_STORAGE) + #include "EventNames.h" #include "Frame.h" #include "FrameTree.h" @@ -87,3 +88,6 @@ void SessionStorageArea::dispatchStorageEvent(const String& key, const String& o } } // namespace WebCore + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/SessionStorageArea.h b/WebCore/storage/SessionStorageArea.h index 3dad1af..95f425e 100644 --- a/WebCore/storage/SessionStorageArea.h +++ b/WebCore/storage/SessionStorageArea.h @@ -26,6 +26,8 @@ #ifndef SessionStorageArea_h #define SessionStorageArea_h +#if ENABLE(DOM_STORAGE) + #include "StorageArea.h" namespace WebCore { @@ -54,4 +56,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // SessionStorageArea_h diff --git a/WebCore/storage/Storage.cpp b/WebCore/storage/Storage.cpp index cf4413a..e228971 100644 --- a/WebCore/storage/Storage.cpp +++ b/WebCore/storage/Storage.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "Storage.h" +#if ENABLE(DOM_STORAGE) + #include "StorageArea.h" #include "PlatformString.h" #include <wtf/PassRefPtr.h> @@ -104,3 +106,6 @@ bool Storage::contains(const String& key) const } } + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/Storage.h b/WebCore/storage/Storage.h index 061f7c4..ca7a32e 100644 --- a/WebCore/storage/Storage.h +++ b/WebCore/storage/Storage.h @@ -26,6 +26,8 @@ #ifndef Storage_h #define Storage_h +#if ENABLE(DOM_STORAGE) + #include "StorageArea.h" #include <wtf/Forward.h> @@ -62,4 +64,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // Storage_h diff --git a/WebCore/storage/Storage.idl b/WebCore/storage/Storage.idl index 8ff9cd9..f2a7e9d 100644 --- a/WebCore/storage/Storage.idl +++ b/WebCore/storage/Storage.idl @@ -30,7 +30,8 @@ module storage { HasNameGetter, CustomDeleteProperty, CustomGetPropertyNames, - CustomPutFunction + CustomPutFunction, + Conditional=DOM_STORAGE ] Storage { readonly attribute [DontEnum] unsigned long length; [DontEnum] DOMString key(in unsigned long index) diff --git a/WebCore/storage/StorageArea.cpp b/WebCore/storage/StorageArea.cpp index 27f9612..ebd0279 100644 --- a/WebCore/storage/StorageArea.cpp +++ b/WebCore/storage/StorageArea.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "StorageArea.h" +#if ENABLE(DOM_STORAGE) + #include "CString.h" #include "ExceptionCode.h" #include "Frame.h" @@ -137,3 +139,6 @@ void StorageArea::importItem(const String& key, const String& value) } } + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/StorageArea.h b/WebCore/storage/StorageArea.h index 2163287..9f0b83d 100644 --- a/WebCore/storage/StorageArea.h +++ b/WebCore/storage/StorageArea.h @@ -26,6 +26,8 @@ #ifndef StorageArea_h #define StorageArea_h +#if ENABLE(DOM_STORAGE) + #include "PlatformString.h" #include <wtf/Forward.h> @@ -80,4 +82,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // StorageArea_h diff --git a/WebCore/storage/StorageEvent.cpp b/WebCore/storage/StorageEvent.cpp index 851abb1..f2945a9 100644 --- a/WebCore/storage/StorageEvent.cpp +++ b/WebCore/storage/StorageEvent.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "StorageEvent.h" +#if ENABLE(DOM_STORAGE) + #include "DOMWindow.h" #include "Storage.h" @@ -58,3 +60,6 @@ void StorageEvent::initStorageEvent(const AtomicString& type, bool canBubble, bo } } // namespace WebCore + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/StorageEvent.h b/WebCore/storage/StorageEvent.h index 3795518..ee3d5ad 100644 --- a/WebCore/storage/StorageEvent.h +++ b/WebCore/storage/StorageEvent.h @@ -26,6 +26,8 @@ #ifndef StorageEvent_h #define StorageEvent_h +#if ENABLE(DOM_STORAGE) + #include "Event.h" #include "Storage.h" @@ -72,4 +74,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // StorageEvent_h diff --git a/WebCore/storage/StorageEvent.idl b/WebCore/storage/StorageEvent.idl index fe82cf8..5a3f993 100644 --- a/WebCore/storage/StorageEvent.idl +++ b/WebCore/storage/StorageEvent.idl @@ -26,7 +26,8 @@ module storage { interface [ - GenerateConstructor + GenerateConstructor, + Conditional=DOM_STORAGE ] StorageEvent : Event { readonly attribute DOMString key; readonly attribute [ConvertNullStringTo=Null] DOMString oldValue; diff --git a/WebCore/storage/StorageMap.cpp b/WebCore/storage/StorageMap.cpp index 880fc93..4c350c8 100644 --- a/WebCore/storage/StorageMap.cpp +++ b/WebCore/storage/StorageMap.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "StorageMap.h" +#if ENABLE(DOM_STORAGE) + namespace WebCore { PassRefPtr<StorageMap> StorageMap::create() @@ -156,3 +158,6 @@ void StorageMap::importItem(const String& key, const String& value) const } } + +#endif // ENABLE(DOM_STORAGE) + diff --git a/WebCore/storage/StorageMap.h b/WebCore/storage/StorageMap.h index d5d00a9..c6f3bc9 100644 --- a/WebCore/storage/StorageMap.h +++ b/WebCore/storage/StorageMap.h @@ -26,6 +26,8 @@ #ifndef StorageMap_h #define StorageMap_h +#if ENABLE(DOM_STORAGE) + #include "PlatformString.h" #include "StringHash.h" @@ -62,4 +64,6 @@ namespace WebCore { } // namespace WebCore +#endif // ENABLE(DOM_STORAGE) + #endif // StorageMap_h |