2010-11-26 Hans Wennborg <hans@chromium.org>
authorhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Nov 2010 11:03:59 +0000 (11:03 +0000)
committerhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Nov 2010 11:03:59 +0000 (11:03 +0000)
        Reviewed by Jeremy Orlow.

        IndexedDB: Rename IDBDatabase.objectStores to objectStoreNames
        https://bugs.webkit.org/show_bug.cgi?id=50102

        Update layout tests to use the new name.

        * storage/indexeddb/database-basics-expected.txt:
        * storage/indexeddb/database-basics.html:
        * storage/indexeddb/database-quota-expected.txt:
        * storage/indexeddb/database-quota.html:
        * storage/indexeddb/objectstore-basics-expected.txt:
        * storage/indexeddb/objectstore-basics.html:
        * storage/indexeddb/resources/shared.js:
        (deleteAllObjectStores):
        * storage/indexeddb/transaction-basics-expected.txt:
        * storage/indexeddb/transaction-basics.html:
        * storage/indexeddb/tutorial.html:
2010-11-26  Hans Wennborg  <hans@chromium.org>

        Reviewed by Jeremy Orlow.

        IndexedDB: Rename IDBDatabase.objectStores to objectStoreNames
        https://bugs.webkit.org/show_bug.cgi?id=50102

        Rename as per the spec: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#database-interface

        * manual-tests/indexeddb-persists.html:
        * storage/IDBDatabase.h:
        (WebCore::IDBDatabase::objectStoreNames):
        * storage/IDBDatabase.idl:
        * storage/IDBDatabaseBackendImpl.cpp:
        (WebCore::IDBDatabaseBackendImpl::objectStoreNames):
        (WebCore::IDBDatabaseBackendImpl::setVersion):
        (WebCore::IDBDatabaseBackendImpl::transaction):
        * storage/IDBDatabaseBackendImpl.h:
        * storage/IDBDatabaseBackendInterface.h:
2010-11-26  Hans Wennborg  <hans@chromium.org>

        Reviewed by Jeremy Orlow.

        IndexedDB: Rename IDBDatabase.objectStores to objectStoreNames
        https://bugs.webkit.org/show_bug.cgi?id=50102

        Rename as per the spec: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#database-interface

        * public/WebIDBDatabase.h:
        (WebKit::WebIDBDatabase::objectStores):
        (WebKit::WebIDBDatabase::objectStoreNames):
        * src/IDBDatabaseProxy.cpp:
        (WebCore::IDBDatabaseProxy::objectStoreNames):
        * src/IDBDatabaseProxy.h:
        * src/WebIDBDatabaseImpl.cpp:
        (WebKit::WebIDBDatabaseImpl::objectStoreNames):
        * src/WebIDBDatabaseImpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72754 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/database-basics-expected.txt
LayoutTests/storage/indexeddb/database-basics.html
LayoutTests/storage/indexeddb/database-quota-expected.txt
LayoutTests/storage/indexeddb/database-quota.html
LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
LayoutTests/storage/indexeddb/objectstore-basics.html
LayoutTests/storage/indexeddb/resources/shared.js
LayoutTests/storage/indexeddb/transaction-basics-expected.txt
LayoutTests/storage/indexeddb/transaction-basics.html
LayoutTests/storage/indexeddb/tutorial.html
WebCore/ChangeLog
WebCore/manual-tests/indexeddb-persists.html
WebCore/storage/IDBDatabase.h
WebCore/storage/IDBDatabase.idl
WebCore/storage/IDBDatabaseBackendImpl.cpp
WebCore/storage/IDBDatabaseBackendImpl.h
WebCore/storage/IDBDatabaseBackendInterface.h
WebKit/chromium/ChangeLog
WebKit/chromium/public/WebIDBDatabase.h
WebKit/chromium/src/IDBDatabaseProxy.cpp
WebKit/chromium/src/IDBDatabaseProxy.h
WebKit/chromium/src/WebIDBDatabaseImpl.cpp
WebKit/chromium/src/WebIDBDatabaseImpl.h

index c03442d..a743179 100644 (file)
@@ -1,3 +1,24 @@
+2010-11-26  Hans Wennborg  <hans@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        IndexedDB: Rename IDBDatabase.objectStores to objectStoreNames
+        https://bugs.webkit.org/show_bug.cgi?id=50102
+
+        Update layout tests to use the new name.
+
+        * storage/indexeddb/database-basics-expected.txt:
+        * storage/indexeddb/database-basics.html:
+        * storage/indexeddb/database-quota-expected.txt:
+        * storage/indexeddb/database-quota.html:
+        * storage/indexeddb/objectstore-basics-expected.txt:
+        * storage/indexeddb/objectstore-basics.html:
+        * storage/indexeddb/resources/shared.js:
+        (deleteAllObjectStores):
+        * storage/indexeddb/transaction-basics-expected.txt:
+        * storage/indexeddb/transaction-basics.html:
+        * storage/indexeddb/tutorial.html:
+
 2010-11-26  Andrei Popescu  <andreip@google.com>
 
         Reviewed by Jeremy Orlow.
index d0bbfe6..f1fa5ad 100644 (file)
@@ -79,17 +79,17 @@ PASS event.target.readyState is event.target.DONE
 
 PASS db.version is "version b"
 PASS db.name is "name"
-PASS db.objectStores is []
-PASS db.objectStores.length is 0
-PASS db.objectStores.contains('') is false
-PASS db.objectStores[0] is null
-PASS db.objectStores.item(0) is null
+PASS db.objectStoreNames is []
+PASS db.objectStoreNames.length is 0
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames[0] is null
+PASS db.objectStoreNames.item(0) is null
 db.createObjectStore("test123")
-PASS db.objectStores is ['test123']
-PASS db.objectStores.length is 1
-PASS db.objectStores.contains('') is false
-PASS db.objectStores.contains('test456') is false
-PASS db.objectStores.contains('test123') is true
+PASS db.objectStoreNames is ['test123']
+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
 db.setVersion("version c")
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
@@ -109,20 +109,20 @@ PASS event.target.readyState is event.target.DONE
 
 PASS db.version is "version c"
 PASS db.name is "name"
-PASS db.objectStores is ['test123']
-PASS db.objectStores.length is 1
-PASS db.objectStores.contains('') is false
-PASS db.objectStores.contains('test456') is false
-PASS db.objectStores.contains('test123') is true
+PASS db.objectStoreNames is ['test123']
+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
 db.createObjectStore("test456")
 setVersionTrans = event.result
 PASS setVersionTrans !== null is true
 PASS db.version is "version b"
-PASS db.objectStores is ['test123']
-PASS db.objectStores.length is 1
-PASS db.objectStores.contains('') is false
-PASS db.objectStores.contains('test456') is false
-PASS db.objectStores.contains('test123') is true
+PASS db.objectStoreNames is ['test123']
+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
 PASS successfullyParsed is true
 
 TEST COMPLETE
index bb3256c..b070de0 100644 (file)
@@ -68,11 +68,11 @@ function createObjectStore()
     verifySuccessEvent(event);
     shouldBeEqualToString("db.version", "version b");
     shouldBeEqualToString("db.name", "name");
-    shouldBe("db.objectStores", "[]");
-    shouldBe("db.objectStores.length", "0");
-    shouldBe("db.objectStores.contains('')", "false");
-    shouldBeNull("db.objectStores[0]");
-    shouldBeNull("db.objectStores.item(0)");
+    shouldBe("db.objectStoreNames", "[]");
+    shouldBe("db.objectStoreNames.length", "0");
+    shouldBe("db.objectStoreNames.contains('')", "false");
+    shouldBeNull("db.objectStoreNames[0]");
+    shouldBeNull("db.objectStoreNames.item(0)");
 
     objectStore = evalAndLog('db.createObjectStore("test123")');
     checkObjectStore();
@@ -81,11 +81,11 @@ function createObjectStore()
 
 function checkObjectStore()
 {
-    shouldBe("db.objectStores", "['test123']");
-    shouldBe("db.objectStores.length", "1");
-    shouldBe("db.objectStores.contains('')", "false");
-    shouldBe("db.objectStores.contains('test456')", "false");
-    shouldBe("db.objectStores.contains('test123')", "true");
+    shouldBe("db.objectStoreNames", "['test123']");
+    shouldBe("db.objectStoreNames.length", "1");
+    shouldBe("db.objectStoreNames.contains('')", "false");
+    shouldBe("db.objectStoreNames.contains('test456')", "false");
+    shouldBe("db.objectStoreNames.contains('test123')", "true");
 }
 
 function commitAndContinue()
index ee0c6be..3ea24d9 100644 (file)
@@ -55,15 +55,15 @@ PASS event.target.readyState is event.target.DONE
 
 PASS db.version is "new version"
 PASS db.name is "name"
-PASS db.objectStores is []
-PASS db.objectStores.length is 0
-PASS db.objectStores.contains('') is false
+PASS db.objectStoreNames is []
+PASS db.objectStoreNames.length is 0
+PASS db.objectStoreNames.contains('') is false
 db.createObjectStore("test123")
-PASS db.objectStores is ['test123']
-PASS db.objectStores.length is 1
-PASS db.objectStores.contains('') is false
-PASS db.objectStores.contains('test456') is false
-PASS db.objectStores.contains('test123') is true
+PASS db.objectStoreNames is ['test123']
+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()
 Creating 'data' which contains 64K of data
 PASS data.length is 65536
index eb9c32e..b4207d4 100644 (file)
@@ -49,9 +49,9 @@ function createNewObjectStore()
     verifySuccessEvent(event);
     shouldBeEqualToString("db.version", "new version");
     shouldBeEqualToString("db.name", "name");
-    shouldBe("db.objectStores", "[]");
-    shouldBe("db.objectStores.length", "0");
-    shouldBe("db.objectStores.contains('')", "false");
+    shouldBe("db.objectStoreNames", "[]");
+    shouldBe("db.objectStoreNames.length", "0");
+    shouldBe("db.objectStoreNames.contains('')", "false");
 
     objectStore = evalAndLog('db.createObjectStore("test123")');\r
     checkObjectStore();\r
@@ -60,11 +60,11 @@ function createNewObjectStore()
 
 function checkObjectStore()
 {
-    shouldBe("db.objectStores", "['test123']");
-    shouldBe("db.objectStores.length", "1");
-    shouldBe("db.objectStores.contains('')", "false");
-    shouldBe("db.objectStores.contains('test456')", "false");
-    shouldBe("db.objectStores.contains('test123')", "true");\r
+    shouldBe("db.objectStoreNames", "['test123']");
+    shouldBe("db.objectStoreNames.length", "1");
+    shouldBe("db.objectStoreNames.contains('')", "false");
+    shouldBe("db.objectStoreNames.contains('test456')", "false");
+    shouldBe("db.objectStoreNames.contains('test123')", "true");\r
 }\r
 \r
 function commitAndContinue()\r
index a16991a..02ca924 100644 (file)
@@ -45,7 +45,7 @@ PASS trans !== null is true
 Deleted all object stores.
 createObjectStore():
 store = db.createObjectStore('storeName', null)
-storeNames = db.objectStores
+storeNames = db.objectStoreNames
 PASS store.name is "storeName"
 PASS store.keyPath is null
 PASS storeNames.contains('storeName') is true
index d53b1fc..f3e1ea9 100644 (file)
@@ -49,7 +49,7 @@ function createObjectStore()
 {
     debug("createObjectStore():");
     window.store = evalAndLog("store = db.createObjectStore('storeName', null)");
-    var storeNames = evalAndLog("storeNames = db.objectStores");
+    var storeNames = evalAndLog("storeNames = db.objectStoreNames");
 
     shouldBeEqualToString("store.name", "storeName");
     shouldBeNull("store.keyPath");
index 01ec606..71abf44 100644 (file)
@@ -90,8 +90,8 @@ function unexpectedCompleteCallback()
 // FIXME: remove the onfinished parameter.
 function deleteAllObjectStores(db, onfinished)
 {
-    while (db.objectStores.length)
-        db.removeObjectStore(db.objectStores.item(0));
+    while (db.objectStoreNames.length)
+        db.removeObjectStore(db.objectStoreNames.item(0));
 
     debug("Deleted all object stores.");
     onfinished();
index 4a7df35..9855e60 100644 (file)
@@ -37,12 +37,12 @@ PASS 'readyState' in event.target is true
 PASS event.target.readyState is event.target.DONE
 
 Deleted all object stores.
-PASS window.db.objectStores is []
-PASS window.db.objectStores.length is 0
-PASS window.db.objectStores.contains('storeFail') is false
-PASS window.db.objectStores is []
-PASS window.db.objectStores.length is 0
-PASS window.db.objectStores.contains('storeFail') is false
+PASS window.db.objectStoreNames is []
+PASS window.db.objectStoreNames.length is 0
+PASS window.db.objectStoreNames.contains('storeFail') is false
+PASS window.db.objectStoreNames is []
+PASS window.db.objectStoreNames.length is 0
+PASS window.db.objectStoreNames.contains('storeFail') is false
 result = startSetVersion('version fail')
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
@@ -67,9 +67,9 @@ store = db.createObjectStore('storeFail', null)
 index = store.createIndex('indexFail', 'x', false)
 db.removeObjectStore('storeFail')
 store.removeIndex('indexFail')
-PASS window.db.objectStores is []
-PASS window.db.objectStores.length is 0
-PASS window.db.objectStores.contains('storeFail') is false
+PASS window.db.objectStoreNames is []
+PASS window.db.objectStoreNames.length is 0
+PASS window.db.objectStoreNames.contains('storeFail') is false
 result = startSetVersion('version fail')
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
@@ -96,9 +96,9 @@ db.removeObjectStore('storeFail')
 store.removeIndex('indexFail')
 store = db.createObjectStore('storeFail', null)
 index = store.createIndex('indexFail', 'x', false)
-PASS window.db.objectStores is []
-PASS window.db.objectStores.length is 0
-PASS window.db.objectStores.contains('storeFail') is false
+PASS window.db.objectStoreNames is []
+PASS window.db.objectStoreNames.length is 0
+PASS window.db.objectStoreNames.contains('storeFail') is false
 result = startSetVersion('version fail')
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
@@ -121,9 +121,9 @@ trans = event.result
 PASS trans !== null is true
 store = db.createObjectStore('storeFail', null)
 index = store.createIndex('indexFail', 'x', false)
-PASS db.objectStores is ['storeFail']
-PASS db.objectStores.length is 1
-PASS db.objectStores.contains('storeFail') is true
+PASS db.objectStoreNames is ['storeFail']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('storeFail') is true
 result = startSetVersion('version fail')
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
@@ -147,9 +147,9 @@ PASS trans !== null is true
 store = trans.objectStore('storeFail')
 store.removeIndex('indexFail')
 db.removeObjectStore('storeFail')
-PASS db.objectStores is ['storeFail']
-PASS db.objectStores.length is 1
-PASS db.objectStores.contains('storeFail') is true
+PASS db.objectStoreNames is ['storeFail']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('storeFail') is true
 db.setVersion('new version')
 PASS 'onsuccess' in result is true
 PASS 'onerror' in result is true
index 62754d0..c68630f 100644 (file)
@@ -182,16 +182,16 @@ function startSetVersion(versionName)
 \r
 function checkMetadataEmpty()\r
 {\r
-    shouldBe("window.db.objectStores", "[]");\r
-    shouldBe("window.db.objectStores.length", "0");\r
-    shouldBe("window.db.objectStores.contains('storeFail')", "false");
+    shouldBe("window.db.objectStoreNames", "[]");\r
+    shouldBe("window.db.objectStoreNames.length", "0");\r
+    shouldBe("window.db.objectStoreNames.contains('storeFail')", "false");
 }\r
 \r
 function checkMetadataExistingObjectStore()\r
 {\r
-    shouldBe("db.objectStores", "['storeFail']");\r
-    shouldBe("db.objectStores.length", "1");\r
-    shouldBe("db.objectStores.contains('storeFail')", "true");\r
+    shouldBe("db.objectStoreNames", "['storeFail']");\r
+    shouldBe("db.objectStoreNames.length", "1");\r
+    shouldBe("db.objectStoreNames.contains('storeFail')", "true");\r
 }
 
 function setNewVersion()
index 36a0856..24fe47a 100644 (file)
@@ -121,8 +121,8 @@ function onSetVersion()
     currentTransaction.onabort = unexpectedAbort;
 
     // Delete existing object stores.
-    while (db.objectStores.length)
-        db.removeObjectStore(db.objectStores[0]);
+    while (db.objectStoreNames.length)
+        db.removeObjectStore(db.objectStoreNames[0]);
 
     // Now that we have a blank slate, let's create an objectStore. An objectStore is simply an
     // ordered mapping of keys to values. We can iterate through ranges of keys or do individual
@@ -227,9 +227,9 @@ function onSetVersionComplete()
     currentTransaction.oncomplete = unexpectedComplete;
     currentTransaction.onabort = onTransactionAborted;
 
-    // Verify that "people" is the only object store in existance. The objectStores attribute is
+    // Verify that "people" is the only object store in existance. The objectStoreNames attribute is
     // a DOMStringList which is somewhat like an array.
-    var objectStoreList = db.objectStores;
+    var objectStoreList = db.objectStoreNames;
     if (objectStoreList.length != 1
         || !objectStoreList.contains("people")
         || objectStoreList.item(0) != "people"
index 5f466e9..ce915d6 100644 (file)
@@ -1,3 +1,23 @@
+2010-11-26  Hans Wennborg  <hans@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        IndexedDB: Rename IDBDatabase.objectStores to objectStoreNames
+        https://bugs.webkit.org/show_bug.cgi?id=50102
+
+        Rename as per the spec: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#database-interface
+
+        * manual-tests/indexeddb-persists.html:
+        * storage/IDBDatabase.h:
+        (WebCore::IDBDatabase::objectStoreNames):
+        * storage/IDBDatabase.idl:
+        * storage/IDBDatabaseBackendImpl.cpp:
+        (WebCore::IDBDatabaseBackendImpl::objectStoreNames):
+        (WebCore::IDBDatabaseBackendImpl::setVersion):
+        (WebCore::IDBDatabaseBackendImpl::transaction):
+        * storage/IDBDatabaseBackendImpl.h:
+        * storage/IDBDatabaseBackendInterface.h:
+
 2010-11-26  Andrei Popescu  <andreip@google.com>
 
         Reviewed by Jeremy Orlow.
index 6f5e036..d8061e1 100644 (file)
@@ -33,8 +33,8 @@ function setData()
     webkitIndexedDB.open("someDB", "some description").onsuccess = function() {
         event.result.setVersion("some version").onsuccess = function() {
             var db = event.source;
-            while (db.objectStores.length)
-                db.removeObjectStore(db.objectStores[0]);
+            while (db.objectStoreNames.length)
+                db.removeObjectStore(db.objectStoreNames[0]);
             db.createObjectStore("test").put("value", "key").onsuccess = function() {
                 status("Value set", "green");
             }
index 3e33472..77fa5d0 100644 (file)
@@ -57,7 +57,7 @@ public:
     // Implement the IDL
     String name() const { return m_backend->name(); }
     String version() const { return m_backend->version(); }
-    PassRefPtr<DOMStringList> objectStores() const { return m_backend->objectStores(); }
+    PassRefPtr<DOMStringList> objectStoreNames() const { return m_backend->objectStoreNames(); }
 
     // FIXME: Try to modify the code generator so this is unneeded.
     PassRefPtr<IDBObjectStore> createObjectStore(const String& name, ExceptionCode& ec) { return createObjectStore(name, OptionsObject(), ec); }
index b08d459..70d00a0 100644 (file)
@@ -30,7 +30,7 @@ module storage {
     ] IDBDatabase {
         readonly attribute DOMString name;
         readonly attribute DOMString version;
-        readonly attribute DOMStringList objectStores;
+        readonly attribute DOMStringList objectStoreNames;
 
         IDBObjectStore createObjectStore(in DOMString name, in [Optional] OptionsObject options)
             raises (IDBDatabaseException);
index 6f5b890..52b5b30 100644 (file)
@@ -115,7 +115,7 @@ SQLiteDatabase& IDBDatabaseBackendImpl::sqliteDatabase() const
     return m_sqliteDatabase->db();
 }
 
-PassRefPtr<DOMStringList> IDBDatabaseBackendImpl::objectStores() const
+PassRefPtr<DOMStringList> IDBDatabaseBackendImpl::objectStoreNames() const
 {
     RefPtr<DOMStringList> objectStoreNames = DOMStringList::create();
     for (ObjectStoreMap::const_iterator it = m_objectStores.begin(); it != m_objectStores.end(); ++it)
@@ -213,8 +213,8 @@ void IDBDatabaseBackendImpl::setVersion(const String& version, PassRefPtr<IDBCal
 {
     RefPtr<IDBDatabaseBackendImpl> database = this;
     RefPtr<IDBCallbacks> callbacks = prpCallbacks;
-    RefPtr<DOMStringList> objectStores = DOMStringList::create();
-    RefPtr<IDBTransactionBackendInterface> transaction = IDBTransactionBackendImpl::create(objectStores.get(), IDBTransaction::VERSION_CHANGE, 0, this);
+    RefPtr<DOMStringList> objectStoreNames = DOMStringList::create();
+    RefPtr<IDBTransactionBackendInterface> transaction = IDBTransactionBackendImpl::create(objectStoreNames.get(), IDBTransaction::VERSION_CHANGE, 0, this);
     if (!transaction->scheduleTask(createCallbackTask(&IDBDatabaseBackendImpl::setVersionInternal, database, version, callbacks, transaction),
                                    createCallbackTask(&IDBDatabaseBackendImpl::resetVersion, database, m_version))) {
         ec = IDBDatabaseException::NOT_ALLOWED_ERR;
@@ -234,10 +234,10 @@ void IDBDatabaseBackendImpl::setVersionInternal(ScriptExecutionContext*, PassRef
     callbacks->onSuccess(transaction);
 }
 
-PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendImpl::transaction(DOMStringList* objectStores, unsigned short mode, unsigned long timeout, ExceptionCode&)
+PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendImpl::transaction(DOMStringList* objectStoreNames, unsigned short mode, unsigned long timeout, ExceptionCode&)
 {
     // FIXME: Return not allowed err if close has been called.
-    return IDBTransactionBackendImpl::create(objectStores, mode, timeout, this);
+    return IDBTransactionBackendImpl::create(objectStoreNames, mode, timeout, this);
 }
 
 void IDBDatabaseBackendImpl::close()
index afdcd62..8b9a27b 100644 (file)
@@ -56,12 +56,12 @@ public:
 
     virtual String name() const { return m_name; }
     virtual String version() const { return m_version; }
-    virtual PassRefPtr<DOMStringList> objectStores() const;
+    virtual PassRefPtr<DOMStringList> objectStoreNames() const;
 
     virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&);
     virtual void removeObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&);
     virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>, ExceptionCode&);
-    virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout, ExceptionCode&);
+    virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* objectStoreNames, unsigned short mode, unsigned long timeout, ExceptionCode&);
     virtual void close();
 
     PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name);
index e672a50..fa86220 100644 (file)
@@ -52,7 +52,7 @@ public:
 
     virtual String name() const = 0;
     virtual String version() const = 0;
-    virtual PassRefPtr<DOMStringList> objectStores() const = 0;
+    virtual PassRefPtr<DOMStringList> objectStoreNames() const = 0;
 
     virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
     virtual void removeObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
index 41004e5..97c5a1b 100644 (file)
@@ -1,3 +1,22 @@
+2010-11-26  Hans Wennborg  <hans@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        IndexedDB: Rename IDBDatabase.objectStores to objectStoreNames
+        https://bugs.webkit.org/show_bug.cgi?id=50102
+
+        Rename as per the spec: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#database-interface
+
+        * public/WebIDBDatabase.h:
+        (WebKit::WebIDBDatabase::objectStores):
+        (WebKit::WebIDBDatabase::objectStoreNames):
+        * src/IDBDatabaseProxy.cpp:
+        (WebCore::IDBDatabaseProxy::objectStoreNames):
+        * src/IDBDatabaseProxy.h:
+        * src/WebIDBDatabaseImpl.cpp:
+        (WebKit::WebIDBDatabaseImpl::objectStoreNames):
+        * src/WebIDBDatabaseImpl.h:
+
 2010-11-26  Andrei Popescu  <andreip@google.com>
 
         Reviewed by Jeremy Orlow.
index 82472e1..8579a2e 100644 (file)
@@ -57,12 +57,8 @@ public:
         WEBKIT_ASSERT_NOT_REACHED();
         return WebString();
     }
-    virtual WebDOMStringList objectStores() const
-    {
-        WEBKIT_ASSERT_NOT_REACHED();
-        return WebDOMStringList();
-    }
-
+    virtual WebDOMStringList objectStores() const { return objectStoreNames(); } // FIXME: Remove after roll.
+    virtual WebDOMStringList objectStoreNames() const { return objectStores(); } // FIXME: Assert not reached after roll.
     virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&)
     { 
         WEBKIT_ASSERT_NOT_REACHED();
index 4fecf1b..f8fe1fa 100644 (file)
@@ -71,9 +71,9 @@ String IDBDatabaseProxy::version() const
     return m_webIDBDatabase->version();
 }
 
-PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStores() const
+PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStoreNames() const
 {
-    return m_webIDBDatabase->objectStores();
+    return m_webIDBDatabase->objectStoreNames();
 }
 
 PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseProxy::createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
index 5d20073..8bb4d2f 100644 (file)
@@ -45,7 +45,7 @@ public:
     virtual String name() const;
     virtual String description() const;
     virtual String version() const;
-    virtual PassRefPtr<DOMStringList> objectStores() const;
+    virtual PassRefPtr<DOMStringList> objectStoreNames() const;
 
     virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&);
     virtual void removeObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&);
index 022bb52..9724752 100644 (file)
@@ -59,9 +59,9 @@ WebString WebIDBDatabaseImpl::version() const
     return m_databaseBackend->version();
 }
 
-WebDOMStringList WebIDBDatabaseImpl::objectStores() const
+WebDOMStringList WebIDBDatabaseImpl::objectStoreNames() const
 {
-    return m_databaseBackend->objectStores();
+    return m_databaseBackend->objectStoreNames();
 }
 
 WebIDBObjectStore* WebIDBDatabaseImpl::createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction& transaction, WebExceptionCode& ec)
index 659bb40..fb2a8be 100644 (file)
@@ -47,7 +47,7 @@ public:
 
     virtual WebString name() const;
     virtual WebString version() const;
-    virtual WebDOMStringList objectStores() const;
+    virtual WebDOMStringList objectStoreNames() const;
 
     virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&);
     virtual void removeObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);