IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 23:58:48 +0000 (23:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 23:58:48 +0000 (23:58 +0000)
commit83e13f335222dc42c3bdb32769c17ba9ebc3cc03
treed07d702536174fbc3dbfe04fcd70cc72f7668d75
parent1b4973f062058a7fa1d25888f800c7f13f4394f6
IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer
https://bugs.webkit.org/show_bug.cgi?id=90923

Patch by Alec Flett <alecflett@chromium.org> on 2012-07-16
Reviewed by Darin Fisher.

Source/WebCore:

Refactor IndexWriter to depend only on IDBIndexMetadata and on
(databaseId, objectStoreId, indexId) so that it can talk directly
to the backing store, and also eventually be moved into the renderer.

This also introduces IDBObjectStoreBackendInterface::putWithIndexKeys
as a replacement for IDBObjectStoreBackendInterface::put, already
stubbed out in the chromium port. It will fully replace put()
after both chromium and webkit sides have reached alignment.

No new tests as this is just a refactor and existing tests cover
correctness.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::setValueReady):
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
* Modules/indexeddb/IDBIndexBackendImpl.h:
* Modules/indexeddb/IDBObjectStore.h:
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::populateIndex):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(IDBObjectStoreBackendImpl):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess):

Source/WebKit/chromium:

Stub out implementations of putWithIndexKeys(), already implemented
on the chromium side.

* public/WebIDBObjectStore.h:
(WebKit::WebIDBObjectStore::putWithIndexKeys):
* src/IDBObjectStoreBackendProxy.cpp:
(WebKit::IDBObjectStoreBackendProxy::putWithIndexKeys):
(WebKit):
* src/IDBObjectStoreBackendProxy.h:
(IDBObjectStoreBackendProxy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBCursor.cpp
Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBObjectStore.h
Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendInterface.h
Source/WebCore/Modules/indexeddb/IDBRequest.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebIDBObjectStore.h
Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h