Diff
Modified: trunk/LayoutTests/ChangeLog (117508 => 117509)
--- trunk/LayoutTests/ChangeLog 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/LayoutTests/ChangeLog 2012-05-17 23:03:05 UTC (rev 117509)
@@ -1,3 +1,15 @@
+2012-05-17 Joshua Bell <jsb...@chromium.org>
+
+ IndexedDB: Implement IDBObjectStore.autoIncrement
+ https://bugs.webkit.org/show_bug.cgi?id=86662
+
+ Reviewed by Dimitri Glazkov.
+
+ * storage/indexeddb/objectstore-basics-expected.txt:
+ * storage/indexeddb/objectstore-basics-workers-expected.txt:
+ * storage/indexeddb/resources/objectstore-basics.js:
+ (setVersionSuccess):
+
2012-05-17 Peter Kasting <pkast...@google.com>
[chromium] Rebaseline.
Modified: trunk/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt (117508 => 117509)
--- trunk/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt 2012-05-17 23:03:05 UTC (rev 117509)
@@ -20,6 +20,7 @@
PASS 'keyPath' in store is true
PASS 'indexNames' in store is true
PASS 'transaction' in store is true
+PASS 'autoIncrement' in store is true
PASS 'put' in store is true
PASS typeof store.put is "function"
PASS 'add' in store is true
@@ -42,8 +43,11 @@
PASS typeof store.count is "function"
PASS store.name is "storeName"
PASS store.keyPath is null
+PASS store.autoIncrement is false
PASS storeNames.contains('storeName') is true
PASS storeNames.length is 1
+PASS db.createObjectStore('storeWithKeyPath', {keyPath: 'path'}).keyPath is "path"
+PASS db.createObjectStore('storeWithKeyGenerator', {autoIncrement: true}).autoIncrement is true
Ask for an index that doesn't exist:
index = store.index('asdf')
PASS Exception thrown.
Modified: trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt (117508 => 117509)
--- trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt 2012-05-17 23:03:05 UTC (rev 117509)
@@ -21,6 +21,7 @@
PASS [Worker] 'keyPath' in store is true
PASS [Worker] 'indexNames' in store is true
PASS [Worker] 'transaction' in store is true
+PASS [Worker] 'autoIncrement' in store is true
PASS [Worker] 'put' in store is true
PASS [Worker] typeof store.put is "function"
PASS [Worker] 'add' in store is true
@@ -43,8 +44,11 @@
PASS [Worker] typeof store.count is "function"
PASS [Worker] store.name is "storeName"
PASS [Worker] store.keyPath is null
+PASS [Worker] store.autoIncrement is false
PASS [Worker] storeNames.contains('storeName') is true
PASS [Worker] storeNames.length is 1
+PASS [Worker] db.createObjectStore('storeWithKeyPath', {keyPath: 'path'}).keyPath is "path"
+PASS [Worker] db.createObjectStore('storeWithKeyGenerator', {autoIncrement: true}).autoIncrement is true
[Worker] Ask for an index that doesn't exist:
[Worker] index = store.index('asdf')
PASS [Worker] Exception thrown.
Modified: trunk/LayoutTests/storage/indexeddb/resources/objectstore-basics.js (117508 => 117509)
--- trunk/LayoutTests/storage/indexeddb/resources/objectstore-basics.js 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/LayoutTests/storage/indexeddb/resources/objectstore-basics.js 2012-05-17 23:03:05 UTC (rev 117509)
@@ -42,6 +42,7 @@
shouldBeTrue("'keyPath' in store");
shouldBeTrue("'indexNames' in store");
shouldBeTrue("'transaction' in store");
+ shouldBeTrue("'autoIncrement' in store");
shouldBeTrue("'put' in store");
shouldBeEqualToString("typeof store.put", "function");
shouldBeTrue("'add' in store");
@@ -65,8 +66,13 @@
shouldBeEqualToString("store.name", "storeName");
shouldBeNull("store.keyPath");
+ shouldBeFalse("store.autoIncrement");
shouldBe("storeNames.contains('storeName')", "true");
shouldBe("storeNames.length", "1");
+
+ shouldBeEqualToString("db.createObjectStore('storeWithKeyPath', {keyPath: 'path'}).keyPath", "path");
+ shouldBeTrue("db.createObjectStore('storeWithKeyGenerator', {autoIncrement: true}).autoIncrement");
+
// FIXME: test all of object store's methods.
debug("Ask for an index that doesn't exist:");
Modified: trunk/Source/WebCore/ChangeLog (117508 => 117509)
--- trunk/Source/WebCore/ChangeLog 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebCore/ChangeLog 2012-05-17 23:03:05 UTC (rev 117509)
@@ -1,3 +1,24 @@
+2012-05-17 Joshua Bell <jsb...@chromium.org>
+
+ IndexedDB: Implement IDBObjectStore.autoIncrement
+ https://bugs.webkit.org/show_bug.cgi?id=86662
+
+ Reviewed by Dimitri Glazkov.
+
+ Simple boolean accessor defined in the IDB spec, which reflects the
+ object store's internal autoIncrement flag.
+
+ Test: storage/indexeddb/objectstore-basics.html
+
+ * Modules/indexeddb/IDBObjectStore.cpp:
+ (WebCore::IDBObjectStore::autoIncrement): Forward call to back end.
+ (WebCore):
+ * Modules/indexeddb/IDBObjectStore.h: Expose attribute as method.
+ (IDBObjectStore):
+ * Modules/indexeddb/IDBObjectStore.idl: Define the attribute.
+ * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Expose in interface.
+ (IDBObjectStoreBackendInterface):
+
2012-05-17 Kentaro Hara <hara...@chromium.org>
[V8][Refactoring] Remove throwError("message", XXXError) from CodeGeneratorV8.pm
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (117508 => 117509)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp 2012-05-17 23:03:05 UTC (rev 117509)
@@ -78,6 +78,12 @@
return m_transaction.get();
}
+bool IDBObjectStore::autoIncrement() const
+{
+ IDB_TRACE("IDBObjectStore::autoIncrement");
+ return m_backend->autoIncrement();
+}
+
PassRefPtr<IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::get");
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (117508 => 117509)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h 2012-05-17 23:03:05 UTC (rev 117509)
@@ -55,10 +55,12 @@
}
~IDBObjectStore() { }
+ // Implement the IDBObjectStore IDL
String name() const;
String keyPath() const;
PassRefPtr<DOMStringList> indexNames() const;
IDBTransaction* transaction() const;
+ bool autoIncrement() const;
// FIXME: Try to modify the code generator so this is unneeded.
PassRefPtr<IDBRequest> add(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return add(context, value, 0, ec); }
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (117508 => 117509)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl 2012-05-17 23:03:05 UTC (rev 117509)
@@ -32,6 +32,7 @@
readonly attribute [TreatReturnedNullStringAs=Null] DOMString keyPath;
readonly attribute DOMStringList indexNames;
readonly attribute IDBTransaction transaction;
+ readonly attribute boolean autoIncrement;
[CallWith=ScriptExecutionContext] IDBRequest put(in SerializedScriptValue value, in [Optional] IDBKey key)
raises (IDBDatabaseException);
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendInterface.h (117508 => 117509)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendInterface.h 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendInterface.h 2012-05-17 23:03:05 UTC (rev 117509)
@@ -50,6 +50,7 @@
virtual String name() const = 0;
virtual String keyPath() const = 0;
virtual PassRefPtr<DOMStringList> indexNames() const = 0;
+ virtual bool autoIncrement() const = 0;
virtual void get(PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
Modified: trunk/Source/WebKit/chromium/ChangeLog (117508 => 117509)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-17 23:03:05 UTC (rev 117509)
@@ -1,3 +1,21 @@
+2012-05-17 Joshua Bell <jsb...@chromium.org>
+
+ IndexedDB: Implement IDBObjectStore.autoIncrement
+ https://bugs.webkit.org/show_bug.cgi?id=86662
+
+ Reviewed by Dimitri Glazkov.
+
+ * src/IDBObjectStoreBackendProxy.cpp:
+ (WebKit::IDBObjectStoreBackendProxy::autoIncrement):
+ (WebKit):
+ * src/IDBObjectStoreBackendProxy.h:
+ (IDBObjectStoreBackendProxy):
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::autoIncrement):
+ (WebKit):
+ * src/WebIDBObjectStoreImpl.h:
+ (WebIDBObjectStoreImpl):
+
2012-05-17 Mikhail Naganov <mnaga...@chromium.org>
Support Copy ... actions for the Web Inspector remote debugging mode.
Modified: trunk/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp (117508 => 117509)
--- trunk/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp 2012-05-17 23:03:05 UTC (rev 117509)
@@ -74,6 +74,11 @@
return m_webIDBObjectStore->indexNames();
}
+bool IDBObjectStoreBackendProxy::autoIncrement() const
+{
+ return m_webIDBObjectStore->autoIncrement();
+}
+
void IDBObjectStoreBackendProxy::get(PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
Modified: trunk/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h (117508 => 117509)
--- trunk/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h 2012-05-17 23:03:05 UTC (rev 117509)
@@ -45,6 +45,7 @@
virtual String name() const;
virtual String keyPath() const;
virtual PassRefPtr<WebCore::DOMStringList> indexNames() const;
+ virtual bool autoIncrement() const;
virtual void get(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void put(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
Modified: trunk/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp (117508 => 117509)
--- trunk/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp 2012-05-17 23:03:05 UTC (rev 117509)
@@ -74,6 +74,11 @@
return m_objectStore->indexNames();
}
+bool WebIDBObjectStoreImpl::autoIncrement() const
+{
+ return m_objectStore->autoIncrement();
+}
+
void WebIDBObjectStoreImpl::get(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_objectStore->get(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
Modified: trunk/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h (117508 => 117509)
--- trunk/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h 2012-05-17 22:44:30 UTC (rev 117508)
+++ trunk/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h 2012-05-17 23:03:05 UTC (rev 117509)
@@ -51,6 +51,7 @@
// http://webkit.org/b/84207
WebString keyPathString() const;
WebDOMStringList indexNames() const;
+ bool autoIncrement() const;
void get(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void put(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);