Diff
Modified: trunk/Source/Platform/ChangeLog (116811 => 116812)
--- trunk/Source/Platform/ChangeLog 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/Platform/ChangeLog 2012-05-11 22:30:34 UTC (rev 116812)
@@ -1,3 +1,30 @@
+2012-05-11 Mark Pilgrim <pilg...@chromium.org>
+
+ [Chromium] Move createLocalStorageNamespace to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=85766
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * Platform.gypi:
+ * chromium/public/Platform.h:
+ (WebKit):
+ (Platform):
+ (WebKit::Platform::createLocalStorageNamespace):
+ * chromium/public/WebStorageArea.h: Added.
+ (WebKit):
+ (WebStorageArea):
+ (WebKit::WebStorageArea::~WebStorageArea):
+ (WebKit::WebStorageArea::setItem):
+ (WebKit::WebStorageArea::removeItem):
+ (WebKit::WebStorageArea::clear):
+ * chromium/public/WebStorageNamespace.h: Added.
+ (WebKit):
+ (WebStorageNamespace):
+ (WebKit::WebStorageNamespace::~WebStorageNamespace):
+ (WebKit::WebStorageNamespace::isSameNamespace):
+
2012-05-11 Shawn Singh <shawnsi...@chromium.org>
[chromium] Create WebTransformationMatrix interface for chromium platform
Modified: trunk/Source/Platform/Platform.gypi (116811 => 116812)
--- trunk/Source/Platform/Platform.gypi 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/Platform/Platform.gypi 2012-05-11 22:30:34 UTC (rev 116812)
@@ -90,6 +90,8 @@
'chromium/public/WebSocketStreamHandleClient.h',
'chromium/public/WebSolidColorLayer.h',
'chromium/public/WebString.h',
+ 'chromium/public/WebStorageArea.h',
+ 'chromium/public/WebStorageNamespace.h',
'chromium/public/WebThread.h',
'chromium/public/WebThreadSafeData.h',
'chromium/public/WebTransformationMatrix.h',
Modified: trunk/Source/Platform/chromium/public/Platform.h (116811 => 116812)
--- trunk/Source/Platform/chromium/public/Platform.h 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/Platform/chromium/public/Platform.h 2012-05-11 22:30:34 UTC (rev 116812)
@@ -49,6 +49,7 @@
class WebPeerConnection00HandlerClient;
class WebPeerConnectionHandler;
class WebPeerConnectionHandlerClient;
+class WebStorageNamespace;
class WebURL;
class WebURLLoader;
class WebSocketStreamHandle;
@@ -79,6 +80,12 @@
// Must return non-null.
virtual WebFileSystem* fileSystem() { return 0; }
+ // DOM Storage --------------------------------------------------
+
+ // Return a LocalStorage namespace that corresponds to the following path.
+ virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
+
+
// Gamepad -------------------------------------------------------------
virtual void sampleGamepads(WebGamepads& into) { into.length = 0; }
Copied: trunk/Source/Platform/chromium/public/WebStorageArea.h (from rev 116811, trunk/Source/WebKit/chromium/public/WebStorageArea.h) (0 => 116812)
--- trunk/Source/Platform/chromium/public/WebStorageArea.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebStorageArea.h 2012-05-11 22:30:34 UTC (rev 116812)
@@ -0,0 +1,95 @@
+/*
+ * 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:
+ *
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER 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 WebStorageArea_h
+#define WebStorageArea_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebURL;
+
+class WebStorageArea {
+public:
+ virtual ~WebStorageArea() { }
+
+ enum Result {
+ ResultOK = 0,
+ ResultBlockedByQuota
+ };
+
+ // The number of key/value pairs in the storage area.
+ virtual unsigned length() = 0;
+
+ // Get a value for a specific key. Valid key indices are 0 through length() - 1.
+ // Indexes may change on any set/removeItem call. Will return null if the index
+ // provided is out of range.
+ virtual WebString key(unsigned index) = 0;
+
+ // Get the value that corresponds to a specific key. This returns null if there is
+ // no entry for that key.
+ virtual WebString getItem(const WebString& key) = 0;
+
+ // Set the value that corresponds to a specific key. Result will either be ResultOK
+ // or some particular error. The value is NOT set when there's an error. |pageUrl| is the
+ // url that should be used if a storage event fires.
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& pageUrl, Result& result)
+ {
+ WebString unused;
+ setItem(key, newValue, pageUrl, result, unused);
+ }
+
+
+ // Remove the value associated with a particular key. |pageUrl| is the url that should be used
+ // if a storage event fires.
+ virtual void removeItem(const WebString& key, const WebURL& pageUrl)
+ {
+ WebString unused;
+ removeItem(key, pageUrl, unused);
+ }
+
+ // Clear all key/value pairs. |pageUrl| is the url that should be used if a storage event fires.
+ virtual void clear(const WebURL& pageUrl)
+ {
+ bool unused;
+ clear(pageUrl, unused);
+ }
+
+ // DEPRECATED - being replaced by the async variants above which do not return oldValues or block until completion.
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL&, Result&, WebString& oldValue) = 0;
+ virtual void removeItem(const WebString& key, const WebURL& pageUrl, WebString& oldValue) = 0;
+ virtual void clear(const WebURL& pageUrl, bool& somethingCleared) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebStorageArea_h
Copied: trunk/Source/Platform/chromium/public/WebStorageNamespace.h (from rev 116811, trunk/Source/WebKit/chromium/public/WebStorageNamespace.h) (0 => 116812)
--- trunk/Source/Platform/chromium/public/WebStorageNamespace.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebStorageNamespace.h 2012-05-11 22:30:34 UTC (rev 116812)
@@ -0,0 +1,62 @@
+/*
+ * 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:
+ *
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER 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 WebStorageNamespace_h
+#define WebStorageNamespace_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebStorageArea;
+class WebString;
+
+// WebStorageNamespace represents a collection of StorageAreas. Typically, you'll have
+// multiple StorageNamespaces to represent the SessionStorage for each tab and a single
+// StorageNamespace to represent LocalStorage for the entire browser.
+class WebStorageNamespace {
+public:
+ virtual ~WebStorageNamespace() { }
+
+ // Create a new WebStorageArea object. Two subsequent calls with the same origin
+ // will return two different WebStorageArea objects that share the same backing store.
+ // You should call delete on the returned object when you're finished.
+ virtual WebStorageArea* createStorageArea(const WebString& origin) = 0;
+
+ // Copy a StorageNamespace. This only makes sense in the case of SessionStorage.
+ virtual WebStorageNamespace* copy() = 0;
+
+ // Returns true of the two instances represent the same storage namespace.
+ virtual bool isSameNamespace(const WebStorageNamespace&) const { return false; }
+};
+
+} // namespace WebKit
+
+#endif // WebStorageNamespace_h
Modified: trunk/Source/WebKit/chromium/ChangeLog (116811 => 116812)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-11 22:30:34 UTC (rev 116812)
@@ -1,3 +1,22 @@
+2012-05-11 Mark Pilgrim <pilg...@chromium.org>
+
+ [Chromium] Move createLocalStorageNamespace to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=85766
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * WebKit.gyp:
+ * public/WebStorageArea.h:
+ * public/WebStorageNamespace.h:
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKit::WebKitPlatformSupport::blobRegistry):
+ * src/StorageAreaProxy.cpp:
+ * src/StorageNamespaceProxy.cpp:
+ (WebCore::StorageNamespace::localStorageNamespace):
+
2012-05-11 James Robinson <jam...@chromium.org>
[chromium] Move implementation of WebCore::GraphicsContext3D and related from WebKit/chromium/src to WebCore/platform/chromium/support
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (116811 => 116812)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-05-11 22:30:34 UTC (rev 116812)
@@ -258,9 +258,7 @@
'public/WebSpeechRecognizerClient.h',
'public/WebSpeechRecognizer.h',
'public/WebSpellCheckClient.h',
- 'public/WebStorageArea.h',
'public/WebStorageEventDispatcher.h',
- 'public/WebStorageNamespace.h',
'public/WebStorageQuotaCallbacks.h',
'public/WebStorageQuotaType.h',
'public/WebSurroundingText.h',
Modified: trunk/Source/WebKit/chromium/public/WebStorageArea.h (116811 => 116812)
--- trunk/Source/WebKit/chromium/public/WebStorageArea.h 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/WebKit/chromium/public/WebStorageArea.h 2012-05-11 22:30:34 UTC (rev 116812)
@@ -28,68 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebStorageArea_h
-#define WebStorageArea_h
-
-#include "platform/WebCommon.h"
-#include "platform/WebString.h"
-
-namespace WebKit {
-
-class WebURL;
-
-class WebStorageArea {
-public:
- virtual ~WebStorageArea() { }
-
- enum Result {
- ResultOK = 0,
- ResultBlockedByQuota
- };
-
- // The number of key/value pairs in the storage area.
- virtual unsigned length() = 0;
-
- // Get a value for a specific key. Valid key indices are 0 through length() - 1.
- // Indexes may change on any set/removeItem call. Will return null if the index
- // provided is out of range.
- virtual WebString key(unsigned index) = 0;
-
- // Get the value that corresponds to a specific key. This returns null if there is
- // no entry for that key.
- virtual WebString getItem(const WebString& key) = 0;
-
- // Set the value that corresponds to a specific key. Result will either be ResultOK
- // or some particular error. The value is NOT set when there's an error. |pageUrl| is the
- // url that should be used if a storage event fires.
- virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& pageUrl, Result& result)
- {
- WebString unused;
- setItem(key, newValue, pageUrl, result, unused);
- }
-
-
- // Remove the value associated with a particular key. |pageUrl| is the url that should be used
- // if a storage event fires.
- virtual void removeItem(const WebString& key, const WebURL& pageUrl)
- {
- WebString unused;
- removeItem(key, pageUrl, unused);
- }
-
- // Clear all key/value pairs. |pageUrl| is the url that should be used if a storage event fires.
- virtual void clear(const WebURL& pageUrl)
- {
- bool unused;
- clear(pageUrl, unused);
- }
-
- // DEPRECATED - being replaced by the async variants above which do not return oldValues or block until completion.
- virtual void setItem(const WebString& key, const WebString& newValue, const WebURL&, Result&, WebString& oldValue) = 0;
- virtual void removeItem(const WebString& key, const WebURL& pageUrl, WebString& oldValue) = 0;
- virtual void clear(const WebURL& pageUrl, bool& somethingCleared) = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebStorageArea_h
+#include "../../../Platform/chromium/public/WebStorageArea.h"
Modified: trunk/Source/WebKit/chromium/public/WebStorageNamespace.h (116811 => 116812)
--- trunk/Source/WebKit/chromium/public/WebStorageNamespace.h 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/WebKit/chromium/public/WebStorageNamespace.h 2012-05-11 22:30:34 UTC (rev 116812)
@@ -28,35 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebStorageNamespace_h
-#define WebStorageNamespace_h
-
-#include "platform/WebCommon.h"
-
-namespace WebKit {
-
-class WebStorageArea;
-class WebString;
-
-// WebStorageNamespace represents a collection of StorageAreas. Typically, you'll have
-// multiple StorageNamespaces to represent the SessionStorage for each tab and a single
-// StorageNamespace to represent LocalStorage for the entire browser.
-class WebStorageNamespace {
-public:
- virtual ~WebStorageNamespace() { }
-
- // Create a new WebStorageArea object. Two subsequent calls with the same origin
- // will return two different WebStorageArea objects that share the same backing store.
- // You should call delete on the returned object when you're finished.
- virtual WebStorageArea* createStorageArea(const WebString& origin) = 0;
-
- // Copy a StorageNamespace. This only makes sense in the case of SessionStorage.
- virtual WebStorageNamespace* copy() = 0;
-
- // Returns true of the two instances represent the same storage namespace.
- virtual bool isSameNamespace(const WebStorageNamespace&) const { return false; }
-};
-
-} // namespace WebKit
-
-#endif // WebStorageNamespace_h
+#include "../../../Platform/chromium/public/WebStorageNamespace.h"
Modified: trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (116811 => 116812)
--- trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-05-11 22:30:34 UTC (rev 116812)
@@ -59,7 +59,6 @@
class WebPluginListBuilder; // FIXME: Does this belong in platform?
class WebSandboxSupport;
class WebSharedWorkerRepository; // FIXME: Does this belong in platform?
-class WebStorageNamespace; // FIXME: Does this belong in platform?
class WebThemeEngine;
class WebWorkerRunLoop;
@@ -83,12 +82,6 @@
// Must return non-null.
virtual WebBlobRegistry* blobRegistry() { return 0; }
- // DOM Storage --------------------------------------------------
-
- // Return a LocalStorage namespace that corresponds to the following path.
- virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
-
-
// HTML5 Database ------------------------------------------------------
#ifdef WIN32
Modified: trunk/Source/WebKit/chromium/src/StorageAreaProxy.cpp (116811 => 116812)
--- trunk/Source/WebKit/chromium/src/StorageAreaProxy.cpp 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/WebKit/chromium/src/StorageAreaProxy.cpp 2012-05-11 22:30:34 UTC (rev 116812)
@@ -41,11 +41,12 @@
#include "WebFrameImpl.h"
#include "WebPermissionClient.h"
-#include "WebStorageArea.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
#include "WebViewImpl.h"
+#include <public/WebStorageArea.h>
+
namespace WebCore {
// FIXME: storageArea argument should be a PassOwnPtr.
Modified: trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp (116811 => 116812)
--- trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp 2012-05-11 22:19:38 UTC (rev 116811)
+++ trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp 2012-05-11 22:30:34 UTC (rev 116812)
@@ -32,17 +32,18 @@
#include "SecurityOrigin.h"
#include "StorageAreaProxy.h"
#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
#include "WebStorageNamespace.h"
#include "platform/WebString.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
+#include <public/Platform.h>
+
namespace WebCore {
PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const String& path, unsigned quota)
{
- return adoptRef(new StorageNamespaceProxy(WebKit::webKitPlatformSupport()->createLocalStorageNamespace(path, quota), LocalStorage));
+ return adoptRef(new StorageNamespaceProxy(WebKit::Platform::current()->createLocalStorageNamespace(path, quota), LocalStorage));
}
PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* page, unsigned quota)