Add a stubbed out version of WebStorageNamespaceProvider
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Dec 2014 21:27:34 +0000 (21:27 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Dec 2014 21:27:34 +0000 (21:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139213

Reviewed by Sam Weinig.

Source/WebKit:

* Storage/WebStorageNamespaceProvider.cpp: Added.
* Storage/WebStorageNamespaceProvider.h: Added.

* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
* WebKit.xcodeproj/project.pbxproj:
Add new files.

Source/WebKit/mac:

* WebCoreSupport/WebViewGroup.h:
(WebViewGroup::storageNamespaceProvider):
* WebCoreSupport/WebViewGroup.mm:
(WebViewGroup::getOrCreate):
(WebViewGroup::WebViewGroup):
Give WebViewGroup a storage namespace provider.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176913 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebKit/ChangeLog
Source/WebKit/Storage/WebStorageNamespaceProvider.cpp [new file with mode: 0644]
Source/WebKit/Storage/WebStorageNamespaceProvider.h [new file with mode: 0644]
Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj
Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebViewGroup.h
Source/WebKit/mac/WebCoreSupport/WebViewGroup.mm

index bed0633..395c851 100644 (file)
@@ -1046,6 +1046,8 @@ __ZN7WebCore24FrameDestructionObserver14willDetachPageEv
 __ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE
 __ZN7WebCore24FrameDestructionObserverD2Ev
 __ZN7WebCore24ImmutableStylePropertiesD1Ev
+__ZN7WebCore24StorageNamespaceProviderC2Ev
+__ZN7WebCore24StorageNamespaceProviderD2Ev
 __ZN7WebCore24createFragmentFromMarkupERNS_8DocumentERKN3WTF6StringES5_NS_19ParserContentPolicyE
 __ZN7WebCore24decodeURLEscapeSequencesERKN3WTF6StringE
 __ZN7WebCore24deleteCookiesForHostnameERKNS_21NetworkStorageSessionERKN3WTF6StringE
index 1dcb802..3776209 100644 (file)
                1A3586E015264C450022A659 /* RenderMultiColumnFlowThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3586DE15264C450022A659 /* RenderMultiColumnFlowThread.h */; };
                1A3586E115264F950022A659 /* SVGAnimatedIntegerOptionalInteger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71E623CE151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.cpp */; };
                1A37636B1A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3763691A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp */; };
-               1A37636C1A2E68BB009A7EE2 /* StorageNamespaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A37636A1A2E68BB009A7EE2 /* StorageNamespaceProvider.h */; };
+               1A37636C1A2E68BB009A7EE2 /* StorageNamespaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A37636A1A2E68BB009A7EE2 /* StorageNamespaceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1A3FF9C315265359002288A1 /* RenderNamedFlowThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC85F23E1519187300BC17BE /* RenderNamedFlowThread.cpp */; };
                1A494BFA0A122F4400FDAFC1 /* JSHTMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A494BF80A122F4400FDAFC1 /* JSHTMLElement.cpp */; };
                1A494BFB0A122F4400FDAFC1 /* JSHTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A494BF90A122F4400FDAFC1 /* JSHTMLElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
index ca1d851..4020114 100644 (file)
@@ -1,3 +1,18 @@
+2014-12-06  Anders Carlsson  <andersca@apple.com>
+
+        Add a stubbed out version of WebStorageNamespaceProvider
+        https://bugs.webkit.org/show_bug.cgi?id=139213
+
+        Reviewed by Sam Weinig.
+
+        * Storage/WebStorageNamespaceProvider.cpp: Added.
+        * Storage/WebStorageNamespaceProvider.h: Added.
+
+        * WebKit.vcxproj/WebKit/WebKit.vcxproj:
+        * WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
+        * WebKit.xcodeproj/project.pbxproj:
+        Add new files.
+
 2014-12-05  Roger Fong  <roger_fong@apple.com>
 
         [Win] proj files copying over too many resources..
diff --git a/Source/WebKit/Storage/WebStorageNamespaceProvider.cpp b/Source/WebKit/Storage/WebStorageNamespaceProvider.cpp
new file mode 100644 (file)
index 0000000..3a1e66f
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2014 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 "WebStorageNamespaceProvider.h"
+
+#include <WebCore/StorageNamespace.h>
+
+using namespace WebCore;
+
+RefPtr<WebStorageNamespaceProvider> WebStorageNamespaceProvider::create()
+{
+    return adoptRef(new WebStorageNamespaceProvider);
+}
+
+WebStorageNamespaceProvider::WebStorageNamespaceProvider()
+{
+}
+
+WebStorageNamespaceProvider::~WebStorageNamespaceProvider()
+{
+}
+
+RefPtr<StorageNamespace> WebStorageNamespaceProvider::createSessionStorageNamespace(Page&)
+{
+    // FIXME: Implement.
+    return nullptr;
+}
+
+RefPtr<StorageNamespace> WebStorageNamespaceProvider::createLocalStorageNamespace()
+{
+    // FIXME: Implement.
+    return nullptr;
+}
+
+RefPtr<StorageNamespace> WebStorageNamespaceProvider::createTransientLocalStorageNamespace(SecurityOrigin&)
+{
+    // FIXME: Implement.
+    return nullptr;
+}
diff --git a/Source/WebKit/Storage/WebStorageNamespaceProvider.h b/Source/WebKit/Storage/WebStorageNamespaceProvider.h
new file mode 100644 (file)
index 0000000..7e70eea
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2014 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.
+ */
+
+#ifndef WebStorageNamespaceProvider_h
+#define WebStorageNamespaceProvider_h
+
+#include <WebCore/StorageNamespaceProvider.h>
+
+class WebStorageNamespaceProvider final : public WebCore::StorageNamespaceProvider {
+public:
+    static RefPtr<WebStorageNamespaceProvider> create();
+    virtual ~WebStorageNamespaceProvider();
+
+private:
+    WebStorageNamespaceProvider();
+
+    virtual RefPtr<WebCore::StorageNamespace> createSessionStorageNamespace(WebCore::Page&) override;
+    virtual RefPtr<WebCore::StorageNamespace> createLocalStorageNamespace() override;
+    virtual RefPtr<WebCore::StorageNamespace> createTransientLocalStorageNamespace(WebCore::SecurityOrigin&) override;
+};
+
+#endif // WebStorageNamespaceProvider_h
index 33ad2c4..deb0dd1 100644 (file)
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <ClCompile Include="..\..\Storage\WebStorageNamespaceProvider.cpp" />
     <ClCompile Include="..\..\cf\WebCoreSupport\WebInspectorClientCF.cpp" />
     <ClCompile Include="..\..\win\AccessibleBase.cpp" />
     <ClCompile Include="..\..\win\AccessibleDocument.cpp" />
     <ClInclude Include="..\..\win\WebScriptWorld.h" />
     <ClInclude Include="..\..\win\WebSecurityOrigin.h" />
     <ClInclude Include="..\..\win\WebSerializedJSValue.h" />
+    <ClCompile Include="..\..\Storage\WebStorageNamespaceProvider.h" />
     <ClInclude Include="..\..\win\WebTextRenderer.h" />
     <ClInclude Include="..\..\win\WebURLAuthenticationChallenge.h" />
     <ClInclude Include="..\..\win\WebURLAuthenticationChallengeSender.h" />
index a65a1a4..356b50d 100644 (file)
     <ClCompile Include="..\..\win\WebSerializedJSValue.cpp">
       <Filter>Sources</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\Storage\WebStorageNamespaceProvider.cpp">
+      <Filter>Sources</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\win\WebTextRenderer.cpp">
       <Filter>Sources</Filter>
     </ClCompile>
     <ClInclude Include="..\..\win\WebSerializedJSValue.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClCompile Include="..\..\Storage\WebStorageNamespaceProvider.h">
+      <Filter>Sources</Filter>
+    </ClCompile>
     <ClInclude Include="..\..\win\WebTextRenderer.h">
       <Filter>Header Files</Filter>
     </ClInclude>
index 7f7f3fe..d0a0a4d 100644 (file)
@@ -25,6 +25,8 @@
                1A4DF5230EC8C74D006BD4B4 /* WebNetscapePluginView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4DF5210EC8C74D006BD4B4 /* WebNetscapePluginView.mm */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
                1A4DF5E40EC8D104006BD4B4 /* WebBaseNetscapePluginView.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4DF5E20EC8D104006BD4B4 /* WebBaseNetscapePluginView.h */; };
                1A4DF5E50EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4DF5E30EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm */; };
+               1A591D451A2E91BB000907C4 /* WebStorageNamespaceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A591D431A2E91BB000907C4 /* WebStorageNamespaceProvider.cpp */; };
+               1A591D461A2E91BB000907C4 /* WebStorageNamespaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A591D441A2E91BB000907C4 /* WebStorageNamespaceProvider.h */; };
                1A60519117502A5D00BC62F5 /* BinaryPropertyList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A60518D17502A5D00BC62F5 /* BinaryPropertyList.cpp */; };
                1A60519217502A5D00BC62F5 /* BinaryPropertyList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A60518E17502A5D00BC62F5 /* BinaryPropertyList.h */; };
                1A60519317502A5D00BC62F5 /* HistoryPropertyList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A60518F17502A5D00BC62F5 /* HistoryPropertyList.mm */; };
                1A4DF5210EC8C74D006BD4B4 /* WebNetscapePluginView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapePluginView.mm; sourceTree = "<group>"; };
                1A4DF5E20EC8D104006BD4B4 /* WebBaseNetscapePluginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBaseNetscapePluginView.h; sourceTree = "<group>"; };
                1A4DF5E30EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebBaseNetscapePluginView.mm; sourceTree = "<group>"; };
+               1A591D431A2E91BB000907C4 /* WebStorageNamespaceProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebStorageNamespaceProvider.cpp; path = ../../Storage/WebStorageNamespaceProvider.cpp; sourceTree = "<group>"; };
+               1A591D441A2E91BB000907C4 /* WebStorageNamespaceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebStorageNamespaceProvider.h; path = ../../Storage/WebStorageNamespaceProvider.h; sourceTree = "<group>"; };
                1A60518D17502A5D00BC62F5 /* BinaryPropertyList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BinaryPropertyList.cpp; sourceTree = "<group>"; };
                1A60518E17502A5D00BC62F5 /* BinaryPropertyList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BinaryPropertyList.h; sourceTree = "<group>"; };
                1A60518F17502A5D00BC62F5 /* HistoryPropertyList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HistoryPropertyList.mm; sourceTree = "<group>"; };
                                511F3FD20CECC88F00852565 /* WebDatabaseManagerPrivate.h */,
                                A5DEFC0D11D5343E00885273 /* WebDatabaseQuotaManager.h */,
                                A5DEFC0E11D5343E00885273 /* WebDatabaseQuotaManager.mm */,
+                               1A591D431A2E91BB000907C4 /* WebStorageNamespaceProvider.cpp */,
+                               1A591D441A2E91BB000907C4 /* WebStorageNamespaceProvider.h */,
                                3AB02AF512C1319B00FBB694 /* WebStorageManager.mm */,
                                3AE15D4F12DBDED4009323C8 /* WebStorageManagerInternal.h */,
                                3AB02AFF12C132B200FBB694 /* WebStorageManagerPrivate.h */,
                                939810250824BF01008DF038 /* WebNSWindowExtras.h in Headers */,
                                A58A5799143E727000125F50 /* WebOpenPanelResultListener.h in Headers */,
                                2D25396618CE85C200270222 /* WebSharingServicePickerController.h in Headers */,
+                               1A591D461A2E91BB000907C4 /* WebStorageNamespaceProvider.h in Headers */,
                                9398102A0824BF01008DF038 /* WebPanelAuthenticationHandler.h in Headers */,
                                37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */,
                                939810A50824BF01008DF038 /* WebPDFRepresentation.h in Headers */,
                                1AA879B711CBE9BF003C664F /* WebPlatformStrategies.mm in Sources */,
                                939811260824BF01008DF038 /* WebPluginContainerCheck.mm in Sources */,
                                939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */,
+                               1A591D451A2E91BB000907C4 /* WebStorageNamespaceProvider.cpp in Sources */,
                                939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */,
                                939810DC0824BF01008DF038 /* WebPluginPackage.mm in Sources */,
                                1A77B02F0EE7730500C8A1F9 /* WebPluginRequest.m in Sources */,
index adb2669..b5f8afb 100644 (file)
@@ -1,5 +1,19 @@
 2014-12-06  Anders Carlsson  <andersca@apple.com>
 
+        Add a stubbed out version of WebStorageNamespaceProvider
+        https://bugs.webkit.org/show_bug.cgi?id=139213
+
+        Reviewed by Sam Weinig.
+
+        * WebCoreSupport/WebViewGroup.h:
+        (WebViewGroup::storageNamespaceProvider):
+        * WebCoreSupport/WebViewGroup.mm:
+        (WebViewGroup::getOrCreate):
+        (WebViewGroup::WebViewGroup):
+        Give WebViewGroup a storage namespace provider.
+
+2014-12-06  Anders Carlsson  <andersca@apple.com>
+
         Fix build with newer versions of clang.
         rdar://problem/18978687
 
index 11b991a..7e5f186 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <WebCore/UserContentController.h>
+#include <wtf/HashSet.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+class StorageNamespaceProvider;
+class UserContentController;
+}
 
 class WebVisitedLinkStore;
 
@@ -31,7 +38,7 @@ class WebVisitedLinkStore;
 
 class WebViewGroup : public RefCounted<WebViewGroup> {
 public:
-    static PassRefPtr<WebViewGroup> getOrCreate(const String& name);
+    static RefPtr<WebViewGroup> getOrCreate(const String& name);
     ~WebViewGroup();
 
     static WebViewGroup* get(const String& name);
@@ -39,6 +46,7 @@ public:
     void addWebView(WebView *);
     void removeWebView(WebView *);
 
+    WebCore::StorageNamespaceProvider& storageNamespaceProvider() { return m_storageNamespaceProvider.get(); }
     WebCore::UserContentController& userContentController() { return m_userContentController.get(); }
     WebVisitedLinkStore& visitedLinkStore() { return m_visitedLinkStore.get(); }
 
@@ -48,6 +56,7 @@ private:
     String m_name;
     HashSet<WebView *> m_webViews;
 
+    Ref<WebCore::StorageNamespaceProvider> m_storageNamespaceProvider;
     Ref<WebCore::UserContentController> m_userContentController;
     Ref<WebVisitedLinkStore> m_visitedLinkStore;
 };
index 4e0c5c4..d6e111d 100644 (file)
 
 #import "WebViewGroup.h"
 
+#import "WebStorageNamespaceProvider.h"
 #import "WebView.h"
 #import "WebVisitedLinkStore.h"
+#import <WebCore/UserContentController.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/text/StringHash.h>
 
@@ -40,7 +42,7 @@ static HashMap<String, RefPtr<WebViewGroup>>& webViewGroups()
     return webViewGroups;
 }
 
-PassRefPtr<WebViewGroup> WebViewGroup::getOrCreate(const String& name)
+RefPtr<WebViewGroup> WebViewGroup::getOrCreate(const String& name)
 {
     if (name.isEmpty())
         return adoptRef(new WebViewGroup(String()));
@@ -61,6 +63,7 @@ WebViewGroup* WebViewGroup::get(const String& name)
 
 WebViewGroup::WebViewGroup(const String& name)
     : m_name(name)
+    , m_storageNamespaceProvider(*WebStorageNamespaceProvider::create())
     , m_userContentController(*UserContentController::create())
     , m_visitedLinkStore(WebVisitedLinkStore::create())
 {