[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andreip at google.com andreip at google.com
Wed Dec 22 11:46:12 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 186265f28bcace35bbb5c3c6c828400fe0c0aac8
Author: andreip at google.com <andreip at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 6 09:42:22 2010 +0000

    2010-08-05  Andrei Popescu  <andreip at dhcp-172-16-14-12.lon.corp.google.com>
    
            Reviewed by Jeremy Orlow.
    
            [IndexedDB] IndexedDB is missing the Transaction interface.
            https://bugs.webkit.org/show_bug.cgi?id=42970
    
            Add IDBTransaction boilerplate.
    
            No new tests, not functional yet.
    
            * Android.derived.jscbindings.mk:
            * Android.derived.v8bindings.mk:
            * Android.mk:
            * CMakeLists.txt:
            * DerivedSources.cpp:
            * DerivedSources.make:
            * GNUmakefile.am:
            * WebCore.gypi:
            * WebCore.pri:
            * WebCore.pro:
            * WebCore.vcproj/WebCore.vcproj:
            * WebCore.xcodeproj/project.pbxproj:
            * dom/EventNames.h:
            * storage/IDBDatabase.cpp:
            (WebCore::IDBDatabase::transaction):
            * storage/IDBDatabase.h:
            * storage/IDBDatabase.idl:
            * storage/IDBDatabaseBackendImpl.cpp:
            (WebCore::IDBDatabaseBackendImpl::transaction):
            * storage/IDBDatabaseBackendImpl.h:
            * storage/IDBDatabaseBackendInterface.h:
            * storage/IDBRequest.cpp:
            (WebCore::IDBRequest::IDBRequest):
            (WebCore::IDBRequest::canSuspend):
            (WebCore::IDBRequest::timerFired):
            (WebCore::IDBRequest::onEventCommon):
            * storage/IDBRequest.h:
            * storage/IDBTransaction.cpp: Added.
            (WebCore::IDBTransaction::IDBTransaction):
            (WebCore::IDBTransaction::~IDBTransaction):
            (WebCore::IDBTransaction::mode):
            (WebCore::IDBTransaction::db):
            (WebCore::IDBTransaction::objectStore):
            (WebCore::IDBTransaction::abort):
            (WebCore::IDBTransaction::scriptExecutionContext):
            (WebCore::IDBTransaction::canSuspend):
            (WebCore::IDBTransaction::eventTargetData):
            (WebCore::IDBTransaction::ensureEventTargetData):
            * storage/IDBTransaction.h: Added.
            (WebCore::IDBTransaction::create):
            (WebCore::IDBTransaction::):
            (WebCore::IDBTransaction::toIDBTransaction):
            (WebCore::IDBTransaction::refEventTarget):
            (WebCore::IDBTransaction::derefEventTarget):
            * storage/IDBTransaction.idl: Added.
            * storage/IDBTransactionBackendInterface.h: Added.
            (WebCore::IDBTransactionBackendInterface::~IDBTransactionBackendInterface):
    2010-08-05  Andrei Popescu  <andreip at dhcp-172-16-14-12.lon.corp.google.com>
    
            Reviewed by Jeremy Orlow.
    
            [IndexedDB] IndexedDB is missing the Transaction interface.
            https://bugs.webkit.org/show_bug.cgi?id=42970
    
            Add IDBTransaction boilerplate.
    
            * src/IDBDatabaseProxy.cpp:
            (WebCore::IDBDatabaseProxy::transaction):
            * src/IDBDatabaseProxy.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64824 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/Android.derived.jscbindings.mk b/WebCore/Android.derived.jscbindings.mk
index bea2e1d..845abdb 100644
--- a/WebCore/Android.derived.jscbindings.mk
+++ b/WebCore/Android.derived.jscbindings.mk
@@ -372,7 +372,8 @@ GEN := \
     $(intermediates)/storage/JSIDBKeyRange.h \
     $(intermediates)/storage/JSIDBObjectStore.h \
     $(intermediates)/storage/JSIDBRequest.h \
-    $(intermediates)/storage/JSIDBSuccessEvent.h
+    $(intermediates)/storage/JSIDBSuccessEvent.h \
+    $(intermediates)/storage/JSIDBTransaction.h
 
 $(GEN): PRIVATE_PATH := $(LOCAL_PATH)
 $(GEN): PRIVATE_CUSTOM_TOOL = perl -I$(PRIVATE_PATH)/bindings/scripts $(PRIVATE_PATH)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --include dom --include html --include storage --outputdir $(dir $@) $<
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index f7fa8d6..f531fea 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -353,7 +353,8 @@ GEN := \
     $(intermediates)/bindings/V8IDBKeyRange.h \
     $(intermediates)/bindings/V8IDBObjectStore.h \
     $(intermediates)/bindings/V8IDBRequest.h \
-    $(intermediates)/bindings/V8IDBSuccessEvent.h
+    $(intermediates)/bindings/V8IDBSuccessEvent.h \
+    $(intermediates)/bindings/V8IDBTransaction.h
 
 $(GEN): PRIVATE_PATH := $(LOCAL_PATH)
 $(GEN): PRIVATE_CUSTOM_TOOL = SOURCE_ROOT=$(PRIVATE_PATH) perl -I$(PRIVATE_PATH)/bindings/scripts $(PRIVATE_PATH)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator V8 --include dom --include html --include storage --outputdir $(dir $@) $<
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 1d5c1eb..143dce6 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -747,6 +747,9 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	storage/IDBDatabaseBackendImpl.cpp \
 	storage/IDBErrorEvent.cpp \
 	storage/IDBEvent.cpp \
+	storage/IDBFactory.cpp \
+	storage/IDBFactoryBackendInterface.cpp \
+	storage/IDBFactoryBackendImpl.cpp \
 	storage/IDBIndex.cpp \
 	storage/IDBIndexBackendImpl.cpp \
 	storage/IDBKey.cpp \
@@ -755,9 +758,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	storage/IDBObjectStoreBackendImpl.cpp \
 	storage/IDBRequest.cpp \
 	storage/IDBSuccessEvent.cpp \
-	storage/IDBFactory.cpp \
-	storage/IDBFactoryBackendInterface.cpp \
-	storage/IDBFactoryBackendImpl.cpp \
+	storage/IDBTransaction.cpp \
 	storage/LocalStorageTask.cpp \
 	storage/LocalStorageThread.cpp \
 	storage/OriginQuotaManager.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 8be1016..ddb8210 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -346,6 +346,7 @@ SET(WebCore_IDL_FILES
     storage/IDBObjectStore.idl
     storage/IDBRequest.idl
     storage/IDBSuccessEvent.idl
+    storage/IDBTransaction.idl
     storage/SQLError.idl
     storage/SQLException.idl
     storage/SQLResultSet.idl
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9b32a01..3b6acba 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,62 @@
+2010-08-05  Andrei Popescu  <andreip at dhcp-172-16-14-12.lon.corp.google.com>
+
+        Reviewed by Jeremy Orlow.
+
+        [IndexedDB] IndexedDB is missing the Transaction interface.
+        https://bugs.webkit.org/show_bug.cgi?id=42970
+
+        Add IDBTransaction boilerplate.
+
+        No new tests, not functional yet.
+
+        * Android.derived.jscbindings.mk:
+        * Android.derived.v8bindings.mk:
+        * Android.mk:
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pri:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/EventNames.h:
+        * storage/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::transaction):
+        * storage/IDBDatabase.h:
+        * storage/IDBDatabase.idl:
+        * storage/IDBDatabaseBackendImpl.cpp:
+        (WebCore::IDBDatabaseBackendImpl::transaction):
+        * storage/IDBDatabaseBackendImpl.h:
+        * storage/IDBDatabaseBackendInterface.h:
+        * storage/IDBRequest.cpp:
+        (WebCore::IDBRequest::IDBRequest):
+        (WebCore::IDBRequest::canSuspend):
+        (WebCore::IDBRequest::timerFired):
+        (WebCore::IDBRequest::onEventCommon):
+        * storage/IDBRequest.h:
+        * storage/IDBTransaction.cpp: Added.
+        (WebCore::IDBTransaction::IDBTransaction):
+        (WebCore::IDBTransaction::~IDBTransaction):
+        (WebCore::IDBTransaction::mode):
+        (WebCore::IDBTransaction::db):
+        (WebCore::IDBTransaction::objectStore):
+        (WebCore::IDBTransaction::abort):
+        (WebCore::IDBTransaction::scriptExecutionContext):
+        (WebCore::IDBTransaction::canSuspend):
+        (WebCore::IDBTransaction::eventTargetData):
+        (WebCore::IDBTransaction::ensureEventTargetData):
+        * storage/IDBTransaction.h: Added.
+        (WebCore::IDBTransaction::create):
+        (WebCore::IDBTransaction::):
+        (WebCore::IDBTransaction::toIDBTransaction):
+        (WebCore::IDBTransaction::refEventTarget):
+        (WebCore::IDBTransaction::derefEventTarget):
+        * storage/IDBTransaction.idl: Added.
+        * storage/IDBTransactionBackendInterface.h: Added.
+        (WebCore::IDBTransactionBackendInterface::~IDBTransactionBackendInterface):
+
 2010-08-06  Rafael Antognolli  <antognolli at profusion.mobi>
 
         Unreviewed build fix.
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index 4bed568..7071183 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -188,6 +188,7 @@
 #include "JSIDBObjectStore.cpp"
 #include "JSIDBRequest.cpp"
 #include "JSIDBSuccessEvent.cpp"
+#include "JSIDBTransaction.cpp"
 #include "JSImageData.cpp"
 #include "JSInjectedScriptHost.cpp"
 #include "JSInspectorFrontendHost.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index e263c7e..f331db8 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -238,6 +238,7 @@ DOM_CLASSES = \
     IDBObjectStore \
     IDBRequest \
     IDBSuccessEvent \
+    IDBTransaction \
     ImageData \
     InjectedScriptHost \
     InspectorFrontendHost \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 58d6c19..96dd46d 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -2854,7 +2854,9 @@ webcore_built_sources += \
 	DerivedSources/WebCore/JSIDBRequest.cpp \
 	DerivedSources/WebCore/JSIDBRequest.h \
 	DerivedSources/WebCore/JSIDBSuccessEvent.cpp \
-	DerivedSources/WebCore/JSIDBSuccessEvent.h
+	DerivedSources/WebCore/JSIDBSuccessEvent.h \
+	DerivedSources/WebCore/JSIDBTransaction.cpp \
+	DerivedSources/WebCore/JSIDBTransaction.h
 
 webcore_sources += \
 	WebCore/storage/IDBAny.cpp \
@@ -2871,6 +2873,12 @@ webcore_sources += \
 	WebCore/storage/IDBErrorEvent.h \
 	WebCore/storage/IDBEvent.cpp \
 	WebCore/storage/IDBEvent.h \
+	WebCore/storage/IDBFactory.cpp \
+	WebCore/storage/IDBFactory.h \
+	WebCore/storage/IDBFactoryBackendInterface.cpp \
+	WebCore/storage/IDBFactoryBackendInterface.h \
+	WebCore/storage/IDBFactoryBackendImpl.cpp \
+	WebCore/storage/IDBFactoryBackendImpl.h
 	WebCore/storage/IDBIndex.cpp \
 	WebCore/storage/IDBIndex.h \
 	WebCore/storage/IDBIndexBackendInterface.h \
@@ -2887,12 +2895,9 @@ webcore_sources += \
 	WebCore/storage/IDBRequest.h \
 	WebCore/storage/IDBSuccessEvent.cpp \
 	WebCore/storage/IDBSuccessEvent.h \
-	WebCore/storage/IDBFactory.cpp \
-	WebCore/storage/IDBFactory.h \
-	WebCore/storage/IDBFactoryBackendInterface.cpp \
-	WebCore/storage/IDBFactoryBackendInterface.h \
-	WebCore/storage/IDBFactoryBackendImpl.cpp \
-	WebCore/storage/IDBFactoryBackendImpl.h
+	WebCore/storage/IDBTransaction.cpp \
+	WebCore/storage/IDBTransaction.h \
+	WebCore/storage/IDBTransactionBackendInterface.h
 endif # END ENABLE_INDEXED_DATABASE
 
 # ----
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index bad123e..0892445 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -249,6 +249,7 @@
             'storage/IDBObjectStore.idl',
             'storage/IDBRequest.idl',
             'storage/IDBSuccessEvent.idl',
+            'storage/IDBTransaction.idl',
             'storage/Metadata.idl',
             'storage/MetadataCallback.idl',
             'storage/SQLError.idl',
@@ -3529,6 +3530,9 @@
             'storage/IDBRequest.h',
             'storage/IDBSuccessEvent.cpp',
             'storage/IDBSuccessEvent.h',
+            'storage/IDBTransaction.cpp',
+            'storage/IDBTransaction.h',
+            'storage/IDBTransactionBackendInterface.h',
             'storage/LocalStorageTask.cpp',
             'storage/LocalStorageTask.h',
             'storage/LocalStorageThread.cpp',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index b581794..f262c1d 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -488,13 +488,14 @@ IDL_BINDINGS += \
     storage/IDBDatabase.idl \
     storage/IDBErrorEvent.idl \
     storage/IDBEvent.idl \
+    storage/IDBFactory.idl \
     storage/IDBIndex.idl \
     storage/IDBKey.idl \
     storage/IDBKeyRange.idl \
     storage/IDBObjectStore.idl \
     storage/IDBRequest.idl \
     storage/IDBSuccessEvent.idl \
-    storage/IDBFactory.idl \
+    storage/IDBTransaction.idl \
     storage/Storage.idl \
     storage/StorageEvent.idl \
     storage/SQLError.idl \
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 27c76fe..161e798 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2443,7 +2443,9 @@ contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
         storage/IDBObjectStoreBackendImpl.h \
         storage/IDBObjectStoreBackendInterface.h \
         storage/IDBRequest.h \
-        storage/IDBSuccessEvent.h
+        storage/IDBSuccessEvent.h \
+        storage/IDBTransaction.h \
+        storage/IDBTransactionBackendInterface.h
 
     SOURCES += \
         bindings/js/IDBBindingUtilities.cpp \
@@ -2464,7 +2466,8 @@ contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
         storage/IDBObjectStore.cpp \
         storage/IDBObjectStoreBackendImpl.cpp \
         storage/IDBRequest.cpp \
-        storage/IDBSuccessEvent.cpp
+        storage/IDBSuccessEvent.cpp \
+        storage/IDBTransaction.cpp
 }
 
 contains(DEFINES, ENABLE_DOM_STORAGE=1) {
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 3befab9..de2470e 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -45308,6 +45308,62 @@
 					>
 				</File>
 				<File
+					RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBTransaction.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug_Internal|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug_Cairo|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_Cairo|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug_All|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBTransaction.h"
+					>
+				</File>
+				<File
 					RelativePath="..\bindings\js\JSImageConstructor.cpp"
 					>
 					<FileConfiguration
@@ -50245,6 +50301,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\storage\IDBTransaction.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\storage\IDBTransaction.h"
+				>
+			</File>
+			<File
 				RelativePath="..\storage\LocalStorageTask.cpp"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 8c71f82..7551c0f 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -4357,6 +4357,10 @@
 		B5D3601A112F8B560048DEA8 /* DatabaseCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B5D36019112F8B560048DEA8 /* DatabaseCallback.h */; };
 		B61762541203374F00EF9114 /* IDBDatabaseBackendInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = B61762531203374F00EF9114 /* IDBDatabaseBackendInterface.h */; };
 		B61762621203490800EF9114 /* IDBDatabaseBackendImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = B61762611203490800EF9114 /* IDBDatabaseBackendImpl.h */; };
+		B656626A120B115A006EA85C /* IDBTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6566267120B115A006EA85C /* IDBTransaction.cpp */; };
+		B656626B120B115A006EA85C /* IDBTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = B6566268120B115A006EA85C /* IDBTransaction.h */; };
+		B6566270120B1227006EA85C /* JSIDBTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = B656626E120B1227006EA85C /* JSIDBTransaction.h */; };
+		B6566271120B1227006EA85C /* JSIDBTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B656626F120B1227006EA85C /* JSIDBTransaction.cpp */; };
 		B691C1F91206D4A00025D980 /* IDBDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A6A311D4FB3D004C3E4B /* IDBDatabase.cpp */; };
 		B71FE6DF11091CB300DAEF77 /* PrintContext.h in Headers */ = {isa = PBXBuildFile; fileRef = B776D43A1104525D00BEB0EC /* PrintContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B734B181119B9911006587BD /* FontTranscoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B734B180119B9911006587BD /* FontTranscoder.cpp */; };
@@ -10024,6 +10028,12 @@
 		B5D36019112F8B560048DEA8 /* DatabaseCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseCallback.h; sourceTree = "<group>"; };
 		B61762531203374F00EF9114 /* IDBDatabaseBackendInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackendInterface.h; sourceTree = "<group>"; };
 		B61762611203490800EF9114 /* IDBDatabaseBackendImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackendImpl.h; sourceTree = "<group>"; };
+		B6566267120B115A006EA85C /* IDBTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransaction.cpp; sourceTree = "<group>"; };
+		B6566268120B115A006EA85C /* IDBTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransaction.h; sourceTree = "<group>"; };
+		B6566269120B115A006EA85C /* IDBTransaction.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBTransaction.idl; sourceTree = "<group>"; };
+		B656626D120B116B006EA85C /* IDBTransactionBackendInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionBackendInterface.h; sourceTree = "<group>"; };
+		B656626E120B1227006EA85C /* JSIDBTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSIDBTransaction.h; path = ../WebKitBuild/Debug/DerivedSources/WebCore/JSIDBTransaction.h; sourceTree = SOURCE_ROOT; };
+		B656626F120B1227006EA85C /* JSIDBTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSIDBTransaction.cpp; path = ../WebKitBuild/Debug/DerivedSources/WebCore/JSIDBTransaction.cpp; sourceTree = SOURCE_ROOT; };
 		B734B180119B9911006587BD /* FontTranscoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FontTranscoder.cpp; path = transcoder/FontTranscoder.cpp; sourceTree = "<group>"; };
 		B734B182119B991D006587BD /* FontTranscoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FontTranscoder.h; path = transcoder/FontTranscoder.h; sourceTree = "<group>"; };
 		B776D43A1104525D00BEB0EC /* PrintContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrintContext.h; sourceTree = "<group>"; };
@@ -11439,6 +11449,10 @@
 				C585A6C211D4FB3D004C3E4B /* IDBSuccessEvent.cpp */,
 				C585A6C311D4FB3D004C3E4B /* IDBSuccessEvent.h */,
 				C585A6C411D4FB3D004C3E4B /* IDBSuccessEvent.idl */,
+				B656626D120B116B006EA85C /* IDBTransactionBackendInterface.h */,
+				B6566267120B115A006EA85C /* IDBTransaction.cpp */,
+				B6566268120B115A006EA85C /* IDBTransaction.h */,
+				B6566269120B115A006EA85C /* IDBTransaction.idl */,
 				511F23130DC160DA004F0032 /* LocalStorageTask.cpp */,
 				511F23140DC160DA004F0032 /* LocalStorageTask.h */,
 				511F23150DC160DA004F0032 /* LocalStorageThread.cpp */,
@@ -14876,6 +14890,8 @@
 				C585A67911D4FB07004C3E4B /* JSIDBRequest.h */,
 				C585A67A11D4FB07004C3E4B /* JSIDBSuccessEvent.cpp */,
 				C585A67B11D4FB07004C3E4B /* JSIDBSuccessEvent.h */,
+				B656626E120B1227006EA85C /* JSIDBTransaction.h */,
+				B656626F120B1227006EA85C /* JSIDBTransaction.cpp */,
 				514C76350CE9225E007EF3CD /* JSSQLError.cpp */,
 				BC8243250D0CE8A200460C8F /* JSSQLError.h */,
 				B525A96411CA2340003A23A8 /* JSSQLException.cpp */,
@@ -19986,6 +20002,8 @@
 				E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
 				97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
 				CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */,
+				B656626B120B115A006EA85C /* IDBTransaction.h in Headers */,
+				B6566270120B1227006EA85C /* JSIDBTransaction.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -22391,6 +22409,8 @@
 				E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
 				97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
 				A8BCFD05120A046100B5F122 /* SVGPathSeg.cpp in Sources */,
+				B656626A120B115A006EA85C /* IDBTransaction.cpp in Sources */,
+				B6566271120B1227006EA85C /* JSIDBTransaction.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/bindings/js/IDBBindingUtilities.h b/WebCore/bindings/js/IDBBindingUtilities.h
index 1e8270b..7e72152 100644
--- a/WebCore/bindings/js/IDBBindingUtilities.h
+++ b/WebCore/bindings/js/IDBBindingUtilities.h
@@ -28,6 +28,7 @@
 
 #if ENABLE(INDEXED_DATABASE)
 
+#include "ScriptValue.h" 
 #include <wtf/Forward.h>
 
 namespace WebCore {
diff --git a/WebCore/dom/EventNames.h b/WebCore/dom/EventNames.h
index 6620cec..1b97d65 100644
--- a/WebCore/dom/EventNames.h
+++ b/WebCore/dom/EventNames.h
@@ -42,6 +42,7 @@ namespace WebCore {
     macro(checking) \
     macro(click) \
     macro(close) \
+    macro(complete) \
     macro(compositionend) \
     macro(compositionstart) \
     macro(compositionupdate) \
@@ -150,6 +151,8 @@ namespace WebCore {
     \
     macro(orientationchange) \
     \
+    macro(timeout) \
+    \
     macro(touchstart) \
     macro(touchmove) \
     macro(touchend) \
diff --git a/WebCore/storage/IDBDatabase.cpp b/WebCore/storage/IDBDatabase.cpp
index e4d4385..fa1807c 100644
--- a/WebCore/storage/IDBDatabase.cpp
+++ b/WebCore/storage/IDBDatabase.cpp
@@ -30,6 +30,7 @@
 #include "IDBFactoryBackendInterface.h"
 #include "IDBObjectStore.h"
 #include "IDBRequest.h"
+#include "IDBTransaction.h"
 #include "ScriptExecutionContext.h"
 
 #if ENABLE(INDEXED_DATABASE)
@@ -68,6 +69,16 @@ PassRefPtr<IDBRequest> IDBDatabase::removeObjectStore(ScriptExecutionContext* co
     return request;
 }
 
+PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, DOMStringList* storeNames, unsigned short mode, unsigned long timeout)
+{
+    // We need to create a new transaction synchronously. Locks are acquired asynchronously. Operations
+    // can be queued against the transaction at any point. They will start executing as soon as the
+    // appropriate locks have been acquired.
+    RefPtr<IDBTransactionBackendInterface> transactionBackend = m_backend->transaction(storeNames, mode, timeout);
+    RefPtr<IDBTransaction> transaction = IDBTransaction::create(context, transactionBackend.release(), this);
+    return transaction.release();
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebCore/storage/IDBDatabase.h b/WebCore/storage/IDBDatabase.h
index cca20e3..6900efd 100644
--- a/WebCore/storage/IDBDatabase.h
+++ b/WebCore/storage/IDBDatabase.h
@@ -28,6 +28,7 @@
 
 #include "DOMStringList.h"
 #include "IDBDatabaseBackendInterface.h"
+#include "IDBTransaction.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -56,9 +57,10 @@ public:
     PassRefPtr<DOMStringList> objectStores() const { return m_backend->objectStores(); }
 
     PassRefPtr<IDBRequest> createObjectStore(ScriptExecutionContext*, const String& name, const String& keyPath = String(), bool autoIncrement = false);
-    PassRefPtr<IDBObjectStore> objectStore(const String& name, unsigned short mode = 0); // FIXME: Use constant rather than 0.
+    PassRefPtr<IDBObjectStore> objectStore(const String& name, unsigned short mode = IDBTransaction::READ_ONLY);
     PassRefPtr<IDBRequest> removeObjectStore(ScriptExecutionContext*, const String& name);
-
+    PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, DOMStringList* storeNames = 0, unsigned short mode = IDBTransaction::READ_ONLY,
+                                           unsigned long timeout = 0); // FIXME: what should the default timeout be?
 private:
     IDBDatabase(PassRefPtr<IDBDatabaseBackendInterface>);
 
diff --git a/WebCore/storage/IDBDatabase.idl b/WebCore/storage/IDBDatabase.idl
index d75ed55..4e3f620 100644
--- a/WebCore/storage/IDBDatabase.idl
+++ b/WebCore/storage/IDBDatabase.idl
@@ -33,13 +33,13 @@ module storage {
         readonly attribute DOMString version;
         readonly attribute DOMStringList objectStores;
 
-        // FIXME: Add transaction.
         // FIXME: Add setVersion.
 
         [CallWith=ScriptExecutionContext] IDBRequest createObjectStore(in DOMString name, in [Optional, ConvertNullToNullString] DOMString keyPath, in [Optional] boolean autoIncrement);
         // FIXME: objectStore needs to be able to raise an IDBDatabaseException.
         IDBObjectStore objectStore(in DOMString name, in [Optional] unsigned short mode);
         [CallWith=ScriptExecutionContext] IDBRequest removeObjectStore(in DOMString name);
+        [CallWith=ScriptExecutionContext] IDBTransaction transaction (in [Optional] DOMStringList storeNames, in [Optional] unsigned short mode, in [Optional] unsigned long timeout);
     };
 
 }
diff --git a/WebCore/storage/IDBDatabaseBackendImpl.cpp b/WebCore/storage/IDBDatabaseBackendImpl.cpp
index 86228bd..09b9dee 100644
--- a/WebCore/storage/IDBDatabaseBackendImpl.cpp
+++ b/WebCore/storage/IDBDatabaseBackendImpl.cpp
@@ -83,6 +83,13 @@ void IDBDatabaseBackendImpl::removeObjectStore(const String& name, PassRefPtr<ID
     callbacks->onSuccess();
 }
 
+PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendImpl::transaction(DOMStringList*, unsigned short, unsigned long)
+{
+    // FIXME: Ask the transaction manager for a new IDBTransactionBackendImpl.
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebCore/storage/IDBDatabaseBackendImpl.h b/WebCore/storage/IDBDatabaseBackendImpl.h
index 87e070a..f6ff058 100644
--- a/WebCore/storage/IDBDatabaseBackendImpl.h
+++ b/WebCore/storage/IDBDatabaseBackendImpl.h
@@ -52,7 +52,7 @@ public:
     virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>);
     virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode);
     virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>);
-
+    virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout);
 private:
     IDBDatabaseBackendImpl(const String& name, const String& description, const String& version);
 
diff --git a/WebCore/storage/IDBDatabaseBackendInterface.h b/WebCore/storage/IDBDatabaseBackendInterface.h
index c2b08f1..ac12bf1 100644
--- a/WebCore/storage/IDBDatabaseBackendInterface.h
+++ b/WebCore/storage/IDBDatabaseBackendInterface.h
@@ -38,6 +38,7 @@ class DOMStringList;
 class Frame;
 class IDBCallbacks;
 class IDBObjectStoreBackendInterface;
+class IDBTransactionBackendInterface;
 
 // This class is shared by IDBDatabase (async) and IDBDatabaseSync (sync).
 // This is implemented by IDBDatabaseBackendImpl and optionally others (in order to proxy
@@ -57,6 +58,7 @@ public:
     virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>) = 0;
     virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode) = 0;
     virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>) = 0;
+    virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout) = 0;
 };
 
 } // namespace WebCore
diff --git a/WebCore/storage/IDBRequest.cpp b/WebCore/storage/IDBRequest.cpp
index c29fc5b..e902d20 100644
--- a/WebCore/storage/IDBRequest.cpp
+++ b/WebCore/storage/IDBRequest.cpp
@@ -49,7 +49,6 @@ IDBRequest::IDBRequest(ScriptExecutionContext* context, PassRefPtr<IDBAny> sourc
     , m_source(source)
     , m_result(IDBAny::create())
     , m_timer(this, &IDBRequest::timerFired)
-    , m_stopped(false)
     , m_aborted(false)
     , m_readyState(INITIAL)
 {
@@ -115,24 +114,11 @@ ScriptExecutionContext* IDBRequest::scriptExecutionContext() const
     return ActiveDOMObject::scriptExecutionContext();
 }
 
-void IDBRequest::stop()
+bool IDBRequest::canSuspend() const
 {
-    abort();
-    m_selfRef = 0; // Could trigger a delete.
-}
-
-void IDBRequest::suspend()
-{
-    m_timer.stop();
-    m_stopped = true;
-}
-
-void IDBRequest::resume()
-{
-    m_stopped = false;
-    // We only hold our self ref when we're waiting to dispatch an event.
-    if (m_selfRef && !m_aborted)
-        m_timer.startOneShot(0);
+    // IDBTransactions cannot be suspended at the moment. We therefore
+    // disallow the back/forward cache for pages that use IndexedDatabase.
+    return false;
 }
 
 EventTargetData* IDBRequest::eventTargetData()
@@ -149,7 +135,6 @@ void IDBRequest::timerFired(Timer<IDBRequest>*)
 {
     ASSERT(m_readyState == DONE);
     ASSERT(m_selfRef);
-    ASSERT(!m_stopped);
     ASSERT(!m_aborted);
 
     // We need to keep self-referencing ourself, otherwise it's possible we'll be deleted.
@@ -179,8 +164,7 @@ void IDBRequest::onEventCommon()
 
     m_readyState = DONE;
     m_selfRef = this;
-    if (!m_stopped)
-        m_timer.startOneShot(0);
+    m_timer.startOneShot(0);
 }
 
 } // namespace WebCore
diff --git a/WebCore/storage/IDBRequest.h b/WebCore/storage/IDBRequest.h
index d38da57..d7531c2 100644
--- a/WebCore/storage/IDBRequest.h
+++ b/WebCore/storage/IDBRequest.h
@@ -73,9 +73,7 @@ public:
 
     // ActiveDOMObject
     virtual ScriptExecutionContext* scriptExecutionContext() const;
-    virtual void stop();
-    virtual void suspend();
-    virtual void resume();
+    virtual bool canSuspend() const;
 
     using RefCounted<IDBCallbacks>::ref;
     using RefCounted<IDBCallbacks>::deref;
@@ -101,7 +99,6 @@ private:
     Timer<IDBRequest> m_timer;
     RefPtr<IDBRequest> m_selfRef; // This is set to us iff there's an event pending.
 
-    bool m_stopped;
     bool m_aborted;
     ReadyState m_readyState;
     EventTargetData m_eventTargetData;
diff --git a/WebCore/storage/IDBTransaction.cpp b/WebCore/storage/IDBTransaction.cpp
new file mode 100644
index 0000000..1bc059a
--- /dev/null
+++ b/WebCore/storage/IDBTransaction.cpp
@@ -0,0 +1,72 @@
+#include "config.h"
+#include "IDBTransaction.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "Event.h"
+#include "EventException.h"
+#include "IDBDatabase.h"
+#include "IDBObjectStore.h"
+#include "IDBObjectStoreBackendInterface.h"
+#include "ScriptExecutionContext.h"
+
+namespace WebCore {
+
+IDBTransaction::IDBTransaction(ScriptExecutionContext* context, PassRefPtr<IDBTransactionBackendInterface> backend, IDBDatabase* db)
+    : ActiveDOMObject(context, this)
+    , m_backend(backend)
+    , m_database(db)
+{
+}
+
+IDBTransaction::~IDBTransaction()
+{
+}
+
+unsigned short IDBTransaction::mode() const
+{
+    return m_backend->mode();
+}
+
+IDBDatabase* IDBTransaction::db()
+{
+    return m_database.get();
+}
+
+PassRefPtr<IDBObjectStore> IDBTransaction::objectStore(const String& name, const ExceptionCode&)
+{
+    RefPtr<IDBObjectStoreBackendInterface> objectStoreBackend = m_backend->objectStore(name);
+    RefPtr<IDBObjectStore> objectStore = IDBObjectStore::create(objectStoreBackend);
+    return objectStore.release();
+}
+
+void IDBTransaction::abort()
+{
+    m_backend->abort();
+}
+
+ScriptExecutionContext* IDBTransaction::scriptExecutionContext() const
+{
+    return ActiveDOMObject::scriptExecutionContext();
+}
+
+bool IDBTransaction::canSuspend() const
+{
+    // We may be in the middle of a transaction so we cannot suspend our object.
+    // Instead, we simply don't allow the owner page to go into the back/forward cache.
+    return false;
+}
+
+EventTargetData* IDBTransaction::eventTargetData()
+{
+    return &m_eventTargetData;
+}
+
+EventTargetData* IDBTransaction::ensureEventTargetData()
+{
+    return &m_eventTargetData;
+}
+
+}
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebCore/storage/IDBTransaction.h b/WebCore/storage/IDBTransaction.h
new file mode 100644
index 0000000..2e3167c
--- /dev/null
+++ b/WebCore/storage/IDBTransaction.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef IDBTransaction_h
+#define IDBTransaction_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "ActiveDOMObject.h"
+#include "DOMStringList.h"
+#include "EventListener.h"
+#include "EventNames.h"
+#include "EventTarget.h"
+#include "IDBTransactionBackendInterface.h"
+
+namespace WebCore {
+
+class IDBDatabase;
+class IDBObjectStore;
+
+class IDBTransaction : public EventTarget, public ActiveDOMObject {
+public:
+    static PassRefPtr<IDBTransaction> create(ScriptExecutionContext* context, PassRefPtr<IDBTransactionBackendInterface> backend, IDBDatabase* db)
+    { 
+        return adoptRef(new IDBTransaction(context, backend, db)); 
+    }
+    virtual ~IDBTransaction();
+
+    enum Mode {
+        READ_WRITE = 0,
+        READ_ONLY = 1,
+        SNAPSHOT_READ = 2
+    };
+
+    unsigned short mode() const;
+    IDBDatabase* db();
+    PassRefPtr<IDBObjectStore> objectStore(const String& name, const ExceptionCode&);
+    void abort();
+
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(complete);
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(timeout);
+
+    // EventTarget
+    virtual IDBTransaction* toIDBTransaction() { return this; }
+
+    // ActiveDOMObject
+    virtual ScriptExecutionContext* scriptExecutionContext() const;
+    virtual bool canSuspend() const;
+
+private:
+    IDBTransaction(ScriptExecutionContext*, PassRefPtr<IDBTransactionBackendInterface>, IDBDatabase*);
+
+    // EventTarget
+    virtual void refEventTarget() { ref(); }
+    virtual void derefEventTarget() { deref(); }
+    virtual EventTargetData* eventTargetData();
+    virtual EventTargetData* ensureEventTargetData();
+
+    EventTargetData m_eventTargetData;
+    RefPtr<IDBTransactionBackendInterface> m_backend;
+    RefPtr<IDBDatabase> m_database;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // IDBTransaction_h
diff --git a/WebCore/storage/IDBTransaction.idl b/WebCore/storage/IDBTransaction.idl
new file mode 100644
index 0000000..a3907dc
--- /dev/null
+++ b/WebCore/storage/IDBTransaction.idl
@@ -0,0 +1,57 @@
+ /*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+
+    interface [
+        Conditional=INDEXED_DATABASE,
+        EventTarget
+    ] IDBTransaction {
+        // Modes
+        const unsigned short READ_WRITE = 0;
+        const unsigned short READ_ONLY = 1;
+        const unsigned short SNAPSHOT_READ = 2;
+        // Properties
+        readonly attribute unsigned short mode;
+        readonly attribute IDBDatabase db;
+        // Methods
+        IDBObjectStore objectStore (in DOMString name)
+            raises (IDBDatabaseException);
+        void abort ();
+        // Events
+        attribute EventListener onabort;
+        attribute EventListener oncomplete;
+        attribute EventListener ontimeout;
+        // EventTarget interface
+        void addEventListener(in DOMString type,
+                              in EventListener listener,
+                              in boolean useCapture);
+        void removeEventListener(in DOMString type,
+                                 in EventListener listener,
+                                 in boolean useCapture);
+        boolean dispatchEvent(in Event evt) 
+            raises(EventException);
+    };
+}
diff --git a/WebCore/storage/IDBTransactionBackendInterface.h b/WebCore/storage/IDBTransactionBackendInterface.h
new file mode 100644
index 0000000..dff2bd7
--- /dev/null
+++ b/WebCore/storage/IDBTransactionBackendInterface.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef IDBTransactionBackendInterface_h
+#define IDBTransactionBackendInterface_h
+
+#include "ExceptionCode.h"
+#include "IDBCallbacks.h"
+#include "PlatformString.h"
+#include "ScriptExecutionContext.h"
+#include <wtf/Threading.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBObjectStoreBackendInterface;
+class SQLiteDatabase;
+
+// This class is shared by IDBTransaction (async) and IDBTransactionSync (sync).
+// This is implemented by IDBTransactionBackendImpl and optionally others (in order to proxy
+// calls across process barriers). All calls to these classes should be non-blocking and
+// trigger work on a background thread if necessary.
+class IDBTransactionBackendInterface : public ThreadSafeShared<IDBTransactionBackendInterface> {
+public:
+    virtual ~IDBTransactionBackendInterface() { }
+
+    virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name) = 0;
+    virtual unsigned short mode() const = 0;
+    virtual void scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>) = 0;
+    virtual void abort() = 0;
+    virtual SQLiteDatabase* sqliteDatabase() = 0;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBTransactionBackendInterface_h
+
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 23cbca8..e198f2a 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-05  Andrei Popescu  <andreip at dhcp-172-16-14-12.lon.corp.google.com>
+
+        Reviewed by Jeremy Orlow.
+
+        [IndexedDB] IndexedDB is missing the Transaction interface.
+        https://bugs.webkit.org/show_bug.cgi?id=42970
+
+        Add IDBTransaction boilerplate.
+
+        * src/IDBDatabaseProxy.cpp:
+        (WebCore::IDBDatabaseProxy::transaction):
+        * src/IDBDatabaseProxy.h:
+
 2010-08-05  Gavin Barraclough  <barraclough at apple.com>
 
         Rubber stamped by Sam Weinig
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp
index f995b3c..d11d182 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -29,6 +29,7 @@
 #include "DOMStringList.h"
 #include "IDBCallbacks.h"
 #include "IDBObjectStoreProxy.h"
+#include "IDBTransactionBackendInterface.h"
 #include "WebFrameImpl.h"
 #include "WebIDBCallbacksImpl.h"
 #include "WebIDBDatabase.h"
@@ -91,6 +92,13 @@ void IDBDatabaseProxy::removeObjectStore(const String& name, PassRefPtr<IDBCallb
     m_webIDBDatabase->removeObjectStore(name, new WebIDBCallbacksImpl(callbacks));
 }
 
+PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout)
+{
+    // FIXME: plumb to the browser process, etc etc.
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h
index 03311f2..ed2016a 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -52,6 +52,7 @@ public:
     virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>);
     virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode);
     virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>);
+    virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout);
 
 private:
     IDBDatabaseProxy(PassOwnPtr<WebKit::WebIDBDatabase>);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list