Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Sep 2015 20:45:01 +0000 (20:45 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Sep 2015 20:45:01 +0000 (20:45 +0000)
commit85ac5e3cea6e8905206013a6e5ceae92b83679df
treeb3a0fcb99ec8dbb6f9158d27c00bc9500eb77de7
parent409cf1ca43dc2b71db42fa15eb9461dd2b3a6c22
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/wk2/TestExpectations
LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/deletedatabase-request-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/deletedatabase-request.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp [new file with mode: 0644]
Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h [new file with mode: 0644]
Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp
Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h
Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp [new file with mode: 0644]
Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h [new file with mode: 0644]
Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp [new file with mode: 0644]
Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/Logging.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm