IDB: storage/indexeddb/mozilla/cursors.html fails
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 00:00:30 +0000 (00:00 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 00:00:30 +0000 (00:00 +0000)
commit80fb98d98bc1be1ebc657ce42264e48152f6eef7
tree760e4387d6ae22994dcd0b962502ef93ac12c7d7
parentff35db1f0dc1e7f584ef50a571afad9ea61ea9ab
IDB: storage/indexeddb/mozilla/cursors.html fails
<rdar://problem/16017998> and https://bugs.webkit.org/show_bug.cgi?id=128423

Reviewed by Dan Bernstein.

Source/WebCore:

Tested by storage/indexeddb/mozilla/cursors.html (And probably others)

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::OpenCursorOperation::perform): Distinguish between an error while opening the cursor
  and opening a cursor that points to no records.

Source/WebKit2:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::internalAdvanceOnce): Store the primary key for object store cursors.
(WebKit::SQLiteIDBCursor::iterate): We’re not supposed to check for equality to the target key.
  Depending on the direction of the cursor we should check for the next highest or next lowest key.

LayoutTests:

* platform/mac-wk2/TestExpectations: Unskip storage/indexeddb/mozilla/cursors.html.

Revert the change to storage/indexeddb/mozilla/clear.html as it is now clear how a
null cursor might be returned from openCursor:
* storage/indexeddb/mozilla/clear-expected.txt:
* storage/indexeddb/mozilla/resources/clear.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/storage/indexeddb/mozilla/clear-expected.txt
LayoutTests/storage/indexeddb/mozilla/resources/clear.js
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp