Title: [189879] trunk
Revision
189879
Author
beid...@apple.com
Date
2015-09-16 13:45:01 -0700 (Wed, 16 Sep 2015)

Log Message

Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
https://bugs.webkit.org/show_bug.cgi?id=149229

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/deletedatabase-request.html
      storage/indexeddb/modern/deletedatabase-null-name-exception.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBDatabaseIdentifier.cpp: Added.
(WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
* Modules/indexeddb/IDBDatabaseIdentifier.h: Added.
(WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
(WebCore::IDBDatabaseIdentifier::isHashTableDeletedValue):
(WebCore::IDBDatabaseIdentifier::hash):
(WebCore::IDBDatabaseIdentifier::isValid):
(WebCore::IDBDatabaseIdentifier::operator==):
(WebCore::IDBDatabaseIdentifier::databaseName):
(WebCore::IDBDatabaseIdentifierHash::hash):
(WebCore::IDBDatabaseIdentifierHash::equal):
(WebCore::IDBDatabaseIdentifierHashTraits::isEmptyValue):

* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::shouldThrowSecurityException):
(WebCore::IDBClient::IDBFactory::getDatabaseNames):
(WebCore::IDBClient::IDBFactory::open):
(WebCore::IDBClient::IDBFactory::deleteDatabase):
* Modules/indexeddb/client/IDBFactoryImpl.h:

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
(WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
(WebCore::IDBClient::IDBOpenDBRequest::create):

* Modules/indexeddb/client/IDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
(WebCore::IDBClient::IDBRequest::IDBRequest):
(WebCore::IDBClient::IDBRequest::result):
(WebCore::IDBClient::IDBRequest::errorCode):
(WebCore::IDBClient::IDBRequest::error):
(WebCore::IDBClient::IDBRequest::source):
(WebCore::IDBClient::IDBRequest::transaction):
(WebCore::IDBClient::IDBRequest::readyState):
(WebCore::IDBClient::IDBRequest::eventTargetInterface):
(WebCore::IDBClient::IDBRequest::activeDOMObjectName):
(WebCore::IDBClient::IDBRequest::canSuspendForPageCache):
* Modules/indexeddb/client/IDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h.

* platform/Logging.h:

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Enable IDB in WK1.

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/wk2/TestExpectations:
* storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt: Added.
* storage/indexeddb/modern/deletedatabase-null-name-exception.html: Added.
* storage/indexeddb/modern/deletedatabase-request-expected.txt: Added.
* storage/indexeddb/modern/deletedatabase-request.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (189878 => 189879)


--- trunk/LayoutTests/ChangeLog	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/LayoutTests/ChangeLog	2015-09-16 20:45:01 UTC (rev 189879)
@@ -1,3 +1,17 @@
+2015-09-16  Brady Eidson  <beid...@apple.com>
+
+        Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
+        https://bugs.webkit.org/show_bug.cgi?id=149229
+
+        Reviewed by Alex Christensen.
+
+        * platform/mac-wk1/TestExpectations:
+        * platform/wk2/TestExpectations:
+        * storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt: Added.
+        * storage/indexeddb/modern/deletedatabase-null-name-exception.html: Added.
+        * storage/indexeddb/modern/deletedatabase-request-expected.txt: Added.
+        * storage/indexeddb/modern/deletedatabase-request.html: Added.
+
 2015-09-16  Chris Dumez  <cdu...@apple.com>
 
         Unreviewed, drop dom/xhtml/level3/core/nodegetbaseuri03.xhtml test.

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (189878 => 189879)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-09-16 20:45:01 UTC (rev 189879)
@@ -54,7 +54,7 @@
 ########################################
 ### START OF (2) Failures without bug reports
 
-# IndexedDB is not yet enabled in Mac WK1
+# Legacy IndexedDB will never be enabled in Mac WK1.
 storage/indexeddb
 imported/w3c/indexeddb
 fast/history/page-cache-indexed-closed-db.html
@@ -68,8 +68,8 @@
 crypto/subtle/rsa-indexeddb-non-exportable.html
 inspector/indexeddb
 
-# But since it is disabled at runtime, we should make sure it is correctly disabled
-storage/indexeddb/properties-disabled-at-runtime.html [ Pass ]
+# But Modern IndexedDB is.
+storage/indexeddb/modern [ Pass ]
 
 # Fails with WebKit1 only.
 editing/secure-input/reset-state-on-navigation.html [ Failure ]

Modified: trunk/LayoutTests/platform/wk2/TestExpectations (189878 => 189879)


--- trunk/LayoutTests/platform/wk2/TestExpectations	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/LayoutTests/platform/wk2/TestExpectations	2015-09-16 20:45:01 UTC (rev 189879)
@@ -579,6 +579,9 @@
 imported/w3c/indexeddb/idbcursor-direction.htm [ Pass Failure ]
 imported/w3c/indexeddb/idbcursor-key.htm [ Pass Failure ]
 
+# Don't run Modern IDB tests while the feature is under development
+storage/indexeddb/modern [ Skip ]
+
 ### END OF (3) Unclassified failures
 ########################################
 

Added: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt (0 => 189879)


--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,3 @@
+ALERT: TypeError: Not enough arguments
+ALERT: Done
+This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.

Added: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception.html (0 => 189879)


--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception.html	                        (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception.html	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,23 @@
+This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.
+<script>
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    alert("Done");
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+try {
+	var request = window.indexedDB.deleteDatabase();
+} catch (e) {
+	alert(e);
+}
+
+done();
+</script>

Added: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-expected.txt (0 => 189879)


--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-expected.txt	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,3 @@
+ALERT: [object IDBOpenDBRequest]
+ALERT: Done
+This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.

Added: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request.html (0 => 189879)


--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request.html	                        (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request.html	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,20 @@
+This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.
+<script>
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    alert("Done");
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+var request = window.indexedDB.deleteDatabase("TestDatabase");
+alert(request);
+
+done();
+</script>

Modified: trunk/Source/WebCore/CMakeLists.txt (189878 => 189879)


--- trunk/Source/WebCore/CMakeLists.txt	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/Source/WebCore/CMakeLists.txt	2015-09-16 20:45:01 UTC (rev 189879)
@@ -850,6 +850,7 @@
     Modules/indexeddb/IDBCursorWithValue.cpp
     Modules/indexeddb/IDBDatabase.cpp
     Modules/indexeddb/IDBDatabaseException.cpp
+    Modules/indexeddb/IDBDatabaseIdentifier.cpp
     Modules/indexeddb/IDBDatabaseMetadata.cpp
     Modules/indexeddb/IDBEventDispatcher.cpp
     Modules/indexeddb/IDBFactory.cpp
@@ -867,6 +868,8 @@
     Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
 
     Modules/indexeddb/client/IDBFactoryImpl.cpp
+    Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp
+    Modules/indexeddb/client/IDBRequestImpl.cpp
 
     Modules/indexeddb/legacy/IDBCursorBackend.cpp
     Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp

Modified: trunk/Source/WebCore/ChangeLog (189878 => 189879)


--- trunk/Source/WebCore/ChangeLog	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/Source/WebCore/ChangeLog	2015-09-16 20:45:01 UTC (rev 189879)
@@ -1,3 +1,56 @@
+2015-09-16  Brady Eidson  <beid...@apple.com>
+
+        Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
+        https://bugs.webkit.org/show_bug.cgi?id=149229
+
+        Reviewed by Alex Christensen.
+
+        Test: storage/indexeddb/modern/deletedatabase-request.html
+              storage/indexeddb/modern/deletedatabase-null-name-exception.html
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * Modules/indexeddb/IDBDatabaseIdentifier.cpp: Added.
+        (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
+        * Modules/indexeddb/IDBDatabaseIdentifier.h: Added.
+        (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
+        (WebCore::IDBDatabaseIdentifier::isHashTableDeletedValue):
+        (WebCore::IDBDatabaseIdentifier::hash):
+        (WebCore::IDBDatabaseIdentifier::isValid):
+        (WebCore::IDBDatabaseIdentifier::operator==):
+        (WebCore::IDBDatabaseIdentifier::databaseName):
+        (WebCore::IDBDatabaseIdentifierHash::hash):
+        (WebCore::IDBDatabaseIdentifierHash::equal):
+        (WebCore::IDBDatabaseIdentifierHashTraits::isEmptyValue):
+
+        * Modules/indexeddb/client/IDBFactoryImpl.cpp:
+        (WebCore::IDBClient::shouldThrowSecurityException):
+        (WebCore::IDBClient::IDBFactory::getDatabaseNames):
+        (WebCore::IDBClient::IDBFactory::open):
+        (WebCore::IDBClient::IDBFactory::deleteDatabase):
+        * Modules/indexeddb/client/IDBFactoryImpl.h:
+
+        * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
+        (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
+        * Modules/indexeddb/client/IDBOpenDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
+        (WebCore::IDBClient::IDBOpenDBRequest::create):
+
+        * Modules/indexeddb/client/IDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
+        (WebCore::IDBClient::IDBRequest::IDBRequest):
+        (WebCore::IDBClient::IDBRequest::result):
+        (WebCore::IDBClient::IDBRequest::errorCode):
+        (WebCore::IDBClient::IDBRequest::error):
+        (WebCore::IDBClient::IDBRequest::source):
+        (WebCore::IDBClient::IDBRequest::transaction):
+        (WebCore::IDBClient::IDBRequest::readyState):
+        (WebCore::IDBClient::IDBRequest::eventTargetInterface):
+        (WebCore::IDBClient::IDBRequest::activeDOMObjectName):
+        (WebCore::IDBClient::IDBRequest::canSuspendForPageCache):
+        * Modules/indexeddb/client/IDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h.
+
+        * platform/Logging.h:
+
 2015-09-16  Chris Dumez  <cdu...@apple.com>
 
         Add initial support for [Unforgeable] IDL extended attribute

Added: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp (0 => 189879)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,49 @@
+/*
+ * 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. ``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 "IDBDatabaseIdentifier.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+IDBDatabaseIdentifier::IDBDatabaseIdentifier(const String& databaseName, const SecurityOrigin& openingOrigin, const SecurityOrigin& mainFrameOrigin)
+    : m_databaseName(databaseName)
+    , m_openingOrigin(SecurityOriginData::fromSecurityOrigin(openingOrigin))
+    , m_mainFrameOrigin(SecurityOriginData::fromSecurityOrigin(mainFrameOrigin))
+
+{
+    // The empty string is a valid database name, but a null string is not.
+    ASSERT(!databaseName.isNull());
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)

Added: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h (0 => 189879)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,115 @@
+/*
+ * 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. ``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.
+ */
+
+#ifndef IDBDatabaseIdentifier_h
+#define IDBDatabaseIdentifier_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "SecurityOriginData.h"
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class SecurityOrigin;
+
+class IDBDatabaseIdentifier {
+public:
+    IDBDatabaseIdentifier()
+    {
+    }
+
+    IDBDatabaseIdentifier(WTF::HashTableDeletedValueType)
+    {
+        m_openingOrigin.port = -1;
+        m_mainFrameOrigin.port = -1;
+    }
+
+    bool isHashTableDeletedValue() const
+    {
+        return m_openingOrigin.port == -1 && m_mainFrameOrigin.port == -1;
+    }
+
+    unsigned hash() const
+    {
+        unsigned nameHash = StringHash::hash(m_databaseName);
+        unsigned openingProtocolHash = StringHash::hash(m_openingOrigin.protocol);
+        unsigned openingHostHash = StringHash::hash(m_openingOrigin.host);
+        unsigned mainFrameProtocolHash = StringHash::hash(m_mainFrameOrigin.protocol);
+        unsigned mainFrameHostHash = StringHash::hash(m_mainFrameOrigin.host);
+        
+        unsigned hashCodes[7] = { nameHash, openingProtocolHash, openingHostHash, static_cast<unsigned>(m_openingOrigin.port), mainFrameProtocolHash, mainFrameHostHash, static_cast<unsigned>(m_mainFrameOrigin.port) };
+        return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes);
+    }
+
+    IDBDatabaseIdentifier(const String& databaseName, const SecurityOrigin& openingOrigin, const SecurityOrigin& mainFrameOrigin);
+
+    bool isValid() const
+    {
+        return !m_databaseName.isNull() && m_openingOrigin.port >= 0 && m_mainFrameOrigin.port >= 0;
+    }
+
+    bool operator==(const IDBDatabaseIdentifier& other) const
+    {
+        return other.m_databaseName == m_databaseName
+            && other.m_openingOrigin == m_openingOrigin
+            && other.m_mainFrameOrigin == m_mainFrameOrigin;
+    }
+
+    const String& databaseName() const { return m_databaseName; }
+
+private:
+    String m_databaseName;
+    SecurityOriginData m_openingOrigin;
+    SecurityOriginData m_mainFrameOrigin;
+};
+
+struct IDBDatabaseIdentifierHash {
+    static unsigned hash(const IDBDatabaseIdentifier& a) { return a.hash(); }
+    static bool equal(const IDBDatabaseIdentifier& a, const IDBDatabaseIdentifier& b) { return a == b; }
+    static const bool safeToCompareToEmptyOrDeleted = false;
+};
+
+struct IDBDatabaseIdentifierHashTraits : WTF::SimpleClassHashTraits<IDBDatabaseIdentifier> {
+    static const bool hasIsEmptyValueFunction = true;
+    static bool isEmptyValue(const IDBDatabaseIdentifier& info) { return !info.isValid(); }
+};
+
+} // namespace WebCore
+
+namespace WTF {
+
+template<> struct HashTraits<WebCore::IDBDatabaseIdentifier> : WebCore::IDBDatabaseIdentifierHashTraits { };
+template<> struct DefaultHash<WebCore::IDBDatabaseIdentifier> {
+    typedef WebCore::IDBDatabaseIdentifierHash Hash;
+};
+
+} // namespace WTF
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBDatabaseIdentifier_h

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp (189878 => 189879)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp	2015-09-16 20:45:01 UTC (rev 189879)
@@ -28,9 +28,36 @@
 
 #if ENABLE(INDEXED_DATABASE)
 
+#include "ExceptionCode.h"
+#include "IDBDatabaseIdentifier.h"
+#include "IDBOpenDBRequestImpl.h"
+#include "Logging.h"
+#include "Page.h"
+#include "SchemeRegistry.h"
+#include "SecurityOrigin.h"
+
 namespace WebCore {
 namespace IDBClient {
 
+static bool shouldThrowSecurityException(ScriptExecutionContext* context)
+{
+    ASSERT(is<Document>(*context) || context->isWorkerGlobalScope());
+    if (is<Document>(*context)) {
+        Document& document = downcast<Document>(*context);
+        if (!document.frame())
+            return true;
+        if (!document.page())
+            return true;
+        if (document.page()->usesEphemeralSession() && !SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing(document.securityOrigin()->protocol()))
+            return true;
+    }
+
+    if (!context->securityOrigin()->canAccessDatabase(context->topOrigin()))
+        return true;
+
+    return false;
+}
+
 Ref<IDBFactory> IDBFactory::create()
 {
     return adoptRef(*new IDBFactory);
@@ -41,24 +68,45 @@
 
 }
 
-PassRefPtr<IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext*, ExceptionCode&)
+PassRefPtr<WebCore::IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext*, ExceptionCode&)
 {
     return nullptr;
 }
 
-PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext*, const String&, ExceptionCode&)
+PassRefPtr<WebCore::IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext*, const String&, ExceptionCode&)
 {
     return nullptr;
 }
 
-PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext*, const String&, unsigned long long, ExceptionCode&)
+PassRefPtr<WebCore::IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext*, const String&, unsigned long long, ExceptionCode&)
 {
     return nullptr;
 }
 
-PassRefPtr<IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext*, const String&, ExceptionCode&)
+PassRefPtr<WebCore::IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
 {
-    return nullptr;
+    LOG(IndexedDB, "IDBFactory::deleteDatabase");
+
+    if (name.isNull()) {
+        ec = TypeError;
+        return nullptr;
+    }
+    
+    if (shouldThrowSecurityException(context)) {
+        ec = SECURITY_ERR;
+        return nullptr;
+    }
+
+    ASSERT(context->securityOrigin());
+    ASSERT(context->topOrigin());
+    IDBDatabaseIdentifier databaseIdentifier(name, *context->securityOrigin(), *context->topOrigin());
+    if (!databaseIdentifier.isValid()) {
+        ec = TypeError;
+        return nullptr;
+    }
+
+    auto request = IDBOpenDBRequest::create(context);
+    return adoptRef(&request.leakRef());
 }
 
 short IDBFactory::cmp(ScriptExecutionContext*, const Deprecated::ScriptValue&, const Deprecated::ScriptValue&, ExceptionCode&)

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h (189878 => 189879)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h	2015-09-16 20:45:01 UTC (rev 189879)
@@ -37,11 +37,11 @@
 public:
     static Ref<IDBFactory> create();
 
-    virtual PassRefPtr<IDBRequest> getDatabaseNames(ScriptExecutionContext*, ExceptionCode&) override final;
+    virtual PassRefPtr<WebCore::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 PassRefPtr<WebCore::IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, ExceptionCode&) override final;
+    virtual PassRefPtr<WebCore::IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, unsigned long long version, ExceptionCode&) override final;
+    virtual PassRefPtr<WebCore::IDBOpenDBRequest> deleteDatabase(ScriptExecutionContext*, const String& name, ExceptionCode&) override final;
 
     virtual short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue& first, const Deprecated::ScriptValue& second, ExceptionCode&) override final;
 

Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp (from rev 189878, trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp) (0 => 189879)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,43 @@
+/*
+ * 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 "IDBOpenDBRequestImpl.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+namespace IDBClient {
+
+IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext* context)
+    : IDBRequest(context)
+{
+    suspendIfNeeded();
+}
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)

Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h (from rev 189878, trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp) (0 => 189879)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,51 @@
+/*
+ * 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 IDBOpenDBRequestImpl_h
+#define IDBOpenDBRequestImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBRequestImpl.h"
+
+namespace WebCore {
+namespace IDBClient {
+
+class IDBOpenDBRequest : public IDBRequest {
+public:
+    static Ref<IDBOpenDBRequest> create(ScriptExecutionContext* context)
+    {
+        return adoptRef(*new IDBOpenDBRequest(context));
+    }
+
+private:
+    IDBOpenDBRequest(ScriptExecutionContext*);
+};
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBOpenDBRequestImpl_h

Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp (from rev 189878, trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp) (0 => 189879)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,90 @@
+/*
+ * 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 "IDBRequestImpl.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include <wtf/NeverDestroyed.h>
+
+namespace WebCore {
+namespace IDBClient {
+
+IDBRequest::IDBRequest(ScriptExecutionContext* context)
+    : IDBOpenDBRequest(context)
+{
+}
+
+PassRefPtr<IDBAny> IDBRequest::result(ExceptionCode&) const
+{
+    return nullptr;
+}
+
+unsigned short IDBRequest::errorCode(ExceptionCode&) const
+{
+    return 0;
+}
+
+PassRefPtr<DOMError> IDBRequest::error(ExceptionCode&) const
+{
+    return nullptr;
+}
+
+PassRefPtr<IDBAny> IDBRequest::source() const
+{
+    return nullptr;
+}
+
+PassRefPtr<IDBTransaction> IDBRequest::transaction() const
+{
+    return nullptr;
+}
+
+const String& IDBRequest::readyState() const
+{
+    static WTF::NeverDestroyed<String> readyState;
+    return readyState;
+}
+
+EventTargetInterface IDBRequest::eventTargetInterface() const
+{
+    return IDBRequestEventTargetInterfaceType;
+}
+
+const char* IDBRequest::activeDOMObjectName() const
+{
+    return "IDBRequest";
+}
+
+bool IDBRequest::canSuspendForPageCache() const
+{
+    return false;
+}
+    
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)

Copied: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h (from rev 189878, trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h) (0 => 189879)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h	2015-09-16 20:45:01 UTC (rev 189879)
@@ -0,0 +1,69 @@
+/*
+ * 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 IDBRequestImpl_h
+#define IDBRequestImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBOpenDBRequest.h"
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+namespace IDBClient {
+
+class IDBRequest : public WebCore::IDBOpenDBRequest, public RefCounted<IDBRequest> {
+public:
+    virtual PassRefPtr<IDBAny> result(ExceptionCode&) const override;
+    virtual unsigned short errorCode(ExceptionCode&) const override;
+    virtual PassRefPtr<DOMError> error(ExceptionCode&) const override;
+    virtual PassRefPtr<IDBAny> source() const override;
+    virtual PassRefPtr<IDBTransaction> transaction() const override;
+    virtual const String& readyState() const override;
+
+    // EventTarget
+    virtual EventTargetInterface eventTargetInterface() const override;
+    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
+
+    using RefCounted<IDBRequest>::ref;
+    using RefCounted<IDBRequest>::deref;
+
+protected:
+    IDBRequest(ScriptExecutionContext*);
+
+    // ActiveDOMObject.
+    virtual const char* activeDOMObjectName() const override final;
+    virtual bool canSuspendForPageCache() const override final;
+    
+    // EventTarget.
+    virtual void refEventTarget() override final { RefCounted<IDBRequest>::ref(); }
+    virtual void derefEventTarget() override final { RefCounted<IDBRequest>::deref(); }
+};
+
+} // namespace IDBClient
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBRequestImpl_h

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (189878 => 189879)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-09-16 20:45:01 UTC (rev 189879)
@@ -1908,6 +1908,12 @@
 		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 */; };
+		5103105A1BA8DB56003329C0 /* IDBOpenDBRequestImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510310561BA8DB30003329C0 /* IDBOpenDBRequestImpl.cpp */; };
+		5103105B1BA8DB56003329C0 /* IDBOpenDBRequestImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 510310571BA8DB30003329C0 /* IDBOpenDBRequestImpl.h */; };
+		5103105C1BA8DB56003329C0 /* IDBRequestImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510310581BA8DB30003329C0 /* IDBRequestImpl.cpp */; };
+		5103105D1BA8DB56003329C0 /* IDBRequestImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 510310591BA8DB30003329C0 /* IDBRequestImpl.h */; };
+		510310601BA8E0E3003329C0 /* IDBDatabaseIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 5103105F1BA8E090003329C0 /* IDBDatabaseIdentifier.h */; };
+		510310611BA8E10D003329C0 /* IDBDatabaseIdentifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5103105E1BA8E090003329C0 /* IDBDatabaseIdentifier.cpp */; };
 		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 */; };
@@ -9189,6 +9195,12 @@
 		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>"; };
+		510310561BA8DB30003329C0 /* IDBOpenDBRequestImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBOpenDBRequestImpl.cpp; sourceTree = "<group>"; };
+		510310571BA8DB30003329C0 /* IDBOpenDBRequestImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBOpenDBRequestImpl.h; sourceTree = "<group>"; };
+		510310581BA8DB30003329C0 /* IDBRequestImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBRequestImpl.cpp; sourceTree = "<group>"; };
+		510310591BA8DB30003329C0 /* IDBRequestImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBRequestImpl.h; sourceTree = "<group>"; };
+		5103105E1BA8E090003329C0 /* IDBDatabaseIdentifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseIdentifier.cpp; sourceTree = "<group>"; };
+		5103105F1BA8E090003329C0 /* IDBDatabaseIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseIdentifier.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>"; };
@@ -16535,6 +16547,10 @@
 		510310421BA8C64C003329C0 /* client */ = {
 			isa = PBXGroup;
 			children = (
+				510310561BA8DB30003329C0 /* IDBOpenDBRequestImpl.cpp */,
+				510310571BA8DB30003329C0 /* IDBOpenDBRequestImpl.h */,
+				510310581BA8DB30003329C0 /* IDBRequestImpl.cpp */,
+				510310591BA8DB30003329C0 /* IDBRequestImpl.h */,
 				5103104A1BA8C6A6003329C0 /* IDBFactoryImpl.cpp */,
 				5103104B1BA8C6A6003329C0 /* IDBFactoryImpl.h */,
 			);
@@ -18773,6 +18789,8 @@
 				51D71983181106DF0016DC51 /* IDBDatabaseError.h */,
 				51D71984181106DF0016DC51 /* IDBDatabaseException.cpp */,
 				51D71985181106DF0016DC51 /* IDBDatabaseException.h */,
+				5103105E1BA8E090003329C0 /* IDBDatabaseIdentifier.cpp */,
+				5103105F1BA8E090003329C0 /* IDBDatabaseIdentifier.h */,
 				5163117C1851242B00534647 /* IDBDatabaseMetadata.cpp */,
 				51C9611A183D2B8000D2002E /* IDBDatabaseMetadata.h */,
 				51D71986181106DF0016DC51 /* IDBEventDispatcher.cpp */,
@@ -24083,6 +24101,7 @@
 				49E912AD0EFAC906009D0CAF /* AnimationList.h in Headers */,
 				31DCD29D1AB4FBDE0072E817 /* AnimationTrigger.h in Headers */,
 				0F580FAF149800D400FB5BD8 /* AnimationUtilities.h in Headers */,
+				510310601BA8E0E3003329C0 /* IDBDatabaseIdentifier.h in Headers */,
 				93309DD7099E64920056E581 /* AppendNodeCommand.h in Headers */,
 				1A8F6BBD0DB55CDC001DB794 /* ApplicationCache.h in Headers */,
 				1A8F6BBF0DB55CDC001DB794 /* ApplicationCacheGroup.h in Headers */,
@@ -24437,6 +24456,7 @@
 				CD3E252418046BCD00E27F56 /* CSSGridTemplateAreasValue.h in Headers */,
 				FB3056C2169E5DAC0096A232 /* CSSGroupingRule.h in Headers */,
 				BC772B3C0C4EA91E0083285F /* CSSHelper.h in Headers */,
+				5103105D1BA8DB56003329C0 /* IDBRequestImpl.h in Headers */,
 				BC23EE920DAED2BC009FDC91 /* CSSImageGeneratorValue.h in Headers */,
 				9393E600151A99F200066F06 /* CSSImageSetValue.h in Headers */,
 				A80E6CFA0A1989CA007FB8C5 /* CSSImageValue.h in Headers */,
@@ -25701,6 +25721,7 @@
 				C6F420A316B7164E0052A9F2 /* JSMutationCallback.h in Headers */,
 				65DF31FC09D1CC60000BE325 /* JSMutationEvent.h in Headers */,
 				C6F0902D14327D4F00685849 /* JSMutationObserver.h in Headers */,
+				5103105B1BA8DB56003329C0 /* IDBOpenDBRequestImpl.h in Headers */,
 				C6F08FCA1431000D00685849 /* JSMutationRecord.h in Headers */,
 				BCD9C2C10C17B69E005C90A2 /* JSNamedNodeMap.h in Headers */,
 				A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */,
@@ -28768,6 +28789,7 @@
 				E14F1C4414B5DAC600EA9009 /* HTMLFormControlElementWithState.cpp in Sources */,
 				A8DF3FCF097FA0FC0052981B /* HTMLFormControlsCollection.cpp in Sources */,
 				A81369D1097374F600D74463 /* HTMLFormElement.cpp in Sources */,
+				5103105C1BA8DB56003329C0 /* IDBRequestImpl.cpp in Sources */,
 				A871DE230A152AC800B12A68 /* HTMLFrameElement.cpp in Sources */,
 				14FFE31E0AE1963300136BF5 /* HTMLFrameElementBase.cpp in Sources */,
 				93E2425F0B2B509500C732A1 /* HTMLFrameOwnerElement.cpp in Sources */,
@@ -29791,6 +29813,7 @@
 				078E090217D14CEE00420AA1 /* MediaStreamTrack.cpp in Sources */,
 				078E090317D14CEE00420AA1 /* MediaStreamTrackEvent.cpp in Sources */,
 				07FFDE68181AED420072D409 /* MediaStreamTrackPrivate.cpp in Sources */,
+				510310611BA8E10D003329C0 /* IDBDatabaseIdentifier.cpp in Sources */,
 				076306D217E1478D005A7C4E /* MediaStreamTrackSourcesRequest.cpp in Sources */,
 				CD641EBF1819B36000EE4C41 /* MediaTimeAVFoundation.cpp in Sources */,
 				CD60C0C6193E87C7003C656B /* MediaTimeQTKit.mm in Sources */,
@@ -30829,6 +30852,7 @@
 				498391580F1E776900C23782 /* WebKitCSSMatrix.cpp in Sources */,
 				8AA61CFF144D595B00F37350 /* WebKitCSSRegionRule.cpp in Sources */,
 				BC9ADD800CC4092200098C4C /* WebKitCSSTransformValue.cpp in Sources */,
+				5103105A1BA8DB56003329C0 /* IDBOpenDBRequestImpl.cpp in Sources */,
 				3FFFF9A8159D9A550020BBD5 /* WebKitCSSViewportRule.cpp in Sources */,
 				1A1414B513A0F0500019996C /* WebKitFontFamilyNames.cpp in Sources */,
 				D7613A501474F13F00DB8606 /* WebKitNamedFlow.cpp in Sources */,

Modified: trunk/Source/WebCore/platform/Logging.h (189878 => 189879)


--- trunk/Source/WebCore/platform/Logging.h	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/Source/WebCore/platform/Logging.h	2015-09-16 20:45:01 UTC (rev 189879)
@@ -52,6 +52,7 @@
     M(Gamepad) \
     M(History) \
     M(IconDatabase) \
+    M(IndexedDB) \
     M(Layout) \
     M(Loading) \
     M(Media) \

Modified: trunk/Source/WebKit/mac/ChangeLog (189878 => 189879)


--- trunk/Source/WebKit/mac/ChangeLog	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-09-16 20:45:01 UTC (rev 189879)
@@ -1,3 +1,13 @@
+2015-09-16  Brady Eidson  <beid...@apple.com>
+
+        Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
+        https://bugs.webkit.org/show_bug.cgi?id=149229
+
+        Reviewed by Alex Christensen.
+
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]): Enable IDB in WK1.
+
 2015-09-15  Ryosuke Niwa  <rn...@webkit.org>
 
         Add ShadowRoot interface and Element.prototype.attachShadow

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (189878 => 189879)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2015-09-16 19:55:15 UTC (rev 189878)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2015-09-16 20:45:01 UTC (rev 189879)
@@ -2441,6 +2441,10 @@
     RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled([preferences gamepadsEnabled]);
 #endif
 
+#if ENABLE(INDEXED_DATABASE)
+    RuntimeEnabledFeatures::sharedFeatures().setWebkitIndexedDBEnabled(true);
+#endif
+
     NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
     if (timeout > 0)
         settings.setIncrementalRenderingSuppressionTimeoutInSeconds(timeout);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to