Diff
Modified: trunk/LayoutTests/ChangeLog (207844 => 207845)
--- trunk/LayoutTests/ChangeLog 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/LayoutTests/ChangeLog 2016-10-25 21:42:57 UTC (rev 207845)
@@ -1,3 +1,14 @@
+2016-10-25 Brady Eidson <[email protected]>
+
+ IndexedDB 2.0: Support IDBObjectStore openKeyCursor.
+ <rdar://problem/28806930> and https://bugs.webkit.org/show_bug.cgi?id=163954
+
+ Reviewed by Andy Estes.
+
+ * storage/indexeddb/modern/cursor-1-expected.txt:
+ * storage/indexeddb/modern/cursor-1-private-expected.txt:
+ * storage/indexeddb/modern/resources/cursor-1.js:
+
2016-10-25 Michael Catanzaro <[email protected]>
Unreviewed GTK test gardening
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207844 => 207845)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-10-25 21:42:57 UTC (rev 207845)
@@ -1,5 +1,14 @@
2016-10-25 Brady Eidson <[email protected]>
+ IndexedDB 2.0: Support IDBObjectStore openKeyCursor.
+ <rdar://problem/28806930> and https://bugs.webkit.org/show_bug.cgi?id=163954
+
+ Reviewed by Andy Estes.
+
+ * web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor-expected.txt:
+
+2016-10-25 Brady Eidson <[email protected]>
+
IndexedDB 2.0: Support new IDBTransaction interfaces.
<rdar://problem/28806928> and https://bugs.webkit.org/show_bug.cgi?id=163927
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor-expected.txt (207844 => 207845)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor-expected.txt 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor-expected.txt 2016-10-25 21:42:57 UTC (rev 207845)
@@ -1,7 +1,7 @@
-FAIL IDBObjectStore.openKeyCursor() - forward iteration store.openKeyCursor is not a function. (In 'store.openKeyCursor()', 'store.openKeyCursor' is undefined)
-FAIL IDBObjectStore.openKeyCursor() - reverse iteration store.openKeyCursor is not a function. (In 'store.openKeyCursor(null, "prev")', 'store.openKeyCursor' is undefined)
-FAIL IDBObjectStore.openKeyCursor() - forward iteration with range store.openKeyCursor is not a function. (In 'store.openKeyCursor(IDBKeyRange.bound(4, 6))', 'store.openKeyCursor' is undefined)
-FAIL IDBObjectStore.openKeyCursor() - reverse iteration with range store.openKeyCursor is not a function. (In 'store.openKeyCursor(IDBKeyRange.bound(4, 6), "prev")', 'store.openKeyCursor' is undefined)
-FAIL IDBObjectStore.openKeyCursor() - invalid inputs assert_throws: openKeyCursor should throw on invalid number key function "function () { store.openKeyCursor(NaN); }" threw object "TypeError: store.openKeyCursor is not a function. (In 'st..." that is not a DOMException DataError: property "code" is equal to undefined, expected 0
+PASS IDBObjectStore.openKeyCursor() - forward iteration
+PASS IDBObjectStore.openKeyCursor() - reverse iteration
+PASS IDBObjectStore.openKeyCursor() - forward iteration with range
+PASS IDBObjectStore.openKeyCursor() - reverse iteration with range
+PASS IDBObjectStore.openKeyCursor() - invalid inputs
Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-1-expected.txt (207844 => 207845)
--- trunk/LayoutTests/storage/indexeddb/modern/cursor-1-expected.txt 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-1-expected.txt 2016-10-25 21:42:57 UTC (rev 207845)
@@ -15,6 +15,12 @@
Cursor key is: 0
Cursor primary key is: 0
Success opening cursor
+Cursor is: [object IDBCursor]
+Cursor direction is: next
+Cursor source is: [object IDBObjectStore] (TestObjectStore)
+Cursor key is: 0
+Cursor primary key is: 0
+Success opening cursor
Cursor is: [object IDBCursorWithValue]
Cursor direction is: next
Cursor source is: [object IDBIndex] (TestIndex1)
@@ -33,6 +39,12 @@
Cursor key is: 0
Cursor primary key is: 0
Success opening cursor
+Cursor is: [object IDBCursor]
+Cursor direction is: nextunique
+Cursor source is: [object IDBObjectStore] (TestObjectStore)
+Cursor key is: 0
+Cursor primary key is: 0
+Success opening cursor
Cursor is: [object IDBCursorWithValue]
Cursor direction is: nextunique
Cursor source is: [object IDBIndex] (TestIndex1)
@@ -51,6 +63,12 @@
Cursor key is: foo
Cursor primary key is: foo
Success opening cursor
+Cursor is: [object IDBCursor]
+Cursor direction is: prev
+Cursor source is: [object IDBObjectStore] (TestObjectStore)
+Cursor key is: foo
+Cursor primary key is: foo
+Success opening cursor
Cursor is: [object IDBCursorWithValue]
Cursor direction is: prev
Cursor source is: [object IDBIndex] (TestIndex1)
@@ -69,6 +87,12 @@
Cursor key is: foo
Cursor primary key is: foo
Success opening cursor
+Cursor is: [object IDBCursor]
+Cursor direction is: prevunique
+Cursor source is: [object IDBObjectStore] (TestObjectStore)
+Cursor key is: foo
+Cursor primary key is: foo
+Success opening cursor
Cursor is: [object IDBCursorWithValue]
Cursor direction is: prevunique
Cursor source is: [object IDBIndex] (TestIndex1)
Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-1-private-expected.txt (207844 => 207845)
--- trunk/LayoutTests/storage/indexeddb/modern/cursor-1-private-expected.txt 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-1-private-expected.txt 2016-10-25 21:42:57 UTC (rev 207845)
@@ -15,6 +15,12 @@
Cursor key is: 0
Cursor primary key is: 0
Success opening cursor
+Cursor is: [object IDBCursor]
+Cursor direction is: next
+Cursor source is: [object IDBObjectStore] (TestObjectStore)
+Cursor key is: 0
+Cursor primary key is: 0
+Success opening cursor
Cursor is: [object IDBCursorWithValue]
Cursor direction is: next
Cursor source is: [object IDBIndex] (TestIndex1)
@@ -33,6 +39,12 @@
Cursor key is: 0
Cursor primary key is: 0
Success opening cursor
+Cursor is: [object IDBCursor]
+Cursor direction is: nextunique
+Cursor source is: [object IDBObjectStore] (TestObjectStore)
+Cursor key is: 0
+Cursor primary key is: 0
+Success opening cursor
Cursor is: [object IDBCursorWithValue]
Cursor direction is: nextunique
Cursor source is: [object IDBIndex] (TestIndex1)
@@ -51,6 +63,12 @@
Cursor key is: foo
Cursor primary key is: foo
Success opening cursor
+Cursor is: [object IDBCursor]
+Cursor direction is: prev
+Cursor source is: [object IDBObjectStore] (TestObjectStore)
+Cursor key is: foo
+Cursor primary key is: foo
+Success opening cursor
Cursor is: [object IDBCursorWithValue]
Cursor direction is: prev
Cursor source is: [object IDBIndex] (TestIndex1)
@@ -69,6 +87,12 @@
Cursor key is: foo
Cursor primary key is: foo
Success opening cursor
+Cursor is: [object IDBCursor]
+Cursor direction is: prevunique
+Cursor source is: [object IDBObjectStore] (TestObjectStore)
+Cursor key is: foo
+Cursor primary key is: foo
+Success opening cursor
Cursor is: [object IDBCursorWithValue]
Cursor direction is: prevunique
Cursor source is: [object IDBIndex] (TestIndex1)
Modified: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-1.js (207844 => 207845)
--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-1.js 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-1.js 2016-10-25 21:42:57 UTC (rev 207845)
@@ -44,6 +44,8 @@
var range = IDBKeyRange.lowerBound(-Infinity);
var request = objectStore.openCursor(range, direction);
setupRequest(request);
+ request = objectStore.openKeyCursor(range, direction);
+ setupRequest(request);
request = index.openCursor(range, direction);
setupRequest(request);
request = index.openKeyCursor(range, direction);
Modified: trunk/Source/WebCore/ChangeLog (207844 => 207845)
--- trunk/Source/WebCore/ChangeLog 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/ChangeLog 2016-10-25 21:42:57 UTC (rev 207845)
@@ -1,3 +1,39 @@
+2016-10-25 Brady Eidson <[email protected]>
+
+ IndexedDB 2.0: Support IDBObjectStore openKeyCursor.
+ <rdar://problem/28806930> and https://bugs.webkit.org/show_bug.cgi?id=163954
+
+ Reviewed by Andy Estes.
+
+ No new tests (Covered by changes to existing tests)
+
+ * Modules/indexeddb/IDBCursor.cpp:
+ (WebCore::IDBCursor::create):
+ * Modules/indexeddb/IDBCursor.h:
+
+ * Modules/indexeddb/IDBObjectStore.cpp:
+ (WebCore::IDBObjectStore::openCursor):
+ (WebCore::IDBObjectStore::openKeyCursor):
+ * Modules/indexeddb/IDBObjectStore.h:
+ * Modules/indexeddb/IDBObjectStore.idl:
+
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::requestOpenCursor):
+
+ * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
+ (WebCore::IDBServer::MemoryObjectStoreCursor::currentData): Only grab the current value
+ if the cursor is KeyAndValue.
+
+ * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
+ (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
+ (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce): Only save off the data for an
+ object store cursor if it's both KeyAndValue.
+ * Modules/indexeddb/server/SQLiteIDBCursor.h:
+
+ * Modules/indexeddb/shared/IDBCursorInfo.cpp:
+ (WebCore::IDBCursorInfo::objectStoreCursor): Allow for a KeyOnly ObjectStoreCursor.
+ * Modules/indexeddb/shared/IDBCursorInfo.h:
+
2016-10-25 Wenson Hsieh <[email protected]>
Support InputEvent.dataTransfer for the InputEvent spec
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp 2016-10-25 21:42:57 UTC (rev 207845)
@@ -106,6 +106,11 @@
}
}
+Ref<IDBCursor> IDBCursor::create(IDBTransaction& transaction, IDBObjectStore& objectStore, const IDBCursorInfo& info)
+{
+ return adoptRef(*new IDBCursor(transaction, objectStore, info));
+}
+
Ref<IDBCursor> IDBCursor::create(IDBTransaction& transaction, IDBIndex& index, const IDBCursorInfo& info)
{
return adoptRef(*new IDBCursor(transaction, index, info));
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h 2016-10-25 21:42:57 UTC (rev 207845)
@@ -42,6 +42,7 @@
class IDBCursor : public ScriptWrappable, public RefCounted<IDBCursor>, public ActiveDOMObject {
public:
+ static Ref<IDBCursor> create(IDBTransaction&, IDBObjectStore&, const IDBCursorInfo&);
static Ref<IDBCursor> create(IDBTransaction&, IDBIndex&, const IDBCursorInfo&);
static const AtomicString& directionNext();
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp 2016-10-25 21:42:57 UTC (rev 207845)
@@ -150,7 +150,7 @@
return m_info.autoIncrement();
}
-ExceptionOr<Ref<IDBRequest>> IDBObjectStore::openCursor(ExecState& execState, IDBKeyRange* range, const String& directionString)
+ExceptionOr<Ref<IDBRequest>> IDBObjectStore::openCursor(ExecState& execState, RefPtr<IDBKeyRange> range, const String& directionString)
{
LOG(IndexedDB, "IDBObjectStore::openCursor");
ASSERT(currentThread() == m_transaction->database().originThreadID());
@@ -165,7 +165,7 @@
if (!direction)
return Exception { TypeError };
- auto info = IDBCursorInfo::objectStoreCursor(m_transaction.get(), m_info.identifier(), range, direction.value());
+ auto info = IDBCursorInfo::objectStoreCursor(m_transaction.get(), m_info.identifier(), range.get(), direction.value(), IndexedDB::CursorType::KeyAndValue);
return m_transaction->requestOpenCursor(execState, *this, info);
}
@@ -175,9 +175,37 @@
if (onlyResult.hasException())
return Exception { IDBDatabaseException::DataError, ASCIILiteral("Failed to execute 'openCursor' on 'IDBObjectStore': The parameter is not a valid key.") };
- return openCursor(execState, onlyResult.releaseReturnValue().ptr(), direction);
+ return openCursor(execState, onlyResult.releaseReturnValue(), direction);
}
+ExceptionOr<Ref<IDBRequest>> IDBObjectStore::openKeyCursor(ExecState& execState, RefPtr<IDBKeyRange> range, const String& directionString)
+{
+ LOG(IndexedDB, "IDBObjectStore::openCursor");
+ ASSERT(currentThread() == m_transaction->database().originThreadID());
+
+ if (m_deleted)
+ return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBObjectStore': The object store has been deleted.") };
+
+ if (!m_transaction->isActive())
+ return Exception { IDBDatabaseException::TransactionInactiveError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBObjectStore': The transaction is inactive or finished.") };
+
+ auto direction = IDBCursor::stringToDirection(directionString);
+ if (!direction)
+ return Exception { TypeError };
+
+ auto info = IDBCursorInfo::objectStoreCursor(m_transaction.get(), m_info.identifier(), range.get(), direction.value(), IndexedDB::CursorType::KeyOnly);
+ return m_transaction->requestOpenCursor(execState, *this, info);
+}
+
+ExceptionOr<Ref<IDBRequest>> IDBObjectStore::openKeyCursor(ExecState& execState, JSValue key, const String& direction)
+{
+ auto _onlyResult_ = IDBKeyRange::only(execState, key);
+ if (onlyResult.hasException())
+ return Exception { IDBDatabaseException::DataError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBObjectStore': The parameter is not a valid key or key range.") };
+
+ return openKeyCursor(execState, onlyResult.releaseReturnValue(), direction);
+}
+
ExceptionOr<Ref<IDBRequest>> IDBObjectStore::get(ExecState& execState, JSValue key)
{
LOG(IndexedDB, "IDBObjectStore::get");
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h 2016-10-25 21:42:57 UTC (rev 207845)
@@ -72,8 +72,10 @@
bool multiEntry;
};
- ExceptionOr<Ref<IDBRequest>> openCursor(JSC::ExecState&, IDBKeyRange*, const String& direction);
+ ExceptionOr<Ref<IDBRequest>> openCursor(JSC::ExecState&, RefPtr<IDBKeyRange>, const String& direction);
ExceptionOr<Ref<IDBRequest>> openCursor(JSC::ExecState&, JSC::JSValue key, const String& direction);
+ ExceptionOr<Ref<IDBRequest>> openKeyCursor(JSC::ExecState&, RefPtr<IDBKeyRange>, const String& direction);
+ ExceptionOr<Ref<IDBRequest>> openKeyCursor(JSC::ExecState&, JSC::JSValue key, const String& direction);
ExceptionOr<Ref<IDBRequest>> get(JSC::ExecState&, JSC::JSValue key);
ExceptionOr<Ref<IDBRequest>> get(JSC::ExecState&, IDBKeyRange*);
ExceptionOr<Ref<IDBRequest>> add(JSC::ExecState&, JSC::JSValue, JSC::JSValue key);
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl 2016-10-25 21:42:57 UTC (rev 207845)
@@ -45,6 +45,8 @@
[CallWith=ScriptState, MayThrowException] IDBRequest clear();
[CallWith=ScriptState, MayThrowException] IDBRequest openCursor(optional IDBKeyRange? range = null, optional DOMString direction = "next");
[CallWith=ScriptState, MayThrowException] IDBRequest openCursor(any key, optional DOMString direction = "next");
+ [CallWith=ScriptState, MayThrowException] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional DOMString direction = "next");
+ [CallWith=ScriptState, MayThrowException] IDBRequest openKeyCursor(any key, optional DOMString direction = "next");
[CallWith=ScriptState, MayThrowException] IDBIndex createIndex(DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters options);
[MayThrowException] IDBIndex index(DOMString name);
[MayThrowException] void deleteIndex(DOMString name);
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2016-10-25 21:42:57 UTC (rev 207845)
@@ -731,6 +731,9 @@
LOG(IndexedDB, "IDBTransaction::requestOpenCursor");
ASSERT(currentThread() == m_database->originThreadID());
+ if (info.cursorType() == IndexedDB::CursorType::KeyOnly)
+ return doRequestOpenCursor(execState, IDBCursor::create(*this, objectStore, info));
+
return doRequestOpenCursor(execState, IDBCursorWithValue::create(*this, objectStore, info));
}
Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp 2016-10-25 21:42:57 UTC (rev 207845)
@@ -190,8 +190,12 @@
}
m_currentPositionKey = **m_iterator;
- IDBValue value = { m_objectStore.valueForKeyRange(m_currentPositionKey), { }, { } };
- data = { m_currentPositionKey, m_currentPositionKey, WTFMove(value) };
+ if (m_info.cursorType() == IndexedDB::CursorType::KeyOnly)
+ data = { m_currentPositionKey, m_currentPositionKey };
+ else {
+ IDBValue value = { m_objectStore.valueForKeyRange(m_currentPositionKey), { }, { } };
+ data = { m_currentPositionKey, m_currentPositionKey, WTFMove(value) };
+ }
}
void MemoryObjectStoreCursor::incrementForwardIterator(std::set<IDBKeyData>& set, const IDBKeyData& key, uint32_t count)
Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp 2016-10-25 21:42:57 UTC (rev 207845)
@@ -74,6 +74,7 @@
, m_objectStoreID(info.objectStoreIdentifier())
, m_indexID(info.cursorSource() == IndexedDB::CursorSource::Index ? info.sourceIdentifier() : IDBIndexInfo::InvalidId)
, m_cursorDirection(info.cursorDirection())
+ , m_cursorType(info.cursorType())
, m_keyRange(info.range())
{
ASSERT(m_objectStoreID);
@@ -85,6 +86,7 @@
, m_objectStoreID(objectStoreID)
, m_indexID(indexID ? indexID : IDBIndexInfo::InvalidId)
, m_cursorDirection(IndexedDB::CursorDirection::Next)
+ , m_cursorType(IndexedDB::CursorType::KeyAndValue)
, m_keyRange(range)
, m_backingStoreCursor(true)
{
@@ -396,7 +398,8 @@
return AdvanceResult::Failure;
}
- m_currentValue = std::make_unique<IDBValue>(ThreadSafeDataBuffer::adoptVector(keyData), blobURLs, blobFilePaths);
+ if (m_cursorType == IndexedDB::CursorType::KeyAndValue)
+ m_currentValue = std::make_unique<IDBValue>(ThreadSafeDataBuffer::adoptVector(keyData), blobURLs, blobFilePaths);
} else {
if (!deserializeIDBKeyData(keyData.data(), keyData.size(), m_currentPrimaryKey)) {
LOG_ERROR("Unable to deserialize value data from database while advancing index cursor");
Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h 2016-10-25 21:42:57 UTC (rev 207845)
@@ -96,6 +96,7 @@
int64_t m_objectStoreID;
int64_t m_indexID { IDBIndexInfo::InvalidId };
IndexedDB::CursorDirection m_cursorDirection { IndexedDB::CursorDirection::Next };
+ IndexedDB::CursorType m_cursorType;
IDBKeyRangeData m_keyRange;
IDBKeyData m_currentLowerKey;
Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp 2016-10-25 21:42:57 UTC (rev 207845)
@@ -34,9 +34,9 @@
namespace WebCore {
-IDBCursorInfo IDBCursorInfo::objectStoreCursor(IDBTransaction& transaction, uint64_t objectStoreIdentifier, const IDBKeyRangeData& range, IndexedDB::CursorDirection direction)
+IDBCursorInfo IDBCursorInfo::objectStoreCursor(IDBTransaction& transaction, uint64_t objectStoreIdentifier, const IDBKeyRangeData& range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
{
- return { transaction, objectStoreIdentifier, range, direction, IndexedDB::CursorType::KeyAndValue };
+ return { transaction, objectStoreIdentifier, range, direction, type };
}
IDBCursorInfo IDBCursorInfo::indexCursor(IDBTransaction& transaction, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData& range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h (207844 => 207845)
--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h 2016-10-25 21:31:14 UTC (rev 207844)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h 2016-10-25 21:42:57 UTC (rev 207845)
@@ -50,7 +50,7 @@
class IDBCursorInfo {
public:
- static IDBCursorInfo objectStoreCursor(IDBTransaction&, uint64_t objectStoreIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection);
+ static IDBCursorInfo objectStoreCursor(IDBTransaction&, uint64_t objectStoreIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection, IndexedDB::CursorType);
static IDBCursorInfo indexCursor(IDBTransaction&, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection, IndexedDB::CursorType);
IDBResourceIdentifier identifier() const { return m_cursorIdentifier; }