WebCore: Adding support for the optional creation callback that could be
authordumi@chromium.org <dumi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Mar 2010 21:48:49 +0000 (21:48 +0000)
committerdumi@chromium.org <dumi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Mar 2010 21:48:49 +0000 (21:48 +0000)
commit0d02ce527f17122e59248412b04be584708907f0
treefd17a525715052ad21694f77db3a535cc6badf98
parent4369380a4212e0ee5d0e8d7992c8b2736217a96b
WebCore: Adding support for the optional creation callback that could be
passed to openDatabase().

Reviewed by Adam Barth.

Test: storage/open-database-creation-callback.html

https://bugs.webkit.org/show_bug.cgi?id=34726

* Android.jscbindings.mk
* Android.v8bindings.mk
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::openDatabase):
* bindings/js/JSDatabaseCallback.cpp: Added.
(WebCore::JSDatabaseCallback::JSDatabaseCallback):
(WebCore::JSDatabaseCallback::~JSDatabaseCallback):
(WebCore::JSDatabaseCallback::handleEvent):
* bindings/js/JSDatabaseCallback.h: Added.
(WebCore::JSDatabaseCallback::create):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::openDatabaseCallback):
* bindings/v8/custom/V8DatabaseCallback.cpp: Added.
(WebCore::V8DatabaseCallback::V8DatabaseCallback):
(WebCore::V8DatabaseCallback::~V8DatabaseCallback):
(WebCore::V8DatabaseCallback::handleEvent):
* bindings/v8/custom/V8DatabaseCallback.h: Added.
(WebCore::V8DatabaseCallback::create):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::openDatabase):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* storage/Database.cpp:
(WebCore::DatabaseCreationCallbackTask::create):
(WebCore::DatabaseCreationCallbackTask::performTask):
(WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
(WebCore::Database::openDatabase):
(WebCore::Database::Database):
(WebCore::Database::performOpenAndVerify):
(WebCore::Database::performCreationCallback):
* storage/Database.h:
(WebCore::Database::isNew):
* storage/DatabaseCallback.h: Added.
(WebCore::DatabaseCallback::~DatabaseCallback):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::openDatabase):
* workers/WorkerContext.h:

LayoutTests: Adding a test to test the creation callback passed to
openDatabase() and another one to make sure it is executed in the
correct world.

Reviewed by Adam Barth.

https://bugs.webkit.org/show_bug.cgi?id=34726

* storage/open-database-creation-callback-expected.txt: Added.
* storage/open-database-creation-callback.html: Added.
* storage/open-database-creation-callback-isolated-world-expected.txt: Added.
* storage/open-database-creation-callback-isolated-world.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/open-database-creation-callback-expected.txt [new file with mode: 0644]
LayoutTests/storage/open-database-creation-callback-isolated-world-expected.txt [new file with mode: 0644]
LayoutTests/storage/open-database-creation-callback-isolated-world.html [new file with mode: 0644]
LayoutTests/storage/open-database-creation-callback.html [new file with mode: 0644]
WebCore/Android.jscbindings.mk
WebCore/Android.v8bindings.mk
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSDOMWindowCustom.cpp
WebCore/bindings/js/JSDatabaseCallback.cpp [new file with mode: 0644]
WebCore/bindings/js/JSDatabaseCallback.h [new file with mode: 0644]
WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
WebCore/bindings/v8/custom/V8DatabaseCallback.cpp [new file with mode: 0644]
WebCore/bindings/v8/custom/V8DatabaseCallback.h [new file with mode: 0644]
WebCore/dom/Document.cpp
WebCore/page/DOMWindow.cpp
WebCore/page/DOMWindow.h
WebCore/page/DOMWindow.idl
WebCore/storage/Database.cpp
WebCore/storage/Database.h
WebCore/storage/DatabaseCallback.h [new file with mode: 0644]
WebCore/workers/WorkerContext.cpp
WebCore/workers/WorkerContext.h