Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (275302 => 275303)
--- trunk/Source/WebCore/CMakeLists.txt 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/CMakeLists.txt 2021-03-31 20:15:07 UTC (rev 275303)
@@ -290,7 +290,6 @@
Modules/highlight/Highlight.idl
Modules/highlight/HighlightRegister.idl
- Modules/indexeddb/DOMWindow+IndexedDatabase.idl
Modules/indexeddb/IDBCursor.idl
Modules/indexeddb/IDBCursorDirection.idl
Modules/indexeddb/IDBCursorWithValue.idl
@@ -304,7 +303,7 @@
Modules/indexeddb/IDBTransaction.idl
Modules/indexeddb/IDBTransactionMode.idl
Modules/indexeddb/IDBVersionChangeEvent.idl
- Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl
+ Modules/indexeddb/WindowOrWorkerGlobalScope+IndexedDatabase.idl
Modules/mediacapabilities/AudioConfiguration.idl
Modules/mediacapabilities/ColorGamut.idl
Modified: trunk/Source/WebCore/ChangeLog (275302 => 275303)
--- trunk/Source/WebCore/ChangeLog 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/ChangeLog 2021-03-31 20:15:07 UTC (rev 275303)
@@ -1,3 +1,42 @@
+2021-03-31 Sam Weinig <wei...@apple.com>
+
+ Merge DOMWindow+IndexedDatabase.idl and WorkerGlobalScope+IndexedDatabase.idl into a single WindowOrWorkerGlobalScope+IndexedDatabase.idl to match the IndexedDB spec
+ https://bugs.webkit.org/show_bug.cgi?id=223856
+
+ Reviewed by Sihui Liu.
+
+ Replaces DOMWindow+IndexedDatabase.idl and WorkerGlobalScope+IndexedDatabase.idl with
+ WindowOrWorkerGlobalScope+IndexedDatabase.idl which contains a partial mixin interface
+ like specified. Also moves implementations of supplements into the cpp file, as the only
+ use of them is by the two indexedDB static functions.
+
+ * CMakeLists.txt:
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * Modules/indexeddb/DOMWindow+IndexedDatabase.idl: Removed.
+ * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: Removed.
+ * Modules/indexeddb/DOMWindowIndexedDatabase.h: Removed.
+ * Modules/indexeddb/WindowOrWorkerGlobalScope+IndexedDatabase.idl: Added.
+ * Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp: Added.
+ (WebCore::DOMWindowIndexedDatabase::supplementName):
+ (WebCore::WorkerGlobalScopeIndexedDatabase::supplementName):
+ (WebCore::WindowOrWorkerGlobalScopeIndexedDatabase::indexedDB):
+ (WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
+ (WebCore::DOMWindowIndexedDatabase::from):
+ (WebCore::DOMWindowIndexedDatabase::indexedDB):
+ (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
+ (WebCore::WorkerGlobalScopeIndexedDatabase::from):
+ (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
+ * Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.h: Added.
+ * Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl: Removed.
+ * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Removed.
+ * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Removed.
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * inspector/agents/InspectorIndexedDBAgent.cpp:
+
2021-03-30 Simon Fraser <simon.fra...@apple.com>
Assertions in DisplayUpdate when dragging WebView windows between screens with different refresh rates
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (275302 => 275303)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-03-31 20:15:07 UTC (rev 275303)
@@ -136,7 +136,6 @@
$(PROJECT_DIR)/Modules/geolocation/PositionOptions.idl
$(PROJECT_DIR)/Modules/highlight/Highlight.idl
$(PROJECT_DIR)/Modules/highlight/HighlightRegister.idl
-$(PROJECT_DIR)/Modules/indexeddb/DOMWindow+IndexedDatabase.idl
$(PROJECT_DIR)/Modules/indexeddb/IDBCursor.idl
$(PROJECT_DIR)/Modules/indexeddb/IDBCursorDirection.idl
$(PROJECT_DIR)/Modules/indexeddb/IDBCursorWithValue.idl
@@ -150,7 +149,7 @@
$(PROJECT_DIR)/Modules/indexeddb/IDBTransaction.idl
$(PROJECT_DIR)/Modules/indexeddb/IDBTransactionMode.idl
$(PROJECT_DIR)/Modules/indexeddb/IDBVersionChangeEvent.idl
-$(PROJECT_DIR)/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl
+$(PROJECT_DIR)/Modules/indexeddb/WindowOrWorkerGlobalScope+IndexedDatabase.idl
$(PROJECT_DIR)/Modules/mediacapabilities/AudioConfiguration.idl
$(PROJECT_DIR)/Modules/mediacapabilities/ColorGamut.idl
$(PROJECT_DIR)/Modules/mediacapabilities/HdrMetadataType.idl
Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (275302 => 275303)
--- trunk/Source/WebCore/DerivedSources-output.xcfilelist 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist 2021-03-31 20:15:07 UTC (rev 275303)
@@ -556,8 +556,6 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow+DeviceMotion.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow+DeviceOrientation.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow+DeviceOrientation.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow+IndexedDatabase.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow+IndexedDatabase.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow+RequestIdleCallback.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow+RequestIdleCallback.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow+Selection.cpp
@@ -572,8 +570,6 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindow.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindowCaches.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindowCaches.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindowIndexedDatabase.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindowIndexedDatabase.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindowSpeechSynthesis.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindowSpeechSynthesis.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSDOMWindowWebDatabase.cpp
@@ -2562,12 +2558,12 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope+Crypto.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope+Fetch.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope+Fetch.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope+IndexedDatabase.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope+IndexedDatabase.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope+Performance.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope+Performance.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScope.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScopeFetch.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowOrWorkerGlobalScopeFetch.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowSessionStorage.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWindowSessionStorage.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorker.cpp
@@ -2574,14 +2570,10 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorker.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScope+Caches.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScope+Caches.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScope+IndexedDatabase.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScope+IndexedDatabase.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScope.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScope.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScopeCaches.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScopeCaches.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScopeIndexedDatabase.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerGlobalScopeIndexedDatabase.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerLocation.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerLocation.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkerNavigator+GPU.cpp
Modified: trunk/Source/WebCore/DerivedSources.make (275302 => 275303)
--- trunk/Source/WebCore/DerivedSources.make 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/DerivedSources.make 2021-03-31 20:15:07 UTC (rev 275303)
@@ -162,7 +162,6 @@
$(WebCore)/Modules/geolocation/PositionOptions.idl \
$(WebCore)/Modules/highlight/HighlightRegister.idl \
$(WebCore)/Modules/highlight/Highlight.idl \
- $(WebCore)/Modules/indexeddb/DOMWindow+IndexedDatabase.idl \
$(WebCore)/Modules/indexeddb/IDBCursor.idl \
$(WebCore)/Modules/indexeddb/IDBCursorDirection.idl \
$(WebCore)/Modules/indexeddb/IDBCursorWithValue.idl \
@@ -176,7 +175,7 @@
$(WebCore)/Modules/indexeddb/IDBTransaction.idl \
$(WebCore)/Modules/indexeddb/IDBTransactionMode.idl \
$(WebCore)/Modules/indexeddb/IDBVersionChangeEvent.idl \
- $(WebCore)/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl \
+ $(WebCore)/Modules/indexeddb/WindowOrWorkerGlobalScope+IndexedDatabase.idl \
$(WebCore)/Modules/mediacapabilities/AudioConfiguration.idl \
$(WebCore)/Modules/mediacapabilities/ColorGamut.idl \
$(WebCore)/Modules/mediacapabilities/HdrMetadataType.idl \
Deleted: trunk/Source/WebCore/Modules/indexeddb/DOMWindow+IndexedDatabase.idl (275302 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/DOMWindow+IndexedDatabase.idl 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindow+IndexedDatabase.idl 2021-03-31 20:15:07 UTC (rev 275303)
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
- * Copyright (C) 2011 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:
- * 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. ``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
- * 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.
- */
-
-// https://w3c.github.io/IndexedDB/#factory-interface
-// FIXME: This should be merged with WorkerGlobalScope+IndexedDatabase.idl into a new WindowOrWorkerGlobalScope+IndexedDatabase.idl to match the spec.
-[
- ImplementedBy=DOMWindowIndexedDatabase
-] partial interface DOMWindow {
- readonly attribute IDBFactory indexedDB;
- [ImplementedAs=indexedDB] readonly attribute IDBFactory webkitIndexedDB;
-};
-
Deleted: trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp (275302 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp 2021-03-31 20:15:07 UTC (rev 275303)
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2011, 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:
- *
- * 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 GOOGLE 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 "DOMWindowIndexedDatabase.h"
-
-#include "DOMWindow.h"
-#include "DatabaseProvider.h"
-#include "Document.h"
-#include "IDBFactory.h"
-#include "Page.h"
-
-namespace WebCore {
-
-DOMWindowIndexedDatabase::DOMWindowIndexedDatabase(DOMWindow* window)
- : DOMWindowProperty(window)
-{
-}
-
-DOMWindowIndexedDatabase::~DOMWindowIndexedDatabase() = default;
-
-const char* DOMWindowIndexedDatabase::supplementName()
-{
- return "DOMWindowIndexedDatabase";
-}
-
-DOMWindowIndexedDatabase* DOMWindowIndexedDatabase::from(DOMWindow* window)
-{
- DOMWindowIndexedDatabase* supplement = static_cast<DOMWindowIndexedDatabase*>(Supplement<DOMWindow>::from(window, supplementName()));
- if (!supplement) {
- auto newSupplement = makeUnique<DOMWindowIndexedDatabase>(window);
- supplement = newSupplement.get();
- provideTo(window, supplementName(), WTFMove(newSupplement));
- }
- return supplement;
-}
-
-IDBFactory* DOMWindowIndexedDatabase::indexedDB(DOMWindow& window)
-{
- return from(&window)->indexedDB();
-}
-
-IDBFactory* DOMWindowIndexedDatabase::indexedDB()
-{
- auto* window = this->window();
- if (!window)
- return nullptr;
-
- auto* document = window->document();
- if (!document)
- return nullptr;
-
- auto* page = document->page();
- if (!page)
- return nullptr;
-
- if (!window->isCurrentlyDisplayedInFrame())
- return nullptr;
-
- if (!m_idbFactory) {
- auto* connectionProxy = document->idbConnectionProxy();
- if (!connectionProxy)
- return nullptr;
-
- m_idbFactory = IDBFactory::create(*connectionProxy);
- }
-
- return m_idbFactory.get();
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.h (275302 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.h 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.h 2021-03-31 20:15:07 UTC (rev 275303)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2011, 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:
- *
- * 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 GOOGLE 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.
- */
-
-#pragma once
-
-#include "DOMWindowProperty.h"
-#include "Supplementable.h"
-
-namespace WebCore {
-
-class IDBFactory;
-class DOMWindow;
-
-class DOMWindowIndexedDatabase : public DOMWindowProperty, public Supplement<DOMWindow> {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- explicit DOMWindowIndexedDatabase(DOMWindow*);
- virtual ~DOMWindowIndexedDatabase();
-
- static DOMWindowIndexedDatabase* from(DOMWindow*);
-
- WEBCORE_EXPORT static IDBFactory* indexedDB(DOMWindow&);
-
-private:
- IDBFactory* indexedDB();
- static const char* supplementName();
-
- RefPtr<IDBFactory> m_idbFactory;
-};
-
-} // namespace WebCore
Copied: trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScope+IndexedDatabase.idl (from rev 275302, trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl) (0 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScope+IndexedDatabase.idl (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScope+IndexedDatabase.idl 2021-03-31 20:15:07 UTC (rev 275303)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2008-2021 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. ``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
+ * 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.
+ *
+ */
+
+// https://w3c.github.io/IndexedDB/#factory-interface
+[
+ ImplementedBy=WindowOrWorkerGlobalScopeIndexedDatabase
+] partial interface mixin WindowOrWorkerGlobalScope {
+ [SameObject] readonly attribute IDBFactory indexedDB;
+
+ // Non-standard.
+ [Exposed=Window, ImplementedAs=indexedDB] readonly attribute IDBFactory webkitIndexedDB;
+};
Added: trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp (0 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp 2021-03-31 20:15:07 UTC (rev 275303)
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2008-2021 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009, 2011 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:
+ * 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. ``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
+ * 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 "WindowOrWorkerGlobalScopeIndexedDatabase.h"
+
+#include "DOMWindow.h"
+#include "DOMWindowProperty.h"
+#include "Document.h"
+#include "IDBConnectionProxy.h"
+#include "IDBFactory.h"
+#include "Page.h"
+#include "Supplementable.h"
+#include "WorkerGlobalScope.h"
+
+namespace WebCore {
+
+class DOMWindowIndexedDatabase : public DOMWindowProperty, public Supplement<DOMWindow> {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ explicit DOMWindowIndexedDatabase(DOMWindow&);
+ virtual ~DOMWindowIndexedDatabase() = default;
+
+ static DOMWindowIndexedDatabase* from(DOMWindow&);
+ IDBFactory* indexedDB();
+
+private:
+ static const char* supplementName() { return "DOMWindowIndexedDatabase"; }
+
+ RefPtr<IDBFactory> m_idbFactory;
+};
+
+class WorkerGlobalScopeIndexedDatabase : public Supplement<WorkerGlobalScope> {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ explicit WorkerGlobalScopeIndexedDatabase(IDBClient::IDBConnectionProxy&);
+ virtual ~WorkerGlobalScopeIndexedDatabase() = default;
+
+ static WorkerGlobalScopeIndexedDatabase* from(WorkerGlobalScope&);
+ IDBFactory* indexedDB();
+
+private:
+ static const char* supplementName() { return "WorkerGlobalScopeIndexedDatabase"; }
+
+ RefPtr<IDBFactory> m_idbFactory;
+ Ref<IDBClient::IDBConnectionProxy> m_connectionProxy;
+};
+
+// DOMWindowIndexedDatabase supplement.
+
+DOMWindowIndexedDatabase::DOMWindowIndexedDatabase(DOMWindow& window)
+ : DOMWindowProperty(&window)
+{
+}
+
+DOMWindowIndexedDatabase* DOMWindowIndexedDatabase::from(DOMWindow& window)
+{
+ auto* supplement = static_cast<DOMWindowIndexedDatabase*>(Supplement<DOMWindow>::from(&window, supplementName()));
+ if (!supplement) {
+ auto newSupplement = makeUnique<DOMWindowIndexedDatabase>(window);
+ supplement = newSupplement.get();
+ provideTo(&window, supplementName(), WTFMove(newSupplement));
+ }
+ return supplement;
+}
+
+IDBFactory* DOMWindowIndexedDatabase::indexedDB()
+{
+ auto* window = this->window();
+ if (!window)
+ return nullptr;
+
+ auto* document = window->document();
+ if (!document)
+ return nullptr;
+
+ auto* page = document->page();
+ if (!page)
+ return nullptr;
+
+ if (!window->isCurrentlyDisplayedInFrame())
+ return nullptr;
+
+ if (!m_idbFactory) {
+ auto* connectionProxy = document->idbConnectionProxy();
+ if (!connectionProxy)
+ return nullptr;
+
+ m_idbFactory = IDBFactory::create(*connectionProxy);
+ }
+
+ return m_idbFactory.get();
+}
+
+// WorkerGlobalScope supplement.
+
+WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase(IDBClient::IDBConnectionProxy& connectionProxy)
+ : m_connectionProxy(connectionProxy)
+{
+}
+
+WorkerGlobalScopeIndexedDatabase* WorkerGlobalScopeIndexedDatabase::from(WorkerGlobalScope& scope)
+{
+ auto* supplement = static_cast<WorkerGlobalScopeIndexedDatabase*>(Supplement<WorkerGlobalScope>::from(&scope, supplementName()));
+ if (!supplement) {
+ auto* connectionProxy = scope.idbConnectionProxy();
+ if (!connectionProxy)
+ return nullptr;
+
+ auto newSupplement = makeUnique<WorkerGlobalScopeIndexedDatabase>(*connectionProxy);
+ supplement = newSupplement.get();
+ provideTo(&scope, supplementName(), WTFMove(newSupplement));
+ }
+ return supplement;
+}
+
+IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB()
+{
+ if (!m_idbFactory)
+ m_idbFactory = IDBFactory::create(m_connectionProxy.get());
+ return m_idbFactory.get();
+}
+
+
+IDBFactory* WindowOrWorkerGlobalScopeIndexedDatabase::indexedDB(WorkerGlobalScope& scope)
+{
+ auto* scopeIDB = WorkerGlobalScopeIndexedDatabase::from(scope);
+ return scopeIDB ? scopeIDB->indexedDB() : nullptr;
+}
+
+IDBFactory* WindowOrWorkerGlobalScopeIndexedDatabase::indexedDB(DOMWindow& window)
+{
+ return DOMWindowIndexedDatabase::from(window)->indexedDB();
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.h (from rev 275302, trunk/Source/WebCore/Modules/indexeddb/DOMWindow+IndexedDatabase.idl) (0 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.h (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.h 2021-03-31 20:15:07 UTC (rev 275303)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008-2021 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. ``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
+ * 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.
+ *
+ */
+
+#pragma once
+
+namespace WebCore {
+
+class DOMWindow;
+class IDBFactory;
+class WorkerGlobalScope;
+
+class WindowOrWorkerGlobalScopeIndexedDatabase {
+public:
+ WEBCORE_EXPORT static IDBFactory* indexedDB(DOMWindow&);
+ WEBCORE_EXPORT static IDBFactory* indexedDB(WorkerGlobalScope&);
+};
+
+} // namespace WebCore
Deleted: trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl (275302 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl 2021-03-31 20:15:07 UTC (rev 275303)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2008, 2016 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. ``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
- * 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.
- *
- */
-
-// https://w3c.github.io/IndexedDB/#factory-interface
-// FIXME: This should be merged with DOMWindow+IndexedDatabase.idl into a new WindowOrWorkerGlobalScope+IndexedDatabase.idl to match the spec.
-[
- ImplementedBy=WorkerGlobalScopeIndexedDatabase
-] partial interface WorkerGlobalScope {
- [SameObject] readonly attribute IDBFactory indexedDB;
-};
Deleted: trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp (275302 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp 2021-03-31 20:15:07 UTC (rev 275303)
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- * Copyright (C) 2009, 2011 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:
- * 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. ``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
- * 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 "WorkerGlobalScopeIndexedDatabase.h"
-
-#include "IDBConnectionProxy.h"
-#include "IDBFactory.h"
-#include "IDBOpenDBRequest.h"
-#include "ScriptExecutionContext.h"
-#include "WorkerGlobalScope.h"
-
-namespace WebCore {
-
-WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase(WorkerGlobalScope&, IDBClient::IDBConnectionProxy& connectionProxy)
- : m_connectionProxy(connectionProxy)
-{
-}
-
-WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase() = default;
-
-const char* WorkerGlobalScopeIndexedDatabase::supplementName()
-{
- return "WorkerGlobalScopeIndexedDatabase";
-}
-
-WorkerGlobalScopeIndexedDatabase* WorkerGlobalScopeIndexedDatabase::from(WorkerGlobalScope& scope)
-{
- WorkerGlobalScopeIndexedDatabase* supplement = static_cast<WorkerGlobalScopeIndexedDatabase*>(Supplement<WorkerGlobalScope>::from(&scope, supplementName()));
- if (!supplement) {
- auto* connectionProxy = scope.idbConnectionProxy();
- if (!connectionProxy)
- return nullptr;
-
- auto newSupplement = makeUnique<WorkerGlobalScopeIndexedDatabase>(scope, *connectionProxy);
- supplement = newSupplement.get();
- provideTo(&scope, supplementName(), WTFMove(newSupplement));
- }
- return supplement;
-}
-
-IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB(WorkerGlobalScope& scope)
-{
- auto* scopeIDB = from(scope);
- return scopeIDB ? scopeIDB->indexedDB() : nullptr;
-}
-
-IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB()
-{
- if (!m_idbFactory)
- m_idbFactory = IDBFactory::create(m_connectionProxy.get());
-
- return m_idbFactory.get();
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h (275302 => 275303)
--- trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h 2021-03-31 20:15:07 UTC (rev 275303)
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2008, 2009, 2013, 2014, 2015, 2016 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. ``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
- * 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.
- *
- */
-
-#pragma once
-
-#include "Supplementable.h"
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class IDBFactory;
-class WorkerGlobalScope;
-
-namespace IDBClient {
-class IDBConnectionProxy;
-}
-
-class WorkerGlobalScopeIndexedDatabase : public Supplement<WorkerGlobalScope> {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- explicit WorkerGlobalScopeIndexedDatabase(WorkerGlobalScope&, IDBClient::IDBConnectionProxy&);
- virtual ~WorkerGlobalScopeIndexedDatabase();
-
- static IDBFactory* indexedDB(WorkerGlobalScope&);
-
-private:
- IDBFactory* indexedDB();
-
- static const char* supplementName();
- static WorkerGlobalScopeIndexedDatabase* from(WorkerGlobalScope&);
-
- RefPtr<IDBFactory> m_idbFactory;
- Ref<IDBClient::IDBConnectionProxy> m_connectionProxy;
-};
-
-} // namespace WebCore
Modified: trunk/Source/WebCore/Sources.txt (275302 => 275303)
--- trunk/Source/WebCore/Sources.txt 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/Sources.txt 2021-03-31 20:15:07 UTC (rev 275303)
@@ -68,7 +68,6 @@
Modules/highlight/AppHighlightStorage.cpp
Modules/highlight/HighlightRegister.cpp
Modules/highlight/Highlight.cpp
-Modules/indexeddb/DOMWindowIndexedDatabase.cpp
Modules/indexeddb/IDBCursor.cpp
Modules/indexeddb/IDBCursorWithValue.cpp
Modules/indexeddb/IDBDatabase.cpp
@@ -90,7 +89,7 @@
Modules/indexeddb/IDBTransaction.cpp
Modules/indexeddb/IDBValue.cpp
Modules/indexeddb/IDBVersionChangeEvent.cpp
-Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
+Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp
Modules/indexeddb/client/IDBConnectionProxy.cpp
Modules/indexeddb/client/IDBConnectionToServer.cpp
Modules/indexeddb/client/TransactionOperation.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (275302 => 275303)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-03-31 20:15:07 UTC (rev 275303)
@@ -1530,7 +1530,6 @@
5182C25A1F3143CD0059BA7C /* JSServiceWorkerGlobalScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C24D1F3142500059BA7C /* JSServiceWorkerGlobalScope.h */; };
5182C25C1F3143CD0059BA7C /* JSServiceWorkerRegistration.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C2501F3142500059BA7C /* JSServiceWorkerRegistration.h */; };
5185430B1FB6784500478F95 /* SWServerToContextConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 518543091FB6783E00478F95 /* SWServerToContextConnection.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 5185FC751BB4C4E80012898F /* DOMWindowIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */; };
5185FC7B1BB4C4E80012898F /* IDBCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B411B9F889B00F789CE /* IDBCursor.h */; settings = {ATTRIBUTES = (Private, ); }; };
5185FC7E1BB4C4E80012898F /* IDBCursorWithValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B431B9F889B00F789CE /* IDBCursorWithValue.h */; };
5185FC811BB4C4E80012898F /* IDBDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B451B9F889B00F789CE /* IDBDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1550,7 +1549,7 @@
5185FCAD1BB4C4E80012898F /* IDBTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B511B9F889B00F789CE /* IDBTransaction.h */; settings = {ATTRIBUTES = (Private, ); }; };
5185FCB01BB4C4E80012898F /* IDBVersionChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B531B9F889B00F789CE /* IDBVersionChangeEvent.h */; };
5185FCB21BB4C4E80012898F /* IndexedDB.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719AE181106E00016DC51 /* IndexedDB.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 5185FCB41BB4C4E80012898F /* WorkerGlobalScopeIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719B2181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.h */; };
+ 5185FCB41BB4C4E80012898F /* WindowOrWorkerGlobalScopeIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719B2181106E00016DC51 /* WindowOrWorkerGlobalScopeIndexedDatabase.h */; };
5185FCB91BB4CBF80012898F /* IDBConnectionToClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58FE1BB07AA500C19282 /* IDBConnectionToClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
5185FCBB1BB4CBF80012898F /* IDBServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58F01BAB720F00C19282 /* IDBServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
518864E11BBAF57400E540C9 /* UniqueIDBDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 518864DF1BBAF30F00E540C9 /* UniqueIDBDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8897,9 +8896,6 @@
51CBFC980D10E483002DBF51 /* CachedFramePlatformData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFramePlatformData.h; sourceTree = "<group>"; };
51D1248A1E73625C002B2820 /* NetworkStorageSessionCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkStorageSessionCocoa.mm; sourceTree = "<group>"; };
51D1248C1E736456002B2820 /* CookieCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CookieCocoa.mm; sourceTree = "<group>"; };
- 51D7196C181106DF0016DC51 /* DOMWindowIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowIndexedDatabase.cpp; sourceTree = "<group>"; };
- 51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowIndexedDatabase.h; sourceTree = "<group>"; };
- 51D7196E181106DF0016DC51 /* DOMWindow+IndexedDatabase.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "DOMWindow+IndexedDatabase.idl"; sourceTree = "<group>"; };
51D71977181106DF0016DC51 /* IDBCursor.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBCursor.idl; sourceTree = "<group>"; };
51D7197B181106DF0016DC51 /* IDBCursorWithValue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBCursorWithValue.idl; sourceTree = "<group>"; };
51D7197E181106DF0016DC51 /* IDBDatabase.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBDatabase.idl; sourceTree = "<group>"; };
@@ -8918,9 +8914,9 @@
51D719A6181106E00016DC51 /* IDBTransaction.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBTransaction.idl; sourceTree = "<group>"; };
51D719AD181106E00016DC51 /* IDBVersionChangeEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBVersionChangeEvent.idl; sourceTree = "<group>"; };
51D719AE181106E00016DC51 /* IndexedDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexedDB.h; sourceTree = "<group>"; };
- 51D719B1181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerGlobalScopeIndexedDatabase.cpp; sourceTree = "<group>"; };
- 51D719B2181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerGlobalScopeIndexedDatabase.h; sourceTree = "<group>"; };
- 51D719B3181106E00016DC51 /* WorkerGlobalScope+IndexedDatabase.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "WorkerGlobalScope+IndexedDatabase.idl"; sourceTree = "<group>"; };
+ 51D719B1181106E00016DC51 /* WindowOrWorkerGlobalScopeIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowOrWorkerGlobalScopeIndexedDatabase.cpp; sourceTree = "<group>"; };
+ 51D719B2181106E00016DC51 /* WindowOrWorkerGlobalScopeIndexedDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowOrWorkerGlobalScopeIndexedDatabase.h; sourceTree = "<group>"; };
+ 51D719B3181106E00016DC51 /* WindowOrWorkerGlobalScope+IndexedDatabase.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "WindowOrWorkerGlobalScope+IndexedDatabase.idl"; sourceTree = "<group>"; };
51D7236A1BB60BFE00478CA3 /* IDBResultData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBResultData.cpp; sourceTree = "<group>"; };
51D7236B1BB60BFE00478CA3 /* IDBResultData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBResultData.h; sourceTree = "<group>"; };
51D7EFEB1BDEFA4700E93E10 /* TransactionOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransactionOperation.cpp; sourceTree = "<group>"; };
@@ -24095,9 +24091,6 @@
510310421BA8C64C003329C0 /* client */,
510A58EE1BAB71E000C19282 /* server */,
510A58E11BAA409800C19282 /* shared */,
- 51D7196E181106DF0016DC51 /* DOMWindow+IndexedDatabase.idl */,
- 51D7196C181106DF0016DC51 /* DOMWindowIndexedDatabase.cpp */,
- 51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */,
51714EA71CF4DE87004723C4 /* IDBActiveDOMObject.h */,
51645B541B9F88E800F789CE /* IDBCursor.cpp */,
51645B411B9F889B00F789CE /* IDBCursor.h */,
@@ -24158,9 +24151,9 @@
51645B531B9F889B00F789CE /* IDBVersionChangeEvent.h */,
51D719AD181106E00016DC51 /* IDBVersionChangeEvent.idl */,
51D719AE181106E00016DC51 /* IndexedDB.h */,
- 51D719B3181106E00016DC51 /* WorkerGlobalScope+IndexedDatabase.idl */,
- 51D719B1181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.cpp */,
- 51D719B2181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.h */,
+ 51D719B3181106E00016DC51 /* WindowOrWorkerGlobalScope+IndexedDatabase.idl */,
+ 51D719B1181106E00016DC51 /* WindowOrWorkerGlobalScopeIndexedDatabase.cpp */,
+ 51D719B2181106E00016DC51 /* WindowOrWorkerGlobalScopeIndexedDatabase.h */,
);
path = indexeddb;
sourceTree = "<group>";
@@ -32210,7 +32203,6 @@
1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */,
41D129D11F3D0F0E00D15E47 /* DOMWindowCaches.h in Headers */,
51FA2D78152132B300C1BA0B /* DOMWindowExtension.h in Headers */,
- 5185FC751BB4C4E80012898F /* DOMWindowIndexedDatabase.h in Headers */,
97D2AD0414B823A60093DF32 /* DOMWindowProperty.h in Headers */,
AA2A5AD616A4861600975A25 /* DOMWindowSpeechSynthesis.h in Headers */,
A8CCBB49151F831600AB7CE9 /* DOMWindowWebDatabase.h in Headers */,
@@ -35738,6 +35730,7 @@
9B27FC60234D9ADB00394A46 /* WindowEventLoop.h in Headers */,
BC8243E90D0CFD7500460C8F /* WindowFeatures.h in Headers */,
7E99AF530B13846468FB01A5 /* WindowFocusAllowedIndicator.h in Headers */,
+ 5185FCB41BB4C4E80012898F /* WindowOrWorkerGlobalScopeIndexedDatabase.h in Headers */,
463521AD2081092A00C28922 /* WindowProxy.h in Headers */,
E1E1BF00115FF6FB006F52CA /* WindowsKeyboardCodes.h in Headers */,
501BAAA913950E2C00F7ACEB /* WindRule.h in Headers */,
@@ -35760,7 +35753,6 @@
91E0DDC4230B41F10019E1E3 /* WorkerDOMDebuggerAgent.h in Headers */,
2E4346490F546A8200B0F1BA /* WorkerGlobalScope.h in Headers */,
41D129CE1F3D0EF600D15E47 /* WorkerGlobalScopeCaches.h in Headers */,
- 5185FCB41BB4C4E80012898F /* WorkerGlobalScopeIndexedDatabase.h in Headers */,
2E43464B0F546A8200B0F1BA /* WorkerGlobalScopeProxy.h in Headers */,
A54A0C621DB7F8C10017A90B /* WorkerInspectorController.h in Headers */,
A54A0C6C1DB831F90017A90B /* WorkerInspectorProxy.h in Headers */,
Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (275302 => 275303)
--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp 2021-03-31 20:15:07 UTC (rev 275303)
@@ -21,7 +21,6 @@
#include "config.h"
#include "JSDOMWindowCustom.h"
-#include "DOMWindowIndexedDatabase.h"
#include "DOMWindowWebDatabase.h"
#include "Frame.h"
#include "HTMLDocument.h"
Modified: trunk/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp (275302 => 275303)
--- trunk/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp 2021-03-31 20:13:05 UTC (rev 275302)
+++ trunk/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp 2021-03-31 20:15:07 UTC (rev 275303)
@@ -35,7 +35,6 @@
#include "AddEventListenerOptions.h"
#include "DOMStringList.h"
#include "DOMWindow.h"
-#include "DOMWindowIndexedDatabase.h"
#include "Document.h"
#include "Event.h"
#include "EventListener.h"
@@ -59,6 +58,7 @@
#include "InstrumentingAgents.h"
#include "ScriptState.h"
#include "SecurityOrigin.h"
+#include "WindowOrWorkerGlobalScopeIndexedDatabase.h"
#include <_javascript_Core/HeapInlines.h>
#include <_javascript_Core/InjectedScript.h>
#include <_javascript_Core/InjectedScriptManager.h>
@@ -556,7 +556,7 @@
if (!domWindow)
return makeUnexpected("Missing window for given document"_s);
- IDBFactory* idbFactory = DOMWindowIndexedDatabase::indexedDB(*domWindow);
+ IDBFactory* idbFactory = WindowOrWorkerGlobalScopeIndexedDatabase::indexedDB(*domWindow);
if (!idbFactory)
makeUnexpected("Missing IndexedDB factory of window for given document"_s);