Modern IDB: Pipe through cursor functions from client to server.
[WebKit-https.git] / Source / WebCore / ChangeLog
index 78da40c..d5e93a7 100644 (file)
@@ -1,3 +1,192 @@
+2015-11-12  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: Pipe through cursor functions from client to server.
+        https://bugs.webkit.org/show_bug.cgi?id=151197
+
+        Reviewed by Alex Christensen.
+
+        Tests: storage/indexeddb/modern/cursor-1.html
+               storage/indexeddb/modern/opencursor-failures.html
+
+        This patch implements most IDBCursor considerations at the IDL level, as well as pipes the
+        appropriate messages through from client to server.
+        
+        All operations currently end in errors. Bug 151196 will fix that by making cursors functional.
+        
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * Modules/indexeddb/IDBCursor.h:
+        (WebCore::IDBCursor::isKeyCursor): Deleted.
+        * Modules/indexeddb/IDBCursorWithValue.h:
+
+        * Modules/indexeddb/IDBGetResult.h:
+
+        * Modules/indexeddb/IDBKeyData.h:
+        (WebCore::IDBKeyData::string):
+        (WebCore::IDBKeyData::date):
+        (WebCore::IDBKeyData::number):
+        (WebCore::IDBKeyData::array):
+
+        * Modules/indexeddb/IndexedDB.h:
+
+        * Modules/indexeddb/client/IDBAnyImpl.cpp:
+        (WebCore::IDBClient::IDBAny::IDBAny):
+        (WebCore::IDBClient::IDBAny::idbCursor):
+        (WebCore::IDBClient::IDBAny::idbCursorWithValue):
+        (WebCore::IDBClient::IDBAny::idbIndex):
+        (WebCore::IDBClient::IDBAny::idbObjectStore):
+        (WebCore::IDBClient::IDBAny::modernIDBCursor):
+        * Modules/indexeddb/client/IDBAnyImpl.h:
+        (WebCore::IDBClient::IDBAny::create):
+
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        (WebCore::IDBClient::IDBConnectionToServer::openCursor):
+        (WebCore::IDBClient::IDBConnectionToServer::didOpenCursor):
+        (WebCore::IDBClient::IDBConnectionToServer::iterateCursor):
+        (WebCore::IDBClient::IDBConnectionToServer::didIterateCursor):
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
+
+        * Modules/indexeddb/client/IDBCursorImpl.cpp:
+        (WebCore::IDBClient::IDBCursor::create):
+        (WebCore::IDBClient::IDBCursor::IDBCursor):
+        (WebCore::IDBClient::IDBCursor::sourcesDeleted):
+        (WebCore::IDBClient::IDBCursor::effectiveObjectStore):
+        (WebCore::IDBClient::IDBCursor::transaction):
+        (WebCore::IDBClient::IDBCursor::direction):
+        (WebCore::IDBClient::IDBCursor::key):
+        (WebCore::IDBClient::IDBCursor::primaryKey):
+        (WebCore::IDBClient::IDBCursor::value):
+        (WebCore::IDBClient::IDBCursor::source):
+        (WebCore::IDBClient::IDBCursor::update):
+        (WebCore::IDBClient::IDBCursor::advance):
+        (WebCore::IDBClient::IDBCursor::continueFunction):
+        (WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor):
+        (WebCore::IDBClient::IDBCursor::deleteFunction):
+        (WebCore::IDBClient::IDBCursor::setGetResult):
+        * Modules/indexeddb/client/IDBCursorImpl.h:
+        (WebCore::IDBClient::IDBCursor::info):
+        (WebCore::IDBClient::IDBCursor::setRequest):
+        (WebCore::IDBClient::IDBCursor::clearRequest):
+        (WebCore::IDBClient::IDBCursor::request):
+
+        * Modules/indexeddb/client/IDBCursorWithValueImpl.cpp:
+        (WebCore::IDBClient::IDBCursorWithValue::create):
+        (WebCore::IDBClient::IDBCursorWithValue::IDBCursorWithValue):
+        (WebCore::IDBClient::IDBCursorWithValue::~IDBCursorWithValue):
+        * Modules/indexeddb/client/IDBCursorWithValueImpl.h:
+
+        * Modules/indexeddb/client/IDBIndexImpl.cpp:
+        (WebCore::IDBClient::IDBIndex::openCursor):
+        (WebCore::IDBClient::IDBIndex::openKeyCursor):
+        * Modules/indexeddb/client/IDBIndexImpl.h:
+        (WebCore::IDBClient::IDBIndex::modernObjectStore):
+        (WebCore::IDBClient::IDBIndex::isDeleted):
+
+        * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
+        (WebCore::IDBClient::IDBObjectStore::openCursor):
+        (WebCore::IDBClient::IDBObjectStore::deleteFunction):
+        * Modules/indexeddb/client/IDBObjectStoreImpl.h:
+
+        * Modules/indexeddb/client/IDBRequestImpl.cpp:
+        (WebCore::IDBClient::IDBRequest::create):
+        (WebCore::IDBClient::IDBRequest::IDBRequest):
+        (WebCore::IDBClient::IDBRequest::~IDBRequest):
+        (WebCore::IDBClient::IDBRequest::source):
+        (WebCore::IDBClient::IDBRequest::resultCursor):
+        (WebCore::IDBClient::IDBRequest::willIterateCursor):
+        (WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor):
+        (WebCore::IDBClient::IDBRequest::requestCompleted):
+        * Modules/indexeddb/client/IDBRequestImpl.h:
+        (WebCore::IDBClient::IDBRequest::modernResult):
+
+        * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+        (WebCore::IDBClient::IDBTransaction::requestOpenCursor):
+        (WebCore::IDBClient::IDBTransaction::doRequestOpenCursor):
+        (WebCore::IDBClient::IDBTransaction::openCursorOnServer):
+        (WebCore::IDBClient::IDBTransaction::didOpenCursorOnServer):
+        (WebCore::IDBClient::IDBTransaction::iterateCursor):
+        (WebCore::IDBClient::IDBTransaction::iterateCursorOnServer):
+        (WebCore::IDBClient::IDBTransaction::didIterateCursorOnServer):
+        * Modules/indexeddb/client/IDBTransactionImpl.h:
+
+        * Modules/indexeddb/client/TransactionOperation.h:
+        (WebCore::IDBClient::createTransactionOperation):
+
+        * Modules/indexeddb/legacy/LegacyCursor.cpp:
+        (WebCore::LegacyCursor::source):
+        * Modules/indexeddb/legacy/LegacyCursor.h:
+        (WebCore::LegacyCursor::continueFunction): Deleted.
+        (WebCore::LegacyCursor::isKeyCursor): Deleted.
+        * Modules/indexeddb/legacy/LegacyCursorWithValue.h:
+
+        * Modules/indexeddb/server/IDBBackingStore.h:
+
+        * Modules/indexeddb/server/IDBConnectionToClient.cpp:
+        (WebCore::IDBServer::IDBConnectionToClient::didOpenCursor):
+        (WebCore::IDBServer::IDBConnectionToClient::didIterateCursor):
+        * Modules/indexeddb/server/IDBConnectionToClient.h:
+        * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
+
+        * Modules/indexeddb/server/IDBServer.cpp:
+        (WebCore::IDBServer::IDBServer::openCursor):
+        (WebCore::IDBServer::IDBServer::iterateCursor):
+        * Modules/indexeddb/server/IDBServer.h:
+
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
+        (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
+        (WebCore::IDBServer::UniqueIDBDatabase::performOpenCursor):
+        (WebCore::IDBServer::UniqueIDBDatabase::didPerformOpenCursor):
+        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
+        (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
+        (WebCore::IDBServer::UniqueIDBDatabase::didPerformIterateCursor):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
+
+        * Modules/indexeddb/shared/IDBCursorInfo.cpp: Added.
+        (WebCore::IDBCursorInfo::objectStoreCursor):
+        (WebCore::IDBCursorInfo::indexCursor):
+        (WebCore::IDBCursorInfo::IDBCursorInfo):
+        (WebCore::IDBCursorInfo::isDirectionForward):
+        (WebCore::IDBCursorInfo::isolatedCopy):
+        * Modules/indexeddb/shared/IDBCursorInfo.h: Added.
+        (WebCore::IDBCursorInfo::identifier):
+        (WebCore::IDBCursorInfo::sourceIdentifier):
+        (WebCore::IDBCursorInfo::cursorSource):
+        (WebCore::IDBCursorInfo::cursorDirection):
+        (WebCore::IDBCursorInfo::cursorType):
+
+        * Modules/indexeddb/shared/IDBResultData.cpp:
+        (WebCore::IDBResultData::openCursorSuccess):
+        (WebCore::IDBResultData::iterateCursorSuccess):
+        * Modules/indexeddb/shared/IDBResultData.h:
+
+        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+        (WebCore::InProcessIDBServer::didOpenCursor):
+        (WebCore::InProcessIDBServer::didIterateCursor):
+        (WebCore::InProcessIDBServer::openCursor):
+        (WebCore::InProcessIDBServer::iterateCursor):
+        * Modules/indexeddb/shared/InProcessIDBServer.h:
+
+        * bindings/js/IDBBindingUtilities.cpp:
+        (WebCore::idbKeyDataToJSValue):
+        * bindings/js/IDBBindingUtilities.h:
+
+        * platform/CrossThreadCopier.cpp:
+        (WebCore::IDBCursorInfo>::copy):
+        * platform/CrossThreadCopier.h:
+
 2015-11-12  Anders Carlsson  <andersca@apple.com>
 
         Delete PlatformMenuDescription.h