Changeset 105569 in webkit
- Timestamp:
- Jan 20, 2012 10:06:50 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r105568 r105569 1 2012-01-20 Mark Pilgrim <pilgrim@chromium.org> 2 3 Switch indexeddb to use supplemental IDL for DOMWindow 4 https://bugs.webkit.org/show_bug.cgi?id=76723 5 6 Reviewed by Adam Barth. 7 8 No new tests required, all existing tests pass. 9 10 * Modules/indexeddb: Added. 11 * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: Added. webkitIndexedDB() method previously in DOMWindow.cpp 12 (WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase): 13 (WebCore::DOMWindowIndexedDatabase::~DOMWindowIndexedDatabase): 14 (WebCore::DOMWindowIndexedDatabase::webkitIndexedDB): 15 * Modules/indexeddb/DOMWindowIndexedDatabase.h: Added. 16 * Modules/indexeddb/DOMWindowIndexedDatabase.idl: Added. attributes previously in DOMWindow.idl 17 * WebCore.gyp/WebCore.gyp: add Modules/indexeddb/ directory 18 * WebCore.gypi: add Modules/indexeddb/* 19 * page/DOMWindow.cpp: remove webkitIndexedDB() method, add accessor methods for m_idbFactory 20 (WebCore::DOMWindow::getIDBFactory): 21 (WebCore::DOMWindow::setIDBFactory): 22 * page/DOMWindow.h: 23 * page/DOMWindow.idl: 24 1 25 2012-01-20 David Levin <levin@chromium.org> 2 26 -
trunk/Source/WebCore/WebCore.gyp/WebCore.gyp
r105428 r105569 54 54 '../Modules/gamepad', 55 55 '../Modules/intents', 56 '../Modules/indexeddb', 56 57 '../accessibility', 57 58 '../accessibility/chromium', -
trunk/Source/WebCore/WebCore.gypi
r105514 r105569 1149 1149 'Modules/gamepad/GamepadList.idl', 1150 1150 'Modules/gamepad/NavigatorGamepad.idl', 1151 'Modules/indexeddb/DOMWindowIndexedDatabase.idl', 1151 1152 'Modules/intents/DOMWindowIntents.idl', 1152 1153 'Modules/intents/Intent.idl', … … 1702 1703 'Modules/gamepad/NavigatorGamepad.cpp', 1703 1704 'Modules/gamepad/NavigatorGamepad.h', 1705 'Modules/indexeddb/DOMWindowIndexedDatabase.cpp', 1706 'Modules/indexeddb/DOMWindowIndexedDatabase.h', 1704 1707 'Modules/intents/Intent.cpp', 1705 1708 'Modules/intents/Intent.h', -
trunk/Source/WebCore/page/DOMWindow.cpp
r105554 r105569 751 751 752 752 #if ENABLE(INDEXED_DATABASE) 753 IDBFactory* DOMWindow::webkitIndexedDB() const 754 { 755 Document* document = this->document(); 756 if (!document) 757 return 0; 758 759 Page* page = document->page(); 760 if (!page) 761 return 0; 762 763 if (!document->securityOrigin()->canAccessDatabase()) 764 return 0; 765 766 if (!m_idbFactory && isCurrentlyDisplayedInFrame()) 767 m_idbFactory = IDBFactory::create(page->group().idbFactory()); 768 return m_idbFactory.get(); 753 void DOMWindow::setIDBFactory(PassRefPtr<IDBFactory> idbFactory) 754 { 755 m_idbFactory = idbFactory; 769 756 } 770 757 #endif -
trunk/Source/WebCore/page/DOMWindow.h
r105531 r105569 373 373 #endif 374 374 375 #if ENABLE(INDEXED_DATABASE)376 IDBFactory* webkitIndexedDB() const;377 #endif378 379 375 #if ENABLE(NOTIFICATIONS) 380 376 NotificationCenter* webkitNotifications() const; … … 416 412 // by the document that is currently active in m_frame. 417 413 bool isCurrentlyDisplayedInFrame() const; 414 415 #if ENABLE(INDEXED_DATABASE) 416 IDBFactory* idbFactory() { return m_idbFactory.get(); } 417 void setIDBFactory(PassRefPtr<IDBFactory>); 418 #endif 418 419 419 420 private: -
trunk/Source/WebCore/page/DOMWindow.idl
r105514 r105569 172 172 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS 173 173 readonly attribute [EnabledAtRuntime] NotificationCenter webkitNotifications; 174 #endif175 #if defined(ENABLE_INDEXED_DATABASE) && ENABLE_INDEXED_DATABASE176 readonly attribute IDBFactory webkitIndexedDB;177 178 attribute IDBCursorConstructor webkitIDBCursor;179 attribute IDBDatabaseConstructor webkitIDBDatabase;180 attribute IDBDatabaseErrorConstructor webkitIDBDatabaseError;181 attribute IDBDatabaseExceptionConstructor webkitIDBDatabaseException;182 attribute IDBFactoryConstructor webkitIDBFactory;183 attribute IDBIndexConstructor webkitIDBIndex;184 attribute IDBKeyRangeConstructor webkitIDBKeyRange;185 attribute IDBObjectStoreConstructor webkitIDBObjectStore;186 attribute IDBRequestConstructor webkitIDBRequest;187 attribute IDBTransactionConstructor webkitIDBTransaction;188 174 #endif 189 175 #if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM
Note: See TracChangeset
for help on using the changeset viewer.