[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

jorlow at chromium.org jorlow at chromium.org
Thu Apr 8 01:03:21 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 569ce79f203a4eab36cbee438f59fc188b193ecd
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 13 06:51:24 2010 +0000

    2010-01-11  Jeremy Orlow  <jorlow at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
            https://bugs.webkit.org/show_bug.cgi?id=33492
    
            * public/WebKitClient.h:
            * public/WebViewClient.h:
            (WebKit::WebViewClient::getSessionStorageNamespace):
            * src/StorageNamespaceProxy.cpp:
            (WebCore::StorageNamespace::sessionStorageNamespace):
    2010-01-11  Jeremy Orlow  <jorlow at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
            https://bugs.webkit.org/show_bug.cgi?id=33492
    
            * page/Page.cpp:
            (WebCore::Page::sessionStorage):
            * storage/StorageNamespace.cpp:
            (WebCore::StorageNamespace::sessionStorageNamespace):
            * storage/StorageNamespace.h:
            (WebCore::StorageNamespace::~StorageNamespace):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53180 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9235c35..7a7e26f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-11  Jeremy Orlow  <jorlow at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
+        https://bugs.webkit.org/show_bug.cgi?id=33492
+
+        * page/Page.cpp:
+        (WebCore::Page::sessionStorage):
+        * storage/StorageNamespace.cpp:
+        (WebCore::StorageNamespace::sessionStorageNamespace):
+        * storage/StorageNamespace.h:
+        (WebCore::StorageNamespace::~StorageNamespace):
+
 2010-01-12  Dumitru Daniliuc  <dumi at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index 1a035a5..b0f2859 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -689,7 +689,7 @@ void Page::setDebugger(JSC::Debugger* debugger)
 StorageNamespace* Page::sessionStorage(bool optionalCreate)
 {
     if (!m_sessionStorage && optionalCreate)
-        m_sessionStorage = StorageNamespace::sessionStorageNamespace();
+        m_sessionStorage = StorageNamespace::sessionStorageNamespace(this);
 
     return m_sessionStorage.get();
 }
diff --git a/WebCore/storage/StorageNamespace.cpp b/WebCore/storage/StorageNamespace.cpp
index 6b8caeb..b54ba16 100644
--- a/WebCore/storage/StorageNamespace.cpp
+++ b/WebCore/storage/StorageNamespace.cpp
@@ -41,7 +41,8 @@ PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const Strin
     return StorageNamespaceImpl::localStorageNamespace(path, quota);
 }
 
-PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
+// The page argument is only used by the Chromium port.
+PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page*)
 {
     return StorageNamespaceImpl::sessionStorageNamespace();
 }
diff --git a/WebCore/storage/StorageNamespace.h b/WebCore/storage/StorageNamespace.h
index 0ac5f86..e84e5a6 100644
--- a/WebCore/storage/StorageNamespace.h
+++ b/WebCore/storage/StorageNamespace.h
@@ -35,21 +35,22 @@
 
 namespace WebCore {
 
-    class SecurityOrigin;
-    class StorageArea;
-
-    // This interface is required for Chromium since these actions need to be proxied between processes.
-    class StorageNamespace : public RefCounted<StorageNamespace> {
-    public:
-        static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path, unsigned quota);
-        static PassRefPtr<StorageNamespace> sessionStorageNamespace();
-
-        virtual ~StorageNamespace() { }
-        virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
-        virtual PassRefPtr<StorageNamespace> copy() = 0;
-        virtual void close() = 0;
-        virtual void unlock() = 0;
-    };
+class Page;
+class SecurityOrigin;
+class StorageArea;
+
+// This interface is required for Chromium since these actions need to be proxied between processes.
+class StorageNamespace : public RefCounted<StorageNamespace> {
+public:
+    static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path, unsigned quota);
+    static PassRefPtr<StorageNamespace> sessionStorageNamespace(Page*);
+
+    virtual ~StorageNamespace() { }
+    virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
+    virtual PassRefPtr<StorageNamespace> copy() = 0;
+    virtual void close() = 0;
+    virtual void unlock() = 0;
+};
 
 } // namespace WebCore
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 0bddb81..b683443 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-11  Jeremy Orlow  <jorlow at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
+        https://bugs.webkit.org/show_bug.cgi?id=33492
+
+        * public/WebKitClient.h:
+        * public/WebViewClient.h:
+        (WebKit::WebViewClient::getSessionStorageNamespace):
+        * src/StorageNamespaceProxy.cpp:
+        (WebCore::StorageNamespace::sessionStorageNamespace):
+
 2010-01-11  Darin Fisher  <darin at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 2440e30..fe6c801 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -89,6 +89,7 @@ public:
     virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
 
     // Return a new SessionStorage namespace.
+    // THIS IS DEPRECATED.  WebViewClient::getSessionStorageNamespace() is the new way to access this.
     virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
 
     // Called when storage events fire.
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 2e2f953..1b0a61a 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -48,6 +48,7 @@ class WebFrame;
 class WebNode;
 class WebNotificationPresenter;
 class WebRange;
+class WebStorageNamespace;
 class WebURL;
 class WebView;
 class WebWidget;
@@ -71,6 +72,8 @@ public:
     virtual WebWidget* createPopupMenu(bool activatable) { return 0; }
     virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
 
+    // Create a session storage namespace associated with this WebView.
+    virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
 
     // Misc ----------------------------------------------------------------
 
diff --git a/WebKit/chromium/src/StorageNamespaceProxy.cpp b/WebKit/chromium/src/StorageNamespaceProxy.cpp
index e22bbef..fed74ae 100644
--- a/WebKit/chromium/src/StorageNamespaceProxy.cpp
+++ b/WebKit/chromium/src/StorageNamespaceProxy.cpp
@@ -28,12 +28,17 @@
 
 #if ENABLE(DOM_STORAGE)
 
+#include "Chrome.h"
+#include "ChromeClientImpl.h"
+#include "Page.h"
 #include "SecurityOrigin.h"
 #include "StorageAreaProxy.h"
 #include "WebKit.h"
 #include "WebKitClient.h"
 #include "WebStorageNamespace.h"
 #include "WebString.h"
+#include "WebViewClient.h"
+#include "WebViewImpl.h"
 
 namespace WebCore {
 
@@ -42,9 +47,11 @@ PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const Strin
     return new StorageNamespaceProxy(WebKit::webKitClient()->createLocalStorageNamespace(path, quota));
 }
 
-PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
+PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* page)
 {
-    return new StorageNamespaceProxy(WebKit::webKitClient()->createSessionStorageNamespace());
+    WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(page->chrome()->client());
+    WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client();
+    return new StorageNamespaceProxy(webViewClient->createSessionStorageNamespace());
 }
 
 StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list