Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (189830 => 189831)
--- trunk/Source/WebCore/CMakeLists.txt 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebCore/CMakeLists.txt 2015-09-16 00:19:29 UTC (rev 189831)
@@ -10,6 +10,7 @@
"${WEBCORE_DIR}/Modules/gamepad/deprecated"
"${WEBCORE_DIR}/Modules/geolocation"
"${WEBCORE_DIR}/Modules/indexeddb"
+ "${WEBCORE_DIR}/Modules/indexeddb/client"
"${WEBCORE_DIR}/Modules/indexeddb/legacy"
"${WEBCORE_DIR}/Modules/indieui"
"${WEBCORE_DIR}/Modules/mediacontrols/"
@@ -864,6 +865,8 @@
Modules/indexeddb/IDBVersionChangeEvent.cpp
Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
+ Modules/indexeddb/client/IDBFactoryImpl.cpp
+
Modules/indexeddb/legacy/IDBCursorBackend.cpp
Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp
Modules/indexeddb/legacy/IDBDatabaseBackend.cpp
Modified: trunk/Source/WebCore/ChangeLog (189830 => 189831)
--- trunk/Source/WebCore/ChangeLog 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebCore/ChangeLog 2015-09-16 00:19:29 UTC (rev 189831)
@@ -1,3 +1,30 @@
+2015-09-15 Brady Eidson <beid...@apple.com>
+
+ Add empty IDBFactory implementation for Modern IDB.
+ https://bugs.webkit.org/show_bug.cgi?id=149191
+
+ Reviewed by Jer Noble.
+
+ No new tests (No behavior change).
+
+ * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
+ (WebCore::DOMWindowIndexedDatabase::indexedDB):
+
+ * Modules/indexeddb/client/IDBFactoryImpl.cpp:
+ (WebCore::IDBClient::IDBFactory::create):
+ (WebCore::IDBClient::IDBFactory::IDBFactory):
+ (WebCore::IDBClient::IDBFactory::getDatabaseNames):
+ (WebCore::IDBClient::IDBFactory::open):
+ (WebCore::IDBClient::IDBFactory::deleteDatabase):
+ (WebCore::IDBClient::IDBFactory::cmp):
+ * Modules/indexeddb/client/IDBFactoryImpl.h:
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ * loader/EmptyClients.cpp:
+ * page/DatabaseProvider.h:
+
2015-09-15 Antti Koivisto <an...@apple.com>
Split FontDescription into lower and higher level types
Modified: trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp (189830 => 189831)
--- trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp 2015-09-16 00:19:29 UTC (rev 189831)
@@ -31,6 +31,7 @@
#include "DOMWindow.h"
#include "DatabaseProvider.h"
#include "Document.h"
+#include "IDBFactoryImpl.h"
#include "LegacyFactory.h"
#include "Page.h"
#include "SecurityOrigin.h"
@@ -111,8 +112,12 @@
if (!m_window->isCurrentlyDisplayedInFrame())
return nullptr;
- if (!m_idbFactory)
- m_idbFactory = LegacyFactory::create(page->databaseProvider().idbFactoryBackend());
+ if (!m_idbFactory) {
+ if (page->databaseProvider().supportsModernIDB())
+ m_idbFactory = IDBClient::IDBFactory::create();
+ else
+ m_idbFactory = LegacyFactory::create(page->databaseProvider().idbFactoryBackend());
+ }
return m_idbFactory.get();
}
Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp (from rev 189830, trunk/Source/WebCore/page/DatabaseProvider.h) (0 => 189831)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp 2015-09-16 00:19:29 UTC (rev 189831)
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2015 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 "config.h"
+#include "IDBFactoryImpl.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+namespace IDBClient {
+
+Ref<IDBFactory> IDBFactory::create()
+{
+ return adoptRef(*new IDBFactory);
+}
+
+IDBFactory::IDBFactory()
+{
+
+}
+
+PassRefPtr<IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext*, ExceptionCode&)
+{
+ return nullptr;
+}
+
+PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext*, const String&, ExceptionCode&)
+{
+ return nullptr;
+}
+
+PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext*, const String&, unsigned long long, ExceptionCode&)
+{
+ return nullptr;
+}
+
+PassRefPtr<IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext*, const String&, ExceptionCode&)
+{
+ return nullptr;
+}
+
+short IDBFactory::cmp(ScriptExecutionContext*, const Deprecated::ScriptValue&, const Deprecated::ScriptValue&, ExceptionCode&)
+{
+ return 0;
+}
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h (from rev 189830, trunk/Source/WebCore/page/DatabaseProvider.h) (0 => 189831)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h 2015-09-16 00:19:29 UTC (rev 189831)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2015 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 IDBFactoryImpl_h
+#define IDBFactoryImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBFactory.h"
+
+namespace WebCore {
+namespace IDBClient {
+
+class IDBFactory : public WebCore::IDBFactory {
+public:
+ static Ref<IDBFactory> create();
+
+ virtual PassRefPtr<IDBRequest> getDatabaseNames(ScriptExecutionContext*, ExceptionCode&) override final;
+
+ virtual PassRefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, ExceptionCode&) override final;
+ virtual PassRefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, unsigned long long version, ExceptionCode&) override final;
+ virtual PassRefPtr<IDBOpenDBRequest> deleteDatabase(ScriptExecutionContext*, const String& name, ExceptionCode&) override final;
+
+ virtual short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue& first, const Deprecated::ScriptValue& second, ExceptionCode&) override final;
+
+private:
+ IDBFactory();
+};
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBFactoryImpl_h
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (189830 => 189831)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-09-16 00:19:29 UTC (rev 189831)
@@ -1906,6 +1906,8 @@
510192D218B6B9AB007FC7A1 /* ImageControlsRootElementMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 510192D018B6B9AB007FC7A1 /* ImageControlsRootElementMac.h */; };
510192D518B6B9B7007FC7A1 /* ImageControlsRootElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510192D318B6B9B7007FC7A1 /* ImageControlsRootElement.cpp */; };
510192D618B6B9B7007FC7A1 /* ImageControlsRootElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 510192D418B6B9B7007FC7A1 /* ImageControlsRootElement.h */; };
+ 5103104F1BA8CC03003329C0 /* IDBFactoryImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5103104A1BA8C6A6003329C0 /* IDBFactoryImpl.cpp */; };
+ 510310501BA8CC03003329C0 /* IDBFactoryImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5103104B1BA8C6A6003329C0 /* IDBFactoryImpl.h */; };
5103C2B11BA22D1A00E26337 /* LegacyAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B6E1BA0A76100F789CE /* LegacyAny.cpp */; };
5103C2B21BA2317400E26337 /* IDBTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B501B9F889B00F789CE /* IDBTransaction.cpp */; };
5103C2B31BA2324D00E26337 /* IDBCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B541B9F88E800F789CE /* IDBCursor.cpp */; };
@@ -9183,6 +9185,8 @@
510192D318B6B9B7007FC7A1 /* ImageControlsRootElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageControlsRootElement.cpp; sourceTree = "<group>"; };
510192D418B6B9B7007FC7A1 /* ImageControlsRootElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageControlsRootElement.h; sourceTree = "<group>"; };
510192D818B7D7AB007FC7A1 /* imageControlsMac.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = imageControlsMac.css; sourceTree = "<group>"; };
+ 5103104A1BA8C6A6003329C0 /* IDBFactoryImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBFactoryImpl.cpp; sourceTree = "<group>"; };
+ 5103104B1BA8C6A6003329C0 /* IDBFactoryImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactoryImpl.h; sourceTree = "<group>"; };
5106D7BB18BDB76F000AB166 /* ContextMenuContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContextMenuContext.cpp; sourceTree = "<group>"; };
5106D7BC18BDB76F000AB166 /* ContextMenuContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuContext.h; sourceTree = "<group>"; };
510A326E18318431003C5326 /* IDBServerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBServerConnection.h; sourceTree = "<group>"; };
@@ -16523,6 +16527,15 @@
path = animation;
sourceTree = "<group>";
};
+ 510310421BA8C64C003329C0 /* client */ = {
+ isa = PBXGroup;
+ children = (
+ 5103104A1BA8C6A6003329C0 /* IDBFactoryImpl.cpp */,
+ 5103104B1BA8C6A6003329C0 /* IDBFactoryImpl.h */,
+ );
+ path = client;
+ sourceTree = "<group>";
+ };
5126E6B60A2E3AEF005C29FA /* icon */ = {
isa = PBXGroup;
children = (
@@ -18735,6 +18748,7 @@
9712A55315004E3C0048AF10 /* indexeddb */ = {
isa = PBXGroup;
children = (
+ 510310421BA8C64C003329C0 /* client */,
51645B271B9F637E00F789CE /* legacy */,
51D7196C181106DF0016DC51 /* DOMWindowIndexedDatabase.cpp */,
51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */,
@@ -26147,6 +26161,7 @@
078E091617D14D1C00420AA1 /* MediaStreamEvent.h in Headers */,
078E093717D16B2C00420AA1 /* MediaStreamPrivate.h in Headers */,
078E091717D14D1C00420AA1 /* MediaStreamRegistry.h in Headers */,
+ 510310501BA8CC03003329C0 /* IDBFactoryImpl.h in Headers */,
078E091817D14D1C00420AA1 /* MediaStreamTrack.h in Headers */,
078E091917D14D1C00420AA1 /* MediaStreamTrackEvent.h in Headers */,
07FFDE69181AED420072D409 /* MediaStreamTrackPrivate.h in Headers */,
@@ -29035,6 +29050,7 @@
31FB1A6C120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp in Sources */,
59A86006119DAF7F00DEF1EF /* JSDeviceOrientationEvent.cpp in Sources */,
590E1B4B11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp in Sources */,
+ 5103104F1BA8CC03003329C0 /* IDBFactoryImpl.cpp in Sources */,
BCE438A2140C0DC0005E437E /* JSDictionary.cpp in Sources */,
659DDC8209E198BA001BF3C6 /* JSDocument.cpp in Sources */,
49C7BA8D1042F5B10009D447 /* JSDocumentCustom.cpp in Sources */,
Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (189830 => 189831)
--- trunk/Source/WebCore/loader/EmptyClients.cpp 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp 2015-09-16 00:19:29 UTC (rev 189831)
@@ -48,6 +48,7 @@
class EmptyDatabaseProvider final : public DatabaseProvider {
#if ENABLE(INDEXED_DATABASE)
virtual RefPtr<IDBFactoryBackendInterface> createIDBFactoryBackend() { return nullptr; }
+ virtual bool supportsModernIDB() const { return false; }
#endif
};
Modified: trunk/Source/WebCore/page/DatabaseProvider.h (189830 => 189831)
--- trunk/Source/WebCore/page/DatabaseProvider.h 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebCore/page/DatabaseProvider.h 2015-09-16 00:19:29 UTC (rev 189831)
@@ -40,6 +40,8 @@
#if ENABLE(INDEXED_DATABASE)
IDBFactoryBackendInterface* idbFactoryBackend();
+
+ virtual bool supportsModernIDB() const = 0;
#endif
private:
Modified: trunk/Source/WebKit/ChangeLog (189830 => 189831)
--- trunk/Source/WebKit/ChangeLog 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebKit/ChangeLog 2015-09-16 00:19:29 UTC (rev 189831)
@@ -1,3 +1,12 @@
+2015-09-15 Brady Eidson <beid...@apple.com>
+
+ Add empty IDBFactory implementation for Modern IDB.
+ https://bugs.webkit.org/show_bug.cgi?id=149191
+
+ Reviewed by Jer Noble.
+
+ * Storage/WebDatabaseProvider.h:
+
2015-09-14 Alex Christensen <achristen...@webkit.org>
Progress towards CMake on Mac.
Modified: trunk/Source/WebKit/Storage/WebDatabaseProvider.h (189830 => 189831)
--- trunk/Source/WebKit/Storage/WebDatabaseProvider.h 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebKit/Storage/WebDatabaseProvider.h 2015-09-16 00:19:29 UTC (rev 189831)
@@ -35,6 +35,10 @@
static WebDatabaseProvider& singleton();
virtual ~WebDatabaseProvider();
+#if ENABLE(INDEXED_DATABASE)
+ virtual bool supportsModernIDB() const override { return true; }
+#endif
+
private:
explicit WebDatabaseProvider();
Modified: trunk/Source/WebKit2/ChangeLog (189830 => 189831)
--- trunk/Source/WebKit2/ChangeLog 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebKit2/ChangeLog 2015-09-16 00:19:29 UTC (rev 189831)
@@ -1,5 +1,14 @@
2015-09-15 Brady Eidson <beid...@apple.com>
+ Add empty IDBFactory implementation for Modern IDB.
+ https://bugs.webkit.org/show_bug.cgi?id=149191
+
+ Reviewed by Jer Noble.
+
+ * WebProcess/Databases/WebDatabaseProvider.h:
+
+2015-09-15 Brady Eidson <beid...@apple.com>
+
Move most IDB object encoding/decoding from WebKit2 to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=149152
Modified: trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.h (189830 => 189831)
--- trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.h 2015-09-16 00:16:58 UTC (rev 189830)
+++ trunk/Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.h 2015-09-16 00:19:29 UTC (rev 189831)
@@ -35,6 +35,8 @@
static Ref<WebDatabaseProvider> getOrCreate(uint64_t identifier);
virtual ~WebDatabaseProvider();
+ virtual bool supportsModernIDB() const override { return false; }
+
private:
explicit WebDatabaseProvider(uint64_t identifier);