[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

andreip at google.com andreip at google.com
Sun Feb 20 23:44:10 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit f86bef17ec2be24ed83a6b763f9f9c5cfc190306
Author: andreip at google.com <andreip at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 24 19:01:45 2011 +0000

    2011-01-24  Andrei Popescu  <andreip at google.com>
    
            Reviewed by Nate Chapin.
    
            IndexedDatabase methods should not take arguments of type OptionsObject
            https://bugs.webkit.org/show_bug.cgi?id=53012
    
            * storage/indexeddb/create-object-store-options-expected.txt:
            * storage/indexeddb/create-object-store-options.html:
            * storage/indexeddb/cursor-delete-expected.txt:
            * storage/indexeddb/cursor-delete.html:
            * storage/indexeddb/cursor-index-delete-expected.txt:
            * storage/indexeddb/cursor-index-delete.html:
            * storage/indexeddb/data-corruption-expected.txt:
            * storage/indexeddb/data-corruption.html:
            * storage/indexeddb/database-quota-expected.txt:
            * storage/indexeddb/database-quota.html:
            * storage/indexeddb/index-cursor.html:
            * storage/indexeddb/objectstore-basics-expected.txt:
            * storage/indexeddb/objectstore-basics.html:
            * storage/indexeddb/objectstore-cursor.html:
            * storage/indexeddb/open-cursor-expected.txt:
            * storage/indexeddb/open-cursor.html:
            * storage/indexeddb/transaction-and-objectstore-calls-expected.txt:
            * storage/indexeddb/transaction-and-objectstore-calls.html:
            * storage/indexeddb/tutorial.html:
    2011-01-24  Andrei Popescu  <andreip at google.com>
    
            Reviewed by Nate Chapin.
    
            IndexedDatabase methods should not take arguments of type OptionsObject
            https://bugs.webkit.org/show_bug.cgi?id=53012
    
            This patch reverts all IDB methods, except IDBDatabase::createObjectStore and
            IDBObjectStore::createIndex, to using a plain list of arguments instead of
            grouping the various parameters inside a single OptionsObject argument.
            This decision was made on public-webapps at w3.org mailing list.
    
            We also add support (v8 only for now) for passing DOMStringList objects as arguments to native
            methods. The code for obtaining a DOMStringList object from a JS array of strings existed already
            in OptionsObject.cpp, I just copied it to V8Bindings.cpp and taught the v8 code generator how to
            use it.
    
            * bindings/scripts/CodeGeneratorV8.pm:
            * bindings/v8/V8Binding.cpp:
            (WebCore::v8ValueToWebCoreDOMStringList):
            * bindings/v8/V8Binding.h:
            * storage/IDBDatabase.cpp:
            (WebCore::IDBDatabase::transaction):
            * storage/IDBDatabase.h:
            (WebCore::IDBDatabase::transaction):
            * storage/IDBDatabase.idl:
            * storage/IDBIndex.cpp:
            (WebCore::IDBIndex::openCursor):
            (WebCore::IDBIndex::openKeyCursor):
            * storage/IDBIndex.h:
            (WebCore::IDBIndex::openCursor):
            (WebCore::IDBIndex::openKeyCursor):
            * storage/IDBIndex.idl:
            * storage/IDBObjectStore.cpp:
            (WebCore::IDBObjectStore::openCursor):
            * storage/IDBObjectStore.h:
            (WebCore::IDBObjectStore::openCursor):
            * storage/IDBObjectStore.idl:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76531 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8efa789..2267707 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,30 @@
+2011-01-24  Andrei Popescu  <andreip at google.com>
+
+        Reviewed by Nate Chapin.
+
+        IndexedDatabase methods should not take arguments of type OptionsObject
+        https://bugs.webkit.org/show_bug.cgi?id=53012
+
+        * storage/indexeddb/create-object-store-options-expected.txt:
+        * storage/indexeddb/create-object-store-options.html:
+        * storage/indexeddb/cursor-delete-expected.txt:
+        * storage/indexeddb/cursor-delete.html:
+        * storage/indexeddb/cursor-index-delete-expected.txt:
+        * storage/indexeddb/cursor-index-delete.html:
+        * storage/indexeddb/data-corruption-expected.txt:
+        * storage/indexeddb/data-corruption.html:
+        * storage/indexeddb/database-quota-expected.txt:
+        * storage/indexeddb/database-quota.html:
+        * storage/indexeddb/index-cursor.html:
+        * storage/indexeddb/objectstore-basics-expected.txt:
+        * storage/indexeddb/objectstore-basics.html:
+        * storage/indexeddb/objectstore-cursor.html:
+        * storage/indexeddb/open-cursor-expected.txt:
+        * storage/indexeddb/open-cursor.html:
+        * storage/indexeddb/transaction-and-objectstore-calls-expected.txt:
+        * storage/indexeddb/transaction-and-objectstore-calls.html:
+        * storage/indexeddb/tutorial.html:
+
 2011-01-24  Chang Shu  <chang.shu at nokia.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt b/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt
index 9e727a5..5519508 100644
--- a/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt
+++ b/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt
@@ -17,7 +17,7 @@ Deleted all object stores.
 db.createObjectStore('a', {keyPath: 'a'})
 db.createObjectStore('b')
 db.createObjectStore('c', {autoIncrement: true});
-trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE})
+trans = db.transaction([], webkitIDBTransaction.READ_WRITE)
 PASS trans.mode is webkitIDBTransaction.READ_WRITE
 trans.objectStore('a').put({'a': 0})
 trans.objectStore('b').put({'a': 0}, 0)
diff --git a/LayoutTests/storage/indexeddb/create-object-store-options.html b/LayoutTests/storage/indexeddb/create-object-store-options.html
index eacb09d..6709e58 100644
--- a/LayoutTests/storage/indexeddb/create-object-store-options.html
+++ b/LayoutTests/storage/indexeddb/create-object-store-options.html
@@ -47,7 +47,7 @@ function cleaned()
     debug("db.createObjectStore('c', {autoIncrement: true});");
     db.createObjectStore('c', {autoIncrement: true});
 
-    trans = evalAndLog("trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE})");
+    trans = evalAndLog("trans = db.transaction([], webkitIDBTransaction.READ_WRITE)");
     shouldBe("trans.mode", "webkitIDBTransaction.READ_WRITE");
 
     req = evalAndLog("trans.objectStore('a').put({'a': 0})");
diff --git a/LayoutTests/storage/indexeddb/cursor-delete-expected.txt b/LayoutTests/storage/indexeddb/cursor-delete-expected.txt
index bed1d0d..525ced7 100644
--- a/LayoutTests/storage/indexeddb/cursor-delete-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-delete-expected.txt
@@ -48,7 +48,7 @@ objectStore.add('myValue2', 'myKey2')
 objectStore.add('myValue3', 'myKey3')
 objectStore.add('myValue4', 'myKey4')
 openCursor1
-trans = db.transaction({objectStoreNames: 'test', mode: webkitIDBTransaction.READ_WRITE})
+trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
 trans.objectStore('test').openCursor({range: keyRange})
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
@@ -68,7 +68,7 @@ event.result.delete()
 PASS event.result.value is "myValue4"
 event.result.continue()
 PASS counter is 5
-trans.objectStore('test').openCursor({range: keyRange})
+trans.objectStore('test').openCursor(keyRange)
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
 PASS 'readyState' in result is true
@@ -86,7 +86,7 @@ PASS 'readyState' in event.target is true
 PASS event.target.readyState is event.target.DONE
 
 PASS event.result is null
-trans = db.transaction({objectStoreNames: 'test', mode: webkitIDBTransaction.READ_WRITE})
+trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
 objectStore = trans.objectStore('test')
 objectStore.add('myValue1', 'myKey1')
 PASS 'onsuccess' in result is true
@@ -95,7 +95,7 @@ PASS 'readyState' in result is true
 An event should fire shortly...
 
 openCursor2
-objectStore.openCursor({range: keyRange})
+objectStore.openCursor(keyRange)
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
 PASS 'readyState' in result is true
diff --git a/LayoutTests/storage/indexeddb/cursor-delete.html b/LayoutTests/storage/indexeddb/cursor-delete.html
index a3290b9..bb0102f 100644
--- a/LayoutTests/storage/indexeddb/cursor-delete.html
+++ b/LayoutTests/storage/indexeddb/cursor-delete.html
@@ -59,7 +59,7 @@ function createAndPopulateObjectStore()
 function openCursor()
 {
     debug("openCursor1");
-    evalAndLog("trans = db.transaction({objectStoreNames: 'test', mode: webkitIDBTransaction.READ_WRITE})");
+    evalAndLog("trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)");
     keyRange = webkitIDBKeyRange.lowerBound("myKey1");
     result = evalAndLog("trans.objectStore('test').openCursor({range: keyRange})");
     verifyResult(result);
@@ -72,7 +72,7 @@ function cursorSuccess()
 {
     if (event.result == null) {
         shouldBe("counter", "5");
-        result = evalAndLog("trans.objectStore('test').openCursor({range: keyRange})");
+        result = evalAndLog("trans.objectStore('test').openCursor(keyRange)");
         verifyResult(result);
         result.onsuccess = cursorEmpty;
         result.onerror = unexpectedErrorCallback;
@@ -92,7 +92,7 @@ function cursorEmpty()
 
 function addObject()
 {
-    evalAndLog("trans = db.transaction({objectStoreNames: 'test', mode: webkitIDBTransaction.READ_WRITE})");
+    evalAndLog("trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)");
     objectStore = evalAndLog("objectStore = trans.objectStore('test')");
     result = evalAndLog("objectStore.add('myValue1', 'myKey1')");
     verifyResult(result);
@@ -103,7 +103,7 @@ function addObject()
 function openCursor2()
 {
     debug("openCursor2");
-    result = evalAndLog("objectStore.openCursor({range: keyRange})");
+    result = evalAndLog("objectStore.openCursor(keyRange)");
     verifyResult(result);
     result.onsuccess = deleteObject;
     result.onerror = unexpectedErrorCallback;
diff --git a/LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt b/LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt
index 27f3117..8805c0e 100644
--- a/LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt
@@ -49,8 +49,8 @@ objectStore.add({x: 2}, 'myKey2')
 objectStore.add({x: 3}, 'myKey3')
 objectStore.add({x: 4}, 'myKey4')
 openCursor1
-trans = db.transaction({objectStoreNames: 'test', mode: webkitIDBTransaction.READ_WRITE})
-trans.objectStore('test').index('testIndex').openCursor({range: keyRange})
+trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
+trans.objectStore('test').index('testIndex').openCursor(keyRange)
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
 PASS 'readyState' in result is true
@@ -69,7 +69,7 @@ event.result.delete()
 PASS event.result.key is counter++
 event.result.continue()
 PASS counter is 5
-trans.objectStore('test').index('testIndex').openCursor({range: keyRange})
+trans.objectStore('test').index('testIndex').openCursor(keyRange)
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
 PASS 'readyState' in result is true
@@ -87,7 +87,7 @@ PASS 'readyState' in event.target is true
 PASS event.target.readyState is event.target.DONE
 
 PASS event.result is null
-trans = db.transaction({objectStoreNames: 'test', mode: webkitIDBTransaction.READ_WRITE})
+trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
 objectStore = trans.objectStore('test')
 objectStore.add({x: 1}, 'myKey1')
 PASS 'onsuccess' in result is true
@@ -97,7 +97,7 @@ An event should fire shortly...
 
 openCursor2
 index = event.source.index('testIndex')
-index.openCursor({range: keyRange})
+index.openCursor(keyRange)
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
 PASS 'readyState' in result is true
diff --git a/LayoutTests/storage/indexeddb/cursor-index-delete.html b/LayoutTests/storage/indexeddb/cursor-index-delete.html
index 1bddf63..c3de434 100644
--- a/LayoutTests/storage/indexeddb/cursor-index-delete.html
+++ b/LayoutTests/storage/indexeddb/cursor-index-delete.html
@@ -61,9 +61,9 @@ function createAndPopulateObjectStoreAndIndex()
 function openCursor()
 {
     debug("openCursor1");
-    evalAndLog("trans = db.transaction({objectStoreNames: 'test', mode: webkitIDBTransaction.READ_WRITE})");
+    evalAndLog("trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)");
     keyRange = webkitIDBKeyRange.lowerBound(1);
-    result = evalAndLog("trans.objectStore('test').index('testIndex').openCursor({range: keyRange})");
+    result = evalAndLog("trans.objectStore('test').index('testIndex').openCursor(keyRange)");
     verifyResult(result);
     result.onsuccess = cursorSuccess;
     result.onerror = unexpectedErrorCallback;
@@ -74,7 +74,7 @@ function cursorSuccess()
 {
     if (event.result == null) {
         shouldBe("counter", "5");
-        result = evalAndLog("trans.objectStore('test').index('testIndex').openCursor({range: keyRange})");
+        result = evalAndLog("trans.objectStore('test').index('testIndex').openCursor(keyRange)");
         verifyResult(result);
         result.onsuccess = cursorEmpty;
         result.onerror = unexpectedErrorCallback;
@@ -95,7 +95,7 @@ function cursorEmpty()
 
 function addObject()
 {
-    evalAndLog("trans = db.transaction({objectStoreNames: 'test', mode: webkitIDBTransaction.READ_WRITE})");
+    evalAndLog("trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)");
     objectStore = evalAndLog("objectStore = trans.objectStore('test')");
     result = evalAndLog("objectStore.add({x: 1}, 'myKey1')");
     verifyResult(result);
@@ -107,7 +107,7 @@ function openCursor2()
 {
     debug("openCursor2");
     evalAndLog("index = event.source.index('testIndex')");
-    result = evalAndLog("index.openCursor({range: keyRange})");
+    result = evalAndLog("index.openCursor(keyRange)");
     verifyResult(result);
     result.onsuccess = deleteObject;
     result.onerror = unexpectedErrorCallback;
diff --git a/LayoutTests/storage/indexeddb/data-corruption-expected.txt b/LayoutTests/storage/indexeddb/data-corruption-expected.txt
index bce3901..ac7116a 100644
--- a/LayoutTests/storage/indexeddb/data-corruption-expected.txt
+++ b/LayoutTests/storage/indexeddb/data-corruption-expected.txt
@@ -46,10 +46,10 @@ Deleted all object stores.
 createObjectStore():
 db.createObjectStore('storeName')
 addData():
-transaction = db.transaction({mode: webkitIDBTransaction.READ_WRITE})
+transaction = db.transaction([], webkitIDBTransaction.READ_WRITE)
 result = transaction.objectStore('storeName').add({x: testDate}, 'key')
 addData():
-transaction = db.transaction({mode: webkitIDBTransaction.READ_ONLY})
+transaction = db.transaction([], webkitIDBTransaction.READ_ONLY)
 result = transaction.objectStore('storeName').get('key')
 Success event fired:
 PASS 'result' in event is true
diff --git a/LayoutTests/storage/indexeddb/data-corruption.html b/LayoutTests/storage/indexeddb/data-corruption.html
index fb49fc7..664ff6d 100644
--- a/LayoutTests/storage/indexeddb/data-corruption.html
+++ b/LayoutTests/storage/indexeddb/data-corruption.html
@@ -57,7 +57,7 @@ var testDate = new Date('February 24, 1955 12:00:08');
 function addData()
 {
     debug("addData():");
-    var transaction = evalAndLog("transaction = db.transaction({mode: webkitIDBTransaction.READ_WRITE})");
+    var transaction = evalAndLog("transaction = db.transaction([], webkitIDBTransaction.READ_WRITE)");
     var result = evalAndLog("result = transaction.objectStore('storeName').add({x: testDate}, 'key')");
     result.onerror = unexpectedErrorCallback;
     transaction.oncomplete = getData;
@@ -66,7 +66,7 @@ function addData()
 function getData()
 {
     debug("addData():");
-    var transaction = evalAndLog("transaction = db.transaction({mode: webkitIDBTransaction.READ_ONLY})");
+    var transaction = evalAndLog("transaction = db.transaction([], webkitIDBTransaction.READ_ONLY)");
     var result = evalAndLog("result = transaction.objectStore('storeName').get('key')");
     result.onerror = unexpectedErrorCallback;
     result.onsuccess = doCheck;
diff --git a/LayoutTests/storage/indexeddb/database-quota-expected.txt b/LayoutTests/storage/indexeddb/database-quota-expected.txt
index 0f06145..e02ad64 100644
--- a/LayoutTests/storage/indexeddb/database-quota-expected.txt
+++ b/LayoutTests/storage/indexeddb/database-quota-expected.txt
@@ -64,7 +64,7 @@ PASS db.objectStoreNames.length is 1
 PASS db.objectStoreNames.contains('') is false
 PASS db.objectStoreNames.contains('test456') is false
 PASS db.objectStoreNames.contains('test123') is true
-trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE})
+trans = db.transaction([], webkitIDBTransaction.READ_WRITE)
 Creating 'data' which contains 64K of data
 PASS data.length is 65536
 store = trans.objectStore('test123')
diff --git a/LayoutTests/storage/indexeddb/database-quota.html b/LayoutTests/storage/indexeddb/database-quota.html
index d21b051..68dfbde 100644
--- a/LayoutTests/storage/indexeddb/database-quota.html
+++ b/LayoutTests/storage/indexeddb/database-quota.html
@@ -74,7 +74,7 @@ function commitAndContinue()
 
 function checkQuotaEnforcing()
 {
-    var trans = evalAndLog("trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE})");
+    var trans = evalAndLog("trans = db.transaction([], webkitIDBTransaction.READ_WRITE)");
     trans.onabort = testComplete;
     trans.oncomplete = unexpectedCompleteCallback;
     debug("Creating 'data' which contains 64K of data");
diff --git a/LayoutTests/storage/indexeddb/index-cursor.html b/LayoutTests/storage/indexeddb/index-cursor.html
index 1a04d57..97985a4 100644
--- a/LayoutTests/storage/indexeddb/index-cursor.html
+++ b/LayoutTests/storage/indexeddb/index-cursor.html
@@ -187,7 +187,7 @@ function runNextTest()
     else
         keyRange = webkitIDBKeyRange.upperBound(testData[upper], upperIsOpen);
  
-    var request = indexObject.openKeyCursor({range: keyRange, direction: ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV});
+    var request = indexObject.openKeyCursor(keyRange, ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV);
     request.onsuccess = cursorIteration;
     request.onerror = unexpectedErrorCallback;
 }
@@ -254,7 +254,7 @@ function testNullKeyRange()
     debug("");
     debug(str);
  
-    var request = indexObject.openKeyCursor({direction: ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV});
+    var request = indexObject.openKeyCursor(null, ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV);
     request.onsuccess = cursorIteration;
     request.onerror = unexpectedErrorCallback;
 }
diff --git a/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
index b842dcc..5eef942 100644
--- a/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
@@ -95,7 +95,7 @@ PASS store.indexNames[1] is null
 PASS store.indexNames[100] is null
 PASS store.indexNames.item(1) is null
 PASS store.indexNames.item(100) is null
-transaction = db.transaction({mode: webkitIDBTransaction.READ_WRITE})
+transaction = db.transaction([], webkitIDBTransaction.READ_WRITE)
 store = transaction.objectStore('storeName')
 Try to insert data with a Date key:
 store.add({x: 'foo'}, testDate)
@@ -137,7 +137,7 @@ PASS 'readyState' in event.target is true
 PASS event.target.readyState is event.target.DONE
 
 PASS event.code is webkitIDBDatabaseException.UNKNOWN_ERR
-db.transaction({mode: webkitIDBTransaction.READ_WRITE})
+db.transaction([], webkitIDBTransaction.READ_WRITE)
 store = transaction.objectStore('storeName')
 store.add({x: 'othervalue'}, null)
 PASS 'onsuccess' in result is true
@@ -158,7 +158,7 @@ PASS 'readyState' in event.target is true
 PASS event.target.readyState is event.target.DONE
 
 PASS event.code is webkitIDBDatabaseException.DATA_ERR
-db.transaction({mode: webkitIDBTransaction.READ_WRITE})
+db.transaction([], webkitIDBTransaction.READ_WRITE)
 store = transaction.objectStore('storeName')
 store.add({x: null}, 'validkey')
 PASS 'onsuccess' in result is true
@@ -179,7 +179,7 @@ PASS 'readyState' in event.target is true
 PASS event.target.readyState is event.target.DONE
 
 PASS event.code is webkitIDBDatabaseException.DATA_ERR
-db.transaction({mode: webkitIDBTransaction.READ_WRITE})
+db.transaction([], webkitIDBTransaction.READ_WRITE)
 store = transaction.objectStore('storeName')
 store.get('key')
 PASS 'onsuccess' in result is true
diff --git a/LayoutTests/storage/indexeddb/objectstore-basics.html b/LayoutTests/storage/indexeddb/objectstore-basics.html
index d388aa0..82854fc 100644
--- a/LayoutTests/storage/indexeddb/objectstore-basics.html
+++ b/LayoutTests/storage/indexeddb/objectstore-basics.html
@@ -141,7 +141,7 @@ var testDateB = new Date("Wed Jan 05 2011 15:54:49");
 
 function addData()
 {
-    var transaction = evalAndLog("transaction = db.transaction({mode: webkitIDBTransaction.READ_WRITE})");
+    var transaction = evalAndLog("transaction = db.transaction([], webkitIDBTransaction.READ_WRITE)");
     transaction.onabort = unexpectedAbortCallback;
     window.store = evalAndLog("store = transaction.objectStore('storeName')");
 
@@ -189,7 +189,7 @@ function addAgainFailure()
     // FIXME: This error code needs to be specced.
     shouldBe("event.code", "webkitIDBDatabaseException.UNKNOWN_ERR");
 
-    transaction = evalAndLog("db.transaction({mode: webkitIDBTransaction.READ_WRITE})");
+    transaction = evalAndLog("db.transaction([], webkitIDBTransaction.READ_WRITE)");
     transaction.onabort = unexpectedErrorCallback;
     var store = evalAndLog("store = transaction.objectStore('storeName')");
 
@@ -205,7 +205,7 @@ function addWithNullKeyFailure()
     verifyErrorEvent(event);
     shouldBe("event.code", "webkitIDBDatabaseException.DATA_ERR");
 
-    transaction = evalAndLog("db.transaction({mode: webkitIDBTransaction.READ_WRITE})");
+    transaction = evalAndLog("db.transaction([], webkitIDBTransaction.READ_WRITE)");
     transaction.onabort = unexpectedErrorCallback;
     var store = evalAndLog("store = transaction.objectStore('storeName')");
 
@@ -221,7 +221,7 @@ function addWithNullIndexFailure()
     verifyErrorEvent(event);
     shouldBe("event.code", "webkitIDBDatabaseException.DATA_ERR");
 
-    transaction = evalAndLog("db.transaction({mode: webkitIDBTransaction.READ_WRITE})");
+    transaction = evalAndLog("db.transaction([], webkitIDBTransaction.READ_WRITE)");
     transaction.onabort = unexpectedErrorCallback;
     var store = evalAndLog("store = transaction.objectStore('storeName')");
 
diff --git a/LayoutTests/storage/indexeddb/objectstore-cursor.html b/LayoutTests/storage/indexeddb/objectstore-cursor.html
index e0db08f..bb7b65b 100644
--- a/LayoutTests/storage/indexeddb/objectstore-cursor.html
+++ b/LayoutTests/storage/indexeddb/objectstore-cursor.html
@@ -165,7 +165,7 @@ function runNextTest()
     else
         keyRange = webkitIDBKeyRange.upperBound(testData[upper], upperIsOpen);
  
-    var request = objectStore.openCursor({range: keyRange, direction: ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV});
+    var request = objectStore.openCursor(keyRange, ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV);
     request.onsuccess = cursorIteration;
     request.onerror = unexpectedErrorCallback;
 }
@@ -231,7 +231,7 @@ function testNullKeyRange()
     debug("");
     debug(str);
  
-    var request = objectStore.openCursor({direction: ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV});
+    var request = objectStore.openCursor(null, ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV);
     request.onsuccess = cursorIteration;
     request.onerror = unexpectedErrorCallback;
 }
diff --git a/LayoutTests/storage/indexeddb/open-cursor-expected.txt b/LayoutTests/storage/indexeddb/open-cursor-expected.txt
index d40436c..ddaa51a 100644
--- a/LayoutTests/storage/indexeddb/open-cursor-expected.txt
+++ b/LayoutTests/storage/indexeddb/open-cursor-expected.txt
@@ -50,7 +50,7 @@ PASS 'readyState' in result is true
 An event should fire shortly...
 
 Opening cursor
-event.source.openCursor({range: keyRange})
+event.source.openCursor(keyRange)
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
 PASS 'readyState' in result is true
@@ -76,7 +76,7 @@ Passing an invalid key into .continue().
 PASS Caught exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17
 
 Opening an empty cursor.
-objectStore.openCursor({range: keyRange})
+objectStore.openCursor(keyRange)
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
 PASS 'readyState' in result is true
diff --git a/LayoutTests/storage/indexeddb/open-cursor.html b/LayoutTests/storage/indexeddb/open-cursor.html
index e4dc8f0..17ed9ab 100644
--- a/LayoutTests/storage/indexeddb/open-cursor.html
+++ b/LayoutTests/storage/indexeddb/open-cursor.html
@@ -26,7 +26,7 @@ function openEmptyCursor()
 {
     debug("Opening an empty cursor.");
     keyRange = webkitIDBKeyRange.lowerBound("InexistentKey");
-    result = evalAndLog("objectStore.openCursor({range: keyRange})");
+    result = evalAndLog("objectStore.openCursor(keyRange)");
     verifyResult(result);
     result.onsuccess = emptyCursorSuccess;
     result.onerror = unexpectedErrorCallback;
@@ -56,7 +56,7 @@ function openCursor()
 {
     debug("Opening cursor");
     keyRange = webkitIDBKeyRange.lowerBound("myKey");
-    result = evalAndLog("event.source.openCursor({range: keyRange})");
+    result = evalAndLog("event.source.openCursor(keyRange)");
     verifyResult(result);
     result.onsuccess = cursorSuccess;
     result.onerror = unexpectedErrorCallback;
diff --git a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt
index df373d6..028ff72 100644
--- a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt
@@ -19,40 +19,40 @@ db.createObjectStore('a')
 db.createObjectStore('b')
 trans.oncomplete = created
 
-trans = db.transaction({objectStoreNames: 'a'})
+trans = db.transaction(['a'])
 trans.objectStore('a')
 Expecting exception from trans.objectStore('b')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 Expecting exception from trans.objectStore('x')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 
-trans = db.transaction({objectStoreNames: ['a']})
+trans = db.transaction(['a'])
 trans.objectStore('a')
 Expecting exception from trans.objectStore('b')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 Expecting exception from trans.objectStore('x')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 
-trans = db.transaction({objectStoreNames: ['b']})
+trans = db.transaction(['b'])
 trans.objectStore('b')
 Expecting exception from trans.objectStore('a')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 Expecting exception from trans.objectStore('x')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 
-trans = db.transaction({objectStoreNames: ['a', 'b']})
+trans = db.transaction(['a', 'b'])
 trans.objectStore('a')
 trans.objectStore('b')
 Expecting exception from trans.objectStore('x')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 
-trans = db.transaction({objectStoreNames: ['b', 'a']})
+trans = db.transaction(['b', 'a'])
 trans.objectStore('a')
 trans.objectStore('b')
 Expecting exception from trans.objectStore('x')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 
-trans = db.transaction({objectStoreNames: []})
+trans = db.transaction([])
 trans.objectStore('a')
 trans.objectStore('b')
 Expecting exception from trans.objectStore('x')
@@ -64,15 +64,15 @@ trans.objectStore('b')
 Expecting exception from trans.objectStore('x')
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 
-Expecting exception from db.transaction({objectStoreNames: 'x'})
+Expecting exception from db.transaction(['x'])
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
-Expecting exception from db.transaction({objectStoreNames: ['x']})
+Expecting exception from db.transaction(['x'])
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
-Expecting exception from db.transaction({objectStoreNames: ['a', 'x']})
+Expecting exception from db.transaction(['a', 'x'])
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
-Expecting exception from db.transaction({objectStoreNames: ['x', 'x']})
+Expecting exception from db.transaction(['x', 'x'])
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
-Expecting exception from db.transaction({objectStoreNames: ['a', 'x', 'b']})
+Expecting exception from db.transaction(['a', 'x', 'b'])
 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
 
 PASS successfullyParsed is true
diff --git a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html
index 580ca5d..94b993e 100644
--- a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html
+++ b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html
@@ -49,37 +49,37 @@ function cleaned()
 
 function created()
 {
-    trans = evalAndLog("trans = db.transaction({objectStoreNames: 'a'})");
+    trans = evalAndLog("trans = db.transaction(['a'])");
     evalAndLog("trans.objectStore('a')");
     evalAndExpectException("trans.objectStore('b')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     debug("");
 
-    trans = evalAndLog("trans = db.transaction({objectStoreNames: ['a']})");
+    trans = evalAndLog("trans = db.transaction(['a'])");
     evalAndLog("trans.objectStore('a')");
     evalAndExpectException("trans.objectStore('b')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     debug("");
 
-    trans = evalAndLog("trans = db.transaction({objectStoreNames: ['b']})");
+    trans = evalAndLog("trans = db.transaction(['b'])");
     evalAndLog("trans.objectStore('b')");
     evalAndExpectException("trans.objectStore('a')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     debug("");
 
-    trans = evalAndLog("trans = db.transaction({objectStoreNames: ['a', 'b']})");
+    trans = evalAndLog("trans = db.transaction(['a', 'b'])");
     evalAndLog("trans.objectStore('a')");
     evalAndLog("trans.objectStore('b')");
     evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     debug("");
 
-    trans = evalAndLog("trans = db.transaction({objectStoreNames: ['b', 'a']})");
+    trans = evalAndLog("trans = db.transaction(['b', 'a'])");
     evalAndLog("trans.objectStore('a')");
     evalAndLog("trans.objectStore('b')");
     evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     debug("");
 
-    trans = evalAndLog("trans = db.transaction({objectStoreNames: []})");
+    trans = evalAndLog("trans = db.transaction([])");
     evalAndLog("trans.objectStore('a')");
     evalAndLog("trans.objectStore('b')");
     evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
@@ -91,11 +91,11 @@ function created()
     evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     debug("");
 
-    evalAndExpectException("db.transaction({objectStoreNames: 'x'})", "webkitIDBDatabaseException.NOT_FOUND_ERR");
-    evalAndExpectException("db.transaction({objectStoreNames: ['x']})", "webkitIDBDatabaseException.NOT_FOUND_ERR");
-    evalAndExpectException("db.transaction({objectStoreNames: ['a', 'x']})", "webkitIDBDatabaseException.NOT_FOUND_ERR");
-    evalAndExpectException("db.transaction({objectStoreNames: ['x', 'x']})", "webkitIDBDatabaseException.NOT_FOUND_ERR");
-    evalAndExpectException("db.transaction({objectStoreNames: ['a', 'x', 'b']})", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+    evalAndExpectException("db.transaction(['x'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+    evalAndExpectException("db.transaction(['x'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+    evalAndExpectException("db.transaction(['a', 'x'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+    evalAndExpectException("db.transaction(['x', 'x'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+    evalAndExpectException("db.transaction(['a', 'x', 'b'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
     debug("");
 
     done();
diff --git a/LayoutTests/storage/indexeddb/tutorial.html b/LayoutTests/storage/indexeddb/tutorial.html
index 445213c..75fd816 100644
--- a/LayoutTests/storage/indexeddb/tutorial.html
+++ b/LayoutTests/storage/indexeddb/tutorial.html
@@ -207,7 +207,7 @@ function onSetVersionComplete()
 {
     // Lets create a new transaction and then not schedule any work on it to watch it abort itself.
     // Transactions (besides those created with setVersion) are created synchronously. Like
-    // createObjectStore, transaction optionally takes in an object with various optional parameters.
+    // createObjectStore, transaction optionally takes in various optional parameters.
     //
     // First of all is the parameter "objectStoreNames". If you pass in a string, we lock just that
     // objectStore.  If you pass in an array, we lock those. Otherwise (for example, if you omit it
@@ -222,7 +222,7 @@ function onSetVersionComplete()
     // Last is "timeout" which is measured in seconds. At the moment, Chromium/WebKit defaults to 0 which
     // means never, but it's possible we'll change this in the future and other implementations may
     // use something different, so set it if you really care.
-    window.currentTransaction = db.transaction({mode: IDBTransaction.READ_WRITE, timeout: 0});
+    window.currentTransaction = db.transaction([], IDBTransaction.READ_WRITE, 0);
     currentTransaction.oncomplete = unexpectedComplete;
     currentTransaction.onabort = onTransactionAborted;
 
@@ -272,7 +272,7 @@ function onTransactionAborted()
     // Now let's make a real transaction and a person to our objectStore. Just to show it's possible,
     // we'll omit the objectStoreNames parameter which means we'll lock everything even though we only
     // ever access "people".
-    window.currentTransaction = db.transaction({mode: IDBTransaction.READ_WRITE});
+    window.currentTransaction = db.transaction([], IDBTransaction.READ_WRITE);
     currentTransaction.onabort = unexpectedAbort;
 
     var people = currentTransaction.objectStore("people");
@@ -310,7 +310,7 @@ function onPutTransactionComplete()
     // OK, now let's query the people objectStore in a couple different ways. First up, let's try get.
     // It simply takes in a key and returns a request whose result will be the value. Note that here
     // we're passing in an array for objectStoreNames rather than a simple string.
-    window.currentTransaction = db.transaction({objectStoreNames: ["people"], mode: IDBTransaction.READ_WRITE, timeout: 0});
+    window.currentTransaction = db.transaction(["people"], IDBTransaction.READ_WRITE, 0);
     currentTransaction.onabort = unexpectedAbort;
 
     var people = currentTransaction.objectStore("people");
@@ -341,7 +341,7 @@ function onGetSuccess()
     // return unique entires (only applies to indexes with unique set to false), PREV to move backwards,
     // and PREV_NO_DUPLICATE.
     var keyRange = IDBKeyRange.bound(1, 3, true, false);
-    var request = people.openCursor({range: keyRange, direction: IDBCursor.NEXT});
+    var request = people.openCursor(keyRange, IDBCursor.NEXT);
     request.onsuccess = onObjectStoreCursor;
     request.onerror = unexpectedError;
 }
@@ -394,10 +394,10 @@ function onIndexGetSuccess()
     // different IDBKeyRanges just to demonstrate how to use them, but we won't bother to handle
     // the onsuccess conditions.
     var lname = event.source;
-    lname.openCursor({range: IDBKeyRange.lowerBound("Doe", false), direction: IDBCursor.NEXT_NO_DUPLICATE});
-    lname.openCursor({direction: IDBCursor.PREV_NO_DUPLICATE});
-    lname.openCursor({range: IDBKeyRange.upperBound("ZZZZ")});
-    lname.openCursor({range: IDBKeyRange.only("Doe"), direction: IDBCursor.PREV});
+    lname.openCursor(IDBKeyRange.lowerBound("Doe", false), IDBCursor.NEXT_NO_DUPLICATE);
+    lname.openCursor(null, IDBCursor.PREV_NO_DUPLICATE);
+    lname.openCursor(IDBKeyRange.upperBound("ZZZZ"));
+    lname.openCursor(IDBKeyRange.only("Doe"), IDBCursor.PREV);
     lname.openCursor();
     lname.openKeyCursor();
 
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 961e322..5ce7342 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,42 @@
+2011-01-24  Andrei Popescu  <andreip at google.com>
+
+        Reviewed by Nate Chapin.
+
+        IndexedDatabase methods should not take arguments of type OptionsObject
+        https://bugs.webkit.org/show_bug.cgi?id=53012
+
+        This patch reverts all IDB methods, except IDBDatabase::createObjectStore and
+        IDBObjectStore::createIndex, to using a plain list of arguments instead of
+        grouping the various parameters inside a single OptionsObject argument.
+        This decision was made on public-webapps at w3.org mailing list.
+
+        We also add support (v8 only for now) for passing DOMStringList objects as arguments to native
+        methods. The code for obtaining a DOMStringList object from a JS array of strings existed already
+        in OptionsObject.cpp, I just copied it to V8Bindings.cpp and taught the v8 code generator how to
+        use it.
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+        * bindings/v8/V8Binding.cpp:
+        (WebCore::v8ValueToWebCoreDOMStringList):
+        * bindings/v8/V8Binding.h:
+        * storage/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::transaction):
+        * storage/IDBDatabase.h:
+        (WebCore::IDBDatabase::transaction):
+        * storage/IDBDatabase.idl:
+        * storage/IDBIndex.cpp:
+        (WebCore::IDBIndex::openCursor):
+        (WebCore::IDBIndex::openKeyCursor):
+        * storage/IDBIndex.h:
+        (WebCore::IDBIndex::openCursor):
+        (WebCore::IDBIndex::openKeyCursor):
+        * storage/IDBIndex.idl:
+        * storage/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::openCursor):
+        * storage/IDBObjectStore.h:
+        (WebCore::IDBObjectStore::openCursor):
+        * storage/IDBObjectStore.idl:
+
 2011-01-24  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 7d36db1..f418eb5 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -2832,6 +2832,8 @@ sub GetNativeType
 
     return "RefPtr<MediaQueryListListener>" if $type eq "MediaQueryListListener";
 
+    return "RefPtr<DOMStringList>" if $type eq "DOMStringList";
+
     # Default, assume native type is a pointer with same type name as idl type
     return "${type}*";
 }
@@ -2885,6 +2887,7 @@ sub JSValueToNative
     return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "CompareHow";
     return "static_cast<SVGPaint::SVGPaintType>($value->ToInt32()->Int32Value())" if $type eq "SVGPaintType";
     return "toWebCoreDate($value)" if $type eq "Date";
+    return "v8ValueToWebCoreDOMStringList($value)" if $type eq "DOMStringList";
 
     if ($type eq "DOMString" or $type eq "DOMUserData") {
         return $value;
diff --git a/Source/WebCore/bindings/v8/V8Binding.cpp b/Source/WebCore/bindings/v8/V8Binding.cpp
index 52b23bd..4ac00a5 100644
--- a/Source/WebCore/bindings/v8/V8Binding.cpp
+++ b/Source/WebCore/bindings/v8/V8Binding.cpp
@@ -31,6 +31,7 @@
 #include "config.h"
 #include "V8Binding.h"
 
+#include "DOMStringList.h"
 #include "Element.h"
 #include "MathExtras.h"
 #include "PlatformString.h"
@@ -578,4 +579,19 @@ void setElementStringAttr(const v8::AccessorInfo& info,
     imp->setAttribute(name, v);
 }
 
+PassRefPtr<DOMStringList> v8ValueToWebCoreDOMStringList(v8::Handle<v8::Value> value)
+{
+    v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(value));
+    if (!v8Value->IsArray())
+        return 0;
+
+    RefPtr<DOMStringList> ret = DOMStringList::create();
+    v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value);
+    for (size_t i = 0; i < v8Array->Length(); ++i) {
+        v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Integer::New(i));
+        ret->append(v8ValueToWebCoreString(indexedValue));
+    }
+    return ret.release();
+}
+
 } // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/V8Binding.h b/Source/WebCore/bindings/v8/V8Binding.h
index b2d5daa..df92b48 100644
--- a/Source/WebCore/bindings/v8/V8Binding.h
+++ b/Source/WebCore/bindings/v8/V8Binding.h
@@ -41,6 +41,7 @@
 
 namespace WebCore {
 
+    class DOMStringList;
     class EventListener;
     class EventTarget;
 
@@ -206,6 +207,8 @@ namespace WebCore {
 
     String int32ToWebCoreString(int value);
 
+    PassRefPtr<DOMStringList> v8ValueToWebCoreDOMStringList(v8::Handle<v8::Value>);
+
     class V8ParameterBase {
     public:
         operator String() { return toString<String>(); }
diff --git a/Source/WebCore/storage/IDBDatabase.cpp b/Source/WebCore/storage/IDBDatabase.cpp
index 33f004b..a82565f 100644
--- a/Source/WebCore/storage/IDBDatabase.cpp
+++ b/Source/WebCore/storage/IDBDatabase.cpp
@@ -98,33 +98,18 @@ PassRefPtr<IDBRequest> IDBDatabase::setVersion(ScriptExecutionContext* context,
     return request;
 }
 
-PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, const OptionsObject& options, ExceptionCode& ec)
+PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, PassRefPtr<DOMStringList> prpStoreNames, unsigned short mode, unsigned long timeout, ExceptionCode& ec)
 {
-    RefPtr<DOMStringList> storeNames = options.getKeyDOMStringList("objectStoreNames");
-    if (!storeNames) {
+    RefPtr<DOMStringList> storeNames = prpStoreNames;
+    if (!storeNames)
         storeNames = DOMStringList::create();
-        String storeName;
-        if (options.getKeyString("objectStoreNames", storeName))
-            storeNames->append(storeName);
-    }
 
-    // Gets cast to an unsigned short.
-    int32_t mode = IDBTransaction::READ_ONLY;
-    options.getKeyInt32("mode", mode);
     if (mode != IDBTransaction::READ_WRITE && mode != IDBTransaction::READ_ONLY) {
         // FIXME: May need to change when specced: http://www.w3.org/Bugs/Public/show_bug.cgi?id=11406
         ec = IDBDatabaseException::CONSTRAINT_ERR;
         return 0;
     }
 
-    // Gets cast to an unsigned long.
-    // FIXME: The spec needs to be updated on this. It should probably take a double.
-    int32_t timeout = defaultTimeout; 
-    options.getKeyInt32("timeout", timeout);
-    int64_t unsignedLongMax = std::numeric_limits<unsigned long>::max();
-    if (timeout < 0 || timeout > unsignedLongMax)
-        timeout = defaultTimeout; // Ignore illegal values.
-
     // We need to create a new transaction synchronously. Locks are acquired asynchronously. Operations
     // can be queued against the transaction at any point. They will start executing as soon as the
     // appropriate locks have been acquired.
diff --git a/Source/WebCore/storage/IDBDatabase.h b/Source/WebCore/storage/IDBDatabase.h
index 9ebbf00..8720036 100644
--- a/Source/WebCore/storage/IDBDatabase.h
+++ b/Source/WebCore/storage/IDBDatabase.h
@@ -61,12 +61,14 @@ public:
 
     // FIXME: Try to modify the code generator so this is unneeded.
     PassRefPtr<IDBObjectStore> createObjectStore(const String& name, ExceptionCode& ec) { return createObjectStore(name, OptionsObject(), ec); }
-    PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, ExceptionCode& ec) { return transaction(context, OptionsObject(), ec); }
+    PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, ExceptionCode& ec) { return transaction(context, 0, ec); }
+    PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, PassRefPtr<DOMStringList> storeNames, ExceptionCode& ec) { return transaction(context, storeNames, IDBTransaction::READ_ONLY, ec); } 
+    PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, PassRefPtr<DOMStringList> storeNames, unsigned short mode, ExceptionCode& ec) { return transaction(context, storeNames, mode, 0, ec); }
+    PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, PassRefPtr<DOMStringList>, unsigned short mode, unsigned long timeout, ExceptionCode&);
 
     PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const OptionsObject&, ExceptionCode&);
     void deleteObjectStore(const String& name, ExceptionCode&);
     PassRefPtr<IDBRequest> setVersion(ScriptExecutionContext*, const String& version, ExceptionCode&);
-    PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const OptionsObject&, ExceptionCode&);
     void close();
 
 private:
diff --git a/Source/WebCore/storage/IDBDatabase.idl b/Source/WebCore/storage/IDBDatabase.idl
index 7eb43e9..e3b7508 100644
--- a/Source/WebCore/storage/IDBDatabase.idl
+++ b/Source/WebCore/storage/IDBDatabase.idl
@@ -38,7 +38,7 @@ module storage {
             raises (IDBDatabaseException);
         [CallWith=ScriptExecutionContext] IDBRequest setVersion(in DOMString version)
             raises (IDBDatabaseException);
-        [CallWith=ScriptExecutionContext] IDBTransaction transaction(in [Optional] OptionsObject optionsObject)
+        [CallWith=ScriptExecutionContext] IDBTransaction transaction(in [Optional] DOMStringList storeNames, in [Optional] unsigned short mode, in [Optional] unsigned long timeout)
             raises (IDBDatabaseException);
         // FIXME: Implement.
         //void close();
diff --git a/Source/WebCore/storage/IDBIndex.cpp b/Source/WebCore/storage/IDBIndex.cpp
index 8a38a27..0cc4726 100644
--- a/Source/WebCore/storage/IDBIndex.cpp
+++ b/Source/WebCore/storage/IDBIndex.cpp
@@ -52,13 +52,8 @@ IDBIndex::~IDBIndex()
 {
 }
 
-PassRefPtr<IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, const OptionsObject& options, ExceptionCode& ec)
+PassRefPtr<IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, unsigned short direction, ExceptionCode& ec)
 {
-    RefPtr<IDBKeyRange> keyRange = options.getKeyKeyRange("range");
-
-    // Converted to an unsigned short.
-    int32_t direction = defaultDirection;
-    options.getKeyInt32("direction", direction);
     if (direction != IDBCursor::NEXT && direction != IDBCursor::NEXT_NO_DUPLICATE && direction != IDBCursor::PREV && direction != IDBCursor::PREV_NO_DUPLICATE) {
         // FIXME: May need to change when specced: http://www.w3.org/Bugs/Public/show_bug.cgi?id=11406
         ec = IDBDatabaseException::CONSTRAINT_ERR;
@@ -72,13 +67,8 @@ PassRefPtr<IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, con
     return request;
 }
 
-PassRefPtr<IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, const OptionsObject& options, ExceptionCode& ec)
+PassRefPtr<IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, unsigned short direction, ExceptionCode& ec)
 {
-    RefPtr<IDBKeyRange> keyRange = options.getKeyKeyRange("range");
-
-    // Converted to an unsigned short.
-    int32_t direction = defaultDirection;
-    options.getKeyInt32("direction", direction);
     if (direction != IDBCursor::NEXT && direction != IDBCursor::NEXT_NO_DUPLICATE && direction != IDBCursor::PREV && direction != IDBCursor::PREV_NO_DUPLICATE) {
         // FIXME: May need to change when specced: http://www.w3.org/Bugs/Public/show_bug.cgi?id=11406
         ec = IDBDatabaseException::CONSTRAINT_ERR;
diff --git a/Source/WebCore/storage/IDBIndex.h b/Source/WebCore/storage/IDBIndex.h
index 7f1aae3..aaeb348 100644
--- a/Source/WebCore/storage/IDBIndex.h
+++ b/Source/WebCore/storage/IDBIndex.h
@@ -30,7 +30,6 @@
 #include "IDBIndexBackendInterface.h"
 #include "IDBKeyRange.h"
 #include "IDBRequest.h"
-#include "OptionsObject.h"
 #include "PlatformString.h"
 #include <wtf/Forward.h>
 
@@ -53,11 +52,14 @@ public:
     bool unique() const { return m_backend->unique(); }
 
     // FIXME: Try to modify the code generator so this is unneeded.
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, OptionsObject(), ec); }
-    PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openKeyCursor(context, OptionsObject(), ec); }
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, 0, ec); }
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::NEXT, ec); }
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, unsigned short direction, ExceptionCode&);
+
+    PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openKeyCursor(context, 0, ec); } 
+    PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openKeyCursor(context, keyRange, IDBCursor::NEXT, ec); }
+    PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, unsigned short direction, ExceptionCode&);
 
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const OptionsObject&, ExceptionCode&);
-    PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const OptionsObject&, ExceptionCode&);
     PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKey>, ExceptionCode&);
     PassRefPtr<IDBRequest> getKey(ScriptExecutionContext*, PassRefPtr<IDBKey>, ExceptionCode&);
 
diff --git a/Source/WebCore/storage/IDBIndex.idl b/Source/WebCore/storage/IDBIndex.idl
index e6ba1e6..13089cc 100644
--- a/Source/WebCore/storage/IDBIndex.idl
+++ b/Source/WebCore/storage/IDBIndex.idl
@@ -33,9 +33,9 @@ module storage {
         readonly attribute DOMString keyPath;
         readonly attribute boolean unique;
 
-        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] OptionsObject options)
+        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange range, in [Optional] unsigned short direction)
             raises (IDBDatabaseException);
-        [CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in [Optional] OptionsObject options)
+        [CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in [Optional] IDBKeyRange range, in [Optional] unsigned short direction))
             raises (IDBDatabaseException);
         [CallWith=ScriptExecutionContext] IDBRequest get(in IDBKey key)
             raises (IDBDatabaseException);
diff --git a/Source/WebCore/storage/IDBObjectStore.cpp b/Source/WebCore/storage/IDBObjectStore.cpp
index ed5c96a..db33a4e 100644
--- a/Source/WebCore/storage/IDBObjectStore.cpp
+++ b/Source/WebCore/storage/IDBObjectStore.cpp
@@ -129,13 +129,8 @@ void IDBObjectStore::deleteIndex(const String& name, ExceptionCode& ec)
     m_objectStore->deleteIndex(name, m_transaction.get(), ec);
 }
 
-PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, const OptionsObject& options, ExceptionCode& ec)
+PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> range, unsigned short direction, ExceptionCode& ec)
 {
-    RefPtr<IDBKeyRange> range = options.getKeyKeyRange("range");
-
-    // Converted to an unsigned short.
-    int32_t direction = defaultDirection;
-    options.getKeyInt32("direction", direction);
     if (direction != IDBCursor::NEXT && direction != IDBCursor::NEXT_NO_DUPLICATE && direction != IDBCursor::PREV && direction != IDBCursor::PREV_NO_DUPLICATE) {
         // FIXME: May need to change when specced: http://www.w3.org/Bugs/Public/show_bug.cgi?id=11406
         ec = IDBDatabaseException::CONSTRAINT_ERR;
diff --git a/Source/WebCore/storage/IDBObjectStore.h b/Source/WebCore/storage/IDBObjectStore.h
index 0e9a4a9..8c076c7 100644
--- a/Source/WebCore/storage/IDBObjectStore.h
+++ b/Source/WebCore/storage/IDBObjectStore.h
@@ -63,7 +63,8 @@ public:
     PassRefPtr<IDBRequest> add(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return add(context, value, 0, ec);  }
     PassRefPtr<IDBRequest> put(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return put(context, value, 0, ec);  }
     PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, ExceptionCode& ec) { return createIndex(name, keyPath, OptionsObject(), ec); }
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, OptionsObject(), ec); }
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, 0, ec); } 
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::NEXT, ec); } 
 
     PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKey>, ExceptionCode&);
     PassRefPtr<IDBRequest> add(ScriptExecutionContext*, PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, ExceptionCode&);
@@ -74,7 +75,7 @@ public:
     PassRefPtr<IDBIndex> index(const String& name, ExceptionCode&);
     void deleteIndex(const String& name, ExceptionCode&);
 
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const OptionsObject&, ExceptionCode&);
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, unsigned short direction, ExceptionCode&); 
 
 private:
     IDBObjectStore(PassRefPtr<IDBObjectStoreBackendInterface>, IDBTransactionBackendInterface* transaction);
diff --git a/Source/WebCore/storage/IDBObjectStore.idl b/Source/WebCore/storage/IDBObjectStore.idl
index f023dbe..729177b 100644
--- a/Source/WebCore/storage/IDBObjectStore.idl
+++ b/Source/WebCore/storage/IDBObjectStore.idl
@@ -40,7 +40,7 @@ module storage {
             raises (IDBDatabaseException);
         [CallWith=ScriptExecutionContext] IDBRequest get(in IDBKey key)
             raises (IDBDatabaseException);
-        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] OptionsObject options)
+        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange range, in [Optional] unsigned short direction)
             raises (IDBDatabaseException);
         IDBIndex createIndex(in DOMString name, in [ConvertNullToNullString] DOMString keyPath, in [Optional] OptionsObject options)
             raises (IDBDatabaseException);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list