Changeset 117509 in webkit
- Timestamp:
- May 17, 2012 4:03:05 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117505 r117509 1 2012-05-17 Joshua Bell <jsbell@chromium.org> 2 3 IndexedDB: Implement IDBObjectStore.autoIncrement 4 https://bugs.webkit.org/show_bug.cgi?id=86662 5 6 Reviewed by Dimitri Glazkov. 7 8 * storage/indexeddb/objectstore-basics-expected.txt: 9 * storage/indexeddb/objectstore-basics-workers-expected.txt: 10 * storage/indexeddb/resources/objectstore-basics.js: 11 (setVersionSuccess): 12 1 13 2012-05-17 Peter Kasting <pkasting@google.com> 2 14 -
trunk/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
r116337 r117509 21 21 PASS 'indexNames' in store is true 22 22 PASS 'transaction' in store is true 23 PASS 'autoIncrement' in store is true 23 24 PASS 'put' in store is true 24 25 PASS typeof store.put is "function" … … 43 44 PASS store.name is "storeName" 44 45 PASS store.keyPath is null 46 PASS store.autoIncrement is false 45 47 PASS storeNames.contains('storeName') is true 46 48 PASS storeNames.length is 1 49 PASS db.createObjectStore('storeWithKeyPath', {keyPath: 'path'}).keyPath is "path" 50 PASS db.createObjectStore('storeWithKeyGenerator', {autoIncrement: true}).autoIncrement is true 47 51 Ask for an index that doesn't exist: 48 52 index = store.index('asdf') -
trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt
r116337 r117509 22 22 PASS [Worker] 'indexNames' in store is true 23 23 PASS [Worker] 'transaction' in store is true 24 PASS [Worker] 'autoIncrement' in store is true 24 25 PASS [Worker] 'put' in store is true 25 26 PASS [Worker] typeof store.put is "function" … … 44 45 PASS [Worker] store.name is "storeName" 45 46 PASS [Worker] store.keyPath is null 47 PASS [Worker] store.autoIncrement is false 46 48 PASS [Worker] storeNames.contains('storeName') is true 47 49 PASS [Worker] storeNames.length is 1 50 PASS [Worker] db.createObjectStore('storeWithKeyPath', {keyPath: 'path'}).keyPath is "path" 51 PASS [Worker] db.createObjectStore('storeWithKeyGenerator', {autoIncrement: true}).autoIncrement is true 48 52 [Worker] Ask for an index that doesn't exist: 49 53 [Worker] index = store.index('asdf') -
trunk/LayoutTests/storage/indexeddb/resources/objectstore-basics.js
r116337 r117509 43 43 shouldBeTrue("'indexNames' in store"); 44 44 shouldBeTrue("'transaction' in store"); 45 shouldBeTrue("'autoIncrement' in store"); 45 46 shouldBeTrue("'put' in store"); 46 47 shouldBeEqualToString("typeof store.put", "function"); … … 66 67 shouldBeEqualToString("store.name", "storeName"); 67 68 shouldBeNull("store.keyPath"); 69 shouldBeFalse("store.autoIncrement"); 68 70 shouldBe("storeNames.contains('storeName')", "true"); 69 71 shouldBe("storeNames.length", "1"); 72 73 shouldBeEqualToString("db.createObjectStore('storeWithKeyPath', {keyPath: 'path'}).keyPath", "path"); 74 shouldBeTrue("db.createObjectStore('storeWithKeyGenerator', {autoIncrement: true}).autoIncrement"); 75 70 76 // FIXME: test all of object store's methods. 71 77 -
trunk/Source/WebCore/ChangeLog
r117507 r117509 1 2012-05-17 Joshua Bell <jsbell@chromium.org> 2 3 IndexedDB: Implement IDBObjectStore.autoIncrement 4 https://bugs.webkit.org/show_bug.cgi?id=86662 5 6 Reviewed by Dimitri Glazkov. 7 8 Simple boolean accessor defined in the IDB spec, which reflects the 9 object store's internal autoIncrement flag. 10 11 Test: storage/indexeddb/objectstore-basics.html 12 13 * Modules/indexeddb/IDBObjectStore.cpp: 14 (WebCore::IDBObjectStore::autoIncrement): Forward call to back end. 15 (WebCore): 16 * Modules/indexeddb/IDBObjectStore.h: Expose attribute as method. 17 (IDBObjectStore): 18 * Modules/indexeddb/IDBObjectStore.idl: Define the attribute. 19 * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Expose in interface. 20 (IDBObjectStoreBackendInterface): 21 1 22 2012-05-17 Kentaro Hara <haraken@chromium.org> 2 23 -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
r117338 r117509 79 79 } 80 80 81 bool IDBObjectStore::autoIncrement() const 82 { 83 IDB_TRACE("IDBObjectStore::autoIncrement"); 84 return m_backend->autoIncrement(); 85 } 86 81 87 PassRefPtr<IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) 82 88 { -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h
r116337 r117509 56 56 ~IDBObjectStore() { } 57 57 58 // Implement the IDBObjectStore IDL 58 59 String name() const; 59 60 String keyPath() const; 60 61 PassRefPtr<DOMStringList> indexNames() const; 61 62 IDBTransaction* transaction() const; 63 bool autoIncrement() const; 62 64 63 65 // FIXME: Try to modify the code generator so this is unneeded. -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl
r116337 r117509 33 33 readonly attribute DOMStringList indexNames; 34 34 readonly attribute IDBTransaction transaction; 35 readonly attribute boolean autoIncrement; 35 36 36 37 [CallWith=ScriptExecutionContext] IDBRequest put(in SerializedScriptValue value, in [Optional] IDBKey key) -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendInterface.h
r114981 r117509 51 51 virtual String keyPath() const = 0; 52 52 virtual PassRefPtr<DOMStringList> indexNames() const = 0; 53 virtual bool autoIncrement() const = 0; 53 54 54 55 virtual void get(PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0; -
trunk/Source/WebKit/chromium/ChangeLog
r117481 r117509 1 2012-05-17 Joshua Bell <jsbell@chromium.org> 2 3 IndexedDB: Implement IDBObjectStore.autoIncrement 4 https://bugs.webkit.org/show_bug.cgi?id=86662 5 6 Reviewed by Dimitri Glazkov. 7 8 * src/IDBObjectStoreBackendProxy.cpp: 9 (WebKit::IDBObjectStoreBackendProxy::autoIncrement): 10 (WebKit): 11 * src/IDBObjectStoreBackendProxy.h: 12 (IDBObjectStoreBackendProxy): 13 * src/WebIDBObjectStoreImpl.cpp: 14 (WebKit::WebIDBObjectStoreImpl::autoIncrement): 15 (WebKit): 16 * src/WebIDBObjectStoreImpl.h: 17 (WebIDBObjectStoreImpl): 18 1 19 2012-05-17 Mikhail Naganov <mnaganov@chromium.org> 2 20 -
trunk/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
r115339 r117509 73 73 { 74 74 return m_webIDBObjectStore->indexNames(); 75 } 76 77 bool IDBObjectStoreBackendProxy::autoIncrement() const 78 { 79 return m_webIDBObjectStore->autoIncrement(); 75 80 } 76 81 -
trunk/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
r114981 r117509 46 46 virtual String keyPath() const; 47 47 virtual PassRefPtr<WebCore::DOMStringList> indexNames() const; 48 virtual bool autoIncrement() const; 48 49 49 50 virtual void get(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&); -
trunk/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
r115339 r117509 75 75 } 76 76 77 bool WebIDBObjectStoreImpl::autoIncrement() const 78 { 79 return m_objectStore->autoIncrement(); 80 } 81 77 82 void WebIDBObjectStoreImpl::get(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) 78 83 { -
trunk/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
r115339 r117509 52 52 WebString keyPathString() const; 53 53 WebDOMStringList indexNames() const; 54 bool autoIncrement() const; 54 55 55 56 void get(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
Note: See TracChangeset
for help on using the changeset viewer.