Changeset 61120 in webkit
- Timestamp:
- Jun 14, 2010 6:42:54 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 17 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r61117 r61120 1 2010-06-08 Marcus Bulach <bulach@chromium.org> 2 3 Reviewed by Jeremy Orlow. 4 5 Adds IndexedDB's KeyRange. 6 https://bugs.webkit.org/show_bug.cgi?id=40250 7 8 * storage/indexeddb/idb-keyrange-expected.txt: Added. 9 * storage/indexeddb/idb-keyrange.html: Added. 10 * storage/indexeddb/script-tests/idb-keyrange.js: Added. 11 (checkSingleKeyRange): 12 (checkLeftBoundKeyRange): 13 (): 14 1 15 2010-06-14 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> 2 16 -
trunk/WebCore/Android.derived.jscbindings.mk
r60624 r61120 366 366 $(intermediates)/storage/JSIDBEvent.h \ 367 367 $(intermediates)/storage/JSIDBIndexRequest.h \ 368 $(intermediates)/storage/JSIDBKeyRange.h \ 368 369 $(intermediates)/storage/JSIDBRequest.h \ 369 370 $(intermediates)/storage/JSIDBSuccessEvent.h \ -
trunk/WebCore/Android.derived.v8bindings.mk
r60777 r61120 347 347 $(intermediates)/bindings/V8IDBEvent.h \ 348 348 $(intermediates)/bindings/V8IDBIndexRequest.h \ 349 $(intermediates)/bindings/V8IDBKeyRange.h \ 349 350 $(intermediates)/bindings/V8IDBRequest.h \ 350 351 $(intermediates)/bindings/V8IDBSuccessEvent.h \ -
trunk/WebCore/Android.mk
r61107 r61120 721 721 storage/IDBIndexImpl.cpp \ 722 722 storage/IDBIndexRequest.cpp \ 723 storage/IDBKeyRange.cpp \ 723 724 storage/IDBObjectStoreImpl.cpp \ 724 725 storage/IDBObjectStoreRequest.cpp \ -
trunk/WebCore/CMakeLists.txt
r61107 r61120 330 330 storage/IDBEvent.idl 331 331 storage/IDBIndexRequest.idl 332 storage/IDBKeyRange.idl 332 333 storage/IDBObjectStoreRequest.idl 333 334 storage/IDBRequest.idl … … 1376 1377 storage/IDBErrorEvent.cpp 1377 1378 storage/IDBEvent.cpp 1379 storage/IDBKeyRange.cpp 1378 1380 storage/IDBRequest.cpp 1379 1381 storage/IDBObjectStoreImpl.cpp -
trunk/WebCore/ChangeLog
r61119 r61120 1 2010-06-08 Marcus Bulach <bulach@chromium.org> 2 3 Reviewed by Jeremy Orlow. 4 5 Adds IndexedDB's KeyRange. 6 https://bugs.webkit.org/show_bug.cgi?id=40250 7 8 Test: storage/indexeddb/idb-keyrange.html 9 10 * Android.derived.jscbindings.mk: 11 * Android.derived.v8bindings.mk: 12 * Android.mk: 13 * CMakeLists.txt: 14 * DerivedSources.cpp: 15 * DerivedSources.make: 16 * GNUmakefile.am: 17 * WebCore.gypi: 18 * WebCore.pri: 19 * WebCore.pro: 20 * WebCore.vcproj/WebCore.vcproj: 21 * WebCore.xcodeproj/project.pbxproj: 22 * storage/IDBKeyRange.cpp: Added. 23 (WebCore::IDBKeyRange::IDBKeyRange): 24 * storage/IDBKeyRange.h: Added. 25 (WebCore::IDBKeyRange::): 26 (WebCore::IDBKeyRange::create): 27 (WebCore::IDBKeyRange::~IDBKeyRange): 28 (WebCore::IDBKeyRange::left): 29 (WebCore::IDBKeyRange::right): 30 (WebCore::IDBKeyRange::flags): 31 * storage/IDBKeyRange.idl: Added. 32 * storage/IndexedDatabaseRequest.cpp: 33 (WebCore::IndexedDatabaseRequest::makeSingleKeyRange): 34 (WebCore::IndexedDatabaseRequest::makeLeftBoundKeyRange): 35 (WebCore::IndexedDatabaseRequest::makeRightBoundKeyRange): 36 (WebCore::IndexedDatabaseRequest::makeBoundKeyRange): 37 * storage/IndexedDatabaseRequest.h: 38 * storage/IndexedDatabaseRequest.idl: 39 1 40 2010-06-14 Jeremy Orlow <jorlow@chromium.org> 2 41 -
trunk/WebCore/DerivedSources.cpp
r60624 r61120 176 176 #include "JSIDBEvent.cpp" 177 177 #include "JSIDBIndexRequest.cpp" 178 #include "JSIDBKeyRange.cpp" 178 179 #include "JSIDBObjectStoreRequest.cpp" 179 180 #include "JSIDBRequest.cpp" -
trunk/WebCore/DerivedSources.make
r61091 r61120 219 219 IDBEvent \ 220 220 IDBIndexRequest \ 221 IDBKeyRange \ 221 222 IDBObjectStoreRequest \ 222 223 IDBRequest \ -
trunk/WebCore/GNUmakefile.am
r61107 r61120 2501 2501 WebCore/storage/IDBEvent.idl \ 2502 2502 WebCore/storage/IDBIndexRequest.idl \ 2503 WebCore/storage/IDBKeyRange.idl \ 2503 2504 WebCore/storage/IDBObjectStoreRequest.idl \ 2504 2505 WebCore/storage/IDBRequest.idl \ … … 2529 2530 WebCore/storage/IDBIndexRequest.cpp \ 2530 2531 WebCore/storage/IDBIndexRequest.h \ 2532 WebCore/storage/IDBKeyRange.cpp \ 2533 WebCore/storage/IDBKeyRange.h \ 2531 2534 WebCore/storage/IDBObjectStore.h \ 2532 2535 WebCore/storage/IDBObjectStoreImpl.cpp \ -
trunk/WebCore/WebCore.gypi
r61107 r61120 233 233 'storage/IDBEvent.idl', 234 234 'storage/IDBIndexRequest.idl', 235 'storage/IDBKeyRange.idl', 235 236 'storage/IDBObjectStoreRequest.idl', 236 237 'storage/IDBRequest.idl', … … 3391 3392 'storage/IDBIndexRequest.cpp', 3392 3393 'storage/IDBIndexRequest.h', 3394 'storage/IDBKeyRange.cpp', 3395 'storage/IDBKeyRange.h', 3393 3396 'storage/IDBObjectStore.h', 3394 3397 'storage/IDBObjectStoreImpl.cpp', -
trunk/WebCore/WebCore.pri
r61117 r61120 464 464 storage/IDBEvent.idl \ 465 465 storage/IDBIndexRequest.idl \ 466 storage/IDBKeyRange.idl \ 466 467 storage/IDBObjectStoreRequest.idl \ 467 468 storage/IDBRequest.idl \ -
trunk/WebCore/WebCore.pro
r61117 r61120 2361 2361 storage/IDBIndexImpl.h \ 2362 2362 storage/IDBIndexRequest.h \ 2363 storage/IDBKeyRange.h \ 2363 2364 storage/IDBObjectStore.h \ 2364 2365 storage/IDBObjectStoreImpl.h \ … … 2379 2380 storage/IDBIndexImpl.cpp \ 2380 2381 storage/IDBIndexRequest.cpp \ 2382 storage/IDBKeyRange.cpp \ 2381 2383 storage/IDBObjectStoreImpl.cpp \ 2382 2384 storage/IDBObjectStoreRequest.cpp \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r61107 r61120 41065 41065 </File> 41066 41066 <File 41067 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKeyRange.cpp" 41068 > 41069 <FileConfiguration 41070 Name="Debug|Win32" 41071 ExcludedFromBuild="true" 41072 > 41073 <Tool 41074 Name="VCCLCompilerTool" 41075 /> 41076 </FileConfiguration> 41077 <FileConfiguration 41078 Name="Release|Win32" 41079 ExcludedFromBuild="true" 41080 > 41081 <Tool 41082 Name="VCCLCompilerTool" 41083 /> 41084 </FileConfiguration> 41085 <FileConfiguration 41086 Name="Debug_Internal|Win32" 41087 ExcludedFromBuild="true" 41088 > 41089 <Tool 41090 Name="VCCLCompilerTool" 41091 /> 41092 </FileConfiguration> 41093 <FileConfiguration 41094 Name="Debug_Cairo|Win32" 41095 ExcludedFromBuild="true" 41096 > 41097 <Tool 41098 Name="VCCLCompilerTool" 41099 /> 41100 </FileConfiguration> 41101 <FileConfiguration 41102 Name="Release_Cairo|Win32" 41103 ExcludedFromBuild="true" 41104 > 41105 <Tool 41106 Name="VCCLCompilerTool" 41107 /> 41108 </FileConfiguration> 41109 <FileConfiguration 41110 Name="Debug_All|Win32" 41111 ExcludedFromBuild="true" 41112 > 41113 <Tool 41114 Name="VCCLCompilerTool" 41115 /> 41116 </FileConfiguration> 41117 </File> 41118 <File 41119 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKeyRange.h" 41120 > 41121 </File> 41122 <File 41067 41123 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBObjectStoreRequest.cpp" 41068 41124 > … … 46513 46569 > 46514 46570 </File> 46571 <File 46572 RelativePath="..\storage\IDBKeyRange.cpp" 46573 > 46574 </File> 46575 <File 46576 RelativePath="..\storage\IDBKeyRange.h" 46577 > 46578 </File> 46515 46579 <File 46516 46580 RelativePath="..\storage\IDBObjectStore.h" -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r61107 r61120 1372 1372 7AFD4A8B1131C2760035B883 /* ScriptBreakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFD4A8A1131C2760035B883 /* ScriptBreakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1373 1373 7AFD4FF4113277B60035B883 /* ScriptDebugListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFD4FF3113277B60035B883 /* ScriptDebugListener.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1374 816C806811BE887E009A45E9 /* IDBKeyRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 816C806611BE887E009A45E9 /* IDBKeyRange.cpp */; }; 1375 816C806911BE887E009A45E9 /* IDBKeyRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 816C806711BE887E009A45E9 /* IDBKeyRange.h */; }; 1376 816C80AF11BE990D009A45E9 /* JSIDBKeyRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 816C80AE11BE990D009A45E9 /* JSIDBKeyRange.h */; }; 1377 816C80B111BE9934009A45E9 /* JSIDBKeyRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 816C80B011BE9934009A45E9 /* JSIDBKeyRange.cpp */; }; 1374 1378 82B658981189E39200E052A1 /* InspectorCSSStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 82B658971189E39200E052A1 /* InspectorCSSStore.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1375 1379 82B6589A1189E47600E052A1 /* InspectorCSSStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 82B658991189E47600E052A1 /* InspectorCSSStore.cpp */; }; … … 7039 7043 7AFD4A8A1131C2760035B883 /* ScriptBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptBreakpoint.h; sourceTree = "<group>"; }; 7040 7044 7AFD4FF3113277B60035B883 /* ScriptDebugListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugListener.h; sourceTree = "<group>"; }; 7045 816C806611BE887E009A45E9 /* IDBKeyRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBKeyRange.cpp; sourceTree = "<group>"; }; 7046 816C806711BE887E009A45E9 /* IDBKeyRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBKeyRange.h; sourceTree = "<group>"; }; 7047 816C80AE11BE990D009A45E9 /* JSIDBKeyRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDBKeyRange.h; sourceTree = "<group>"; }; 7048 816C80B011BE9934009A45E9 /* JSIDBKeyRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBKeyRange.cpp; sourceTree = "<group>"; }; 7049 81CC114011BEAA9D00D0D856 /* IDBKeyRange.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBKeyRange.idl; sourceTree = "<group>"; }; 7041 7050 82B658971189E39200E052A1 /* InspectorCSSStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorCSSStore.h; sourceTree = "<group>"; }; 7042 7051 82B658991189E47600E052A1 /* InspectorCSSStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorCSSStore.cpp; sourceTree = "<group>"; }; … … 11053 11062 isa = PBXGroup; 11054 11063 children = ( 11064 81CC114011BEAA9D00D0D856 /* IDBKeyRange.idl */, 11065 816C806611BE887E009A45E9 /* IDBKeyRange.cpp */, 11066 816C806711BE887E009A45E9 /* IDBKeyRange.h */, 11067 B6B0540711B68F10002564C5 /* IDBObjectStoreImpl.cpp */, 11068 B6B0540811B68F10002564C5 /* IDBObjectStoreImpl.h */, 11069 B6693EEF11AD63F6003F2770 /* IDBObjectStoreRequest.idl */, 11070 B6693EE811AD63E6003F2770 /* IDBObjectStore.h */, 11071 B6693EE911AD63E6003F2770 /* IDBObjectStoreRequest.cpp */, 11072 B6693EEA11AD63E6003F2770 /* IDBObjectStoreRequest.h */, 11055 11073 B5B5DC67119BB3D5002A8790 /* AbstractDatabase.cpp */, 11056 11074 B5B5DC68119BB3D5002A8790 /* AbstractDatabase.h */, … … 14516 14534 51E0BAE80DA55D4A00A9E417 /* JSStorageEvent.cpp */, 14517 14535 51E0BAE90DA55D4A00A9E417 /* JSStorageEvent.h */, 14536 816C80AE11BE990D009A45E9 /* JSIDBKeyRange.h */, 14537 816C80B011BE9934009A45E9 /* JSIDBKeyRange.cpp */, 14518 14538 ); 14519 14539 name = Storage; … … 19474 19494 97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */, 19475 19495 CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */, 19496 B6693EEC11AD63E6003F2770 /* IDBObjectStore.h in Headers */, 19497 B6693EEE11AD63E6003F2770 /* IDBObjectStoreRequest.h in Headers */, 19498 B6693EF311AD6486003F2770 /* JSIDBObjectStoreRequest.h in Headers */, 19499 C51DA9A511AEF2C1009799C5 /* IDBIndex.h in Headers */, 19500 C51DA9A711AEF2C1009799C5 /* IDBIndexImpl.h in Headers */, 19501 C51DA9A911AEF2C1009799C5 /* IDBIndexRequest.h in Headers */, 19502 C5BBC9D111AEF838007C2BFE /* JSIDBIndexRequest.h in Headers */, 19503 B6B0540A11B68F10002564C5 /* IDBObjectStoreImpl.h in Headers */, 19504 816C806911BE887E009A45E9 /* IDBKeyRange.h in Headers */, 19505 816C80AF11BE990D009A45E9 /* JSIDBKeyRange.h in Headers */, 19476 19506 ); 19477 19507 runOnlyForDeploymentPostprocessing = 0; … … 21780 21810 E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */, 21781 21811 97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */, 21812 B6693EED11AD63E6003F2770 /* IDBObjectStoreRequest.cpp in Sources */, 21813 B6693EF211AD6486003F2770 /* JSIDBObjectStoreRequest.cpp in Sources */, 21814 B627FB2D11AD743500E97B72 /* IDBDatabaseImpl.cpp in Sources */, 21815 C51DA9A611AEF2C1009799C5 /* IDBIndexImpl.cpp in Sources */, 21816 C51DA9A811AEF2C1009799C5 /* IDBIndexRequest.cpp in Sources */, 21817 C5BBC9D011AEF838007C2BFE /* JSIDBIndexRequest.cpp in Sources */, 21818 B6B0540911B68F10002564C5 /* IDBObjectStoreImpl.cpp in Sources */, 21819 816C806811BE887E009A45E9 /* IDBKeyRange.cpp in Sources */, 21820 816C80B111BE9934009A45E9 /* JSIDBKeyRange.cpp in Sources */, 21782 21821 ); 21783 21822 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/storage/IDBKeyRange.cpp
r61119 r61120 24 24 */ 25 25 26 module storage { 26 #include "config.h" 27 #include "IDBKeyRange.h" 27 28 28 interface [ 29 Conditional=INDEXED_DATABASE 30 ] IndexedDatabaseRequest { 31 [CallWith=ScriptExecutionContext] IDBRequest open(in DOMString name, in DOMString description); 32 }; 29 #include "IDBAny.h" 30 #include "SerializedScriptValue.h" 33 31 32 #if ENABLE(INDEXED_DATABASE) 33 34 namespace WebCore { 35 36 IDBKeyRange::IDBKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, unsigned short flags) 37 : m_left(IDBAny::create()) 38 , m_right(IDBAny::create()) 39 , m_flags(flags) 40 { 41 m_left->set(left); 42 m_right->set(right); 34 43 } 44 45 } // namespace WebCore 46 47 #endif // ENABLE(INDEXED_DATABASE) -
trunk/WebCore/storage/IDBKeyRange.h
r61119 r61120 11 11 * notice, this list of conditions and the following disclaimer in the 12 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of14 * its contributors may be used to endorse or promote products derived15 * from this software without specific prior written permission.16 13 * 17 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 26 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 24 */ 28 #ifndef IndexedDatabaseRequest_h29 #define IndexedDatabaseRequest_h30 25 31 #include "ExceptionCode.h" 32 #include "IndexedDatabase.h" 33 #include "PlatformString.h" 34 #include <wtf/PassRefPtr.h> 35 #include <wtf/RefCounted.h> 36 #include <wtf/RefPtr.h> 26 #ifndef IDBKeyRange_h 27 #define IDBKeyRange_h 37 28 38 29 #if ENABLE(INDEXED_DATABASE) 39 30 31 #include "IDBAny.h" 32 #include <wtf/PassRefPtr.h> 33 #include <wtf/RefCounted.h> 34 40 35 namespace WebCore { 41 36 42 class IDBAny; 43 class IDBRequest; 44 class IndexedDatabase; 45 class ScriptExecutionContext; 37 class SerializedScriptValue; 46 38 47 class I ndexedDatabaseRequest : public RefCounted<IndexedDatabaseRequest> {39 class IDBKeyRange : public RefCounted<IDBKeyRange> { 48 40 public: 49 static PassRefPtr<IndexedDatabaseRequest> create(IndexedDatabase* indexedDatabase) 41 // Keep in sync with what's in the .idl file. 42 enum Flags { 43 SINGLE = 0, 44 LEFT_OPEN = 1, 45 RIGHT_OPEN = 2, 46 LEFT_BOUND = 4, 47 RIGHT_BOUND = 8, 48 }; 49 50 static PassRefPtr<IDBKeyRange> create(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, unsigned short flags) 50 51 { 51 return adoptRef(new I ndexedDatabaseRequest(indexedDatabase));52 return adoptRef(new IDBKeyRange(left, right, flags)); 52 53 } 53 ~I ndexedDatabaseRequest();54 ~IDBKeyRange() { } 54 55 55 PassRefPtr<IDBRequest> open(ScriptExecutionContext*, const String& name, const String& description); 56 57 PassRefPtr<IDBAny> left() const { return m_left; } 58 PassRefPtr<IDBAny> right() const { return m_right; } 59 unsigned short flags() const { return m_flags; } 56 60 57 61 private: 58 I ndexedDatabaseRequest(IndexedDatabase*);62 IDBKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, unsigned short flags); 59 63 60 RefPtr<IndexedDatabase> m_indexedDatabase; 61 RefPtr<IDBAny> m_this; 64 RefPtr<IDBAny> m_left; 65 RefPtr<IDBAny> m_right; 66 unsigned short m_flags; 62 67 }; 63 68 … … 66 71 #endif 67 72 68 #endif // IndexedDatabaseRequest_h 69 73 #endif // IDBKeyRange_h -
trunk/WebCore/storage/IDBKeyRange.idl
r61119 r61120 28 28 interface [ 29 29 Conditional=INDEXED_DATABASE 30 ] IndexedDatabaseRequest { 31 [CallWith=ScriptExecutionContext] IDBRequest open(in DOMString name, in DOMString description); 30 ] IDBKeyRange { 31 // Keep in sync with what's in the .h file. 32 const unsigned short SINGLE = 0; 33 const unsigned short LEFT_OPEN = 1; 34 const unsigned short RIGHT_OPEN = 2; 35 const unsigned short LEFT_BOUND = 4; 36 const unsigned short RIGHT_BOUND = 8; 37 38 readonly attribute IDBAny left; 39 readonly attribute IDBAny right; 40 readonly attribute unsigned short flags; 32 41 }; 33 42 -
trunk/WebCore/storage/IndexedDatabaseRequest.cpp
r60776 r61120 34 34 #include "Frame.h" 35 35 #include "IDBDatabase.h" 36 #include "IDBKeyRange.h" 36 37 #include "IDBRequest.h" 37 38 #include "IndexedDatabase.h" … … 68 69 } 69 70 71 PassRefPtr<IDBKeyRange> IndexedDatabaseRequest::makeSingleKeyRange(PassRefPtr<SerializedScriptValue> prpValue) 72 { 73 RefPtr<SerializedScriptValue> value = prpValue; 74 return IDBKeyRange::create(value, value, IDBKeyRange::SINGLE); 75 } 76 77 PassRefPtr<IDBKeyRange> IndexedDatabaseRequest::makeLeftBoundKeyRange(PassRefPtr<SerializedScriptValue> bound, bool open) 78 { 79 return IDBKeyRange::create(bound, SerializedScriptValue::create(), open ? IDBKeyRange::LEFT_OPEN : IDBKeyRange::LEFT_BOUND); 80 } 81 82 PassRefPtr<IDBKeyRange> IndexedDatabaseRequest::makeRightBoundKeyRange(PassRefPtr<SerializedScriptValue> bound, bool open) 83 { 84 return IDBKeyRange::create(SerializedScriptValue::create(), bound, open ? IDBKeyRange::RIGHT_OPEN : IDBKeyRange::RIGHT_BOUND); 85 } 86 87 PassRefPtr<IDBKeyRange> IndexedDatabaseRequest::makeBoundKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, bool openLeft, bool openRight) 88 { 89 unsigned short flags = openLeft ? IDBKeyRange::LEFT_OPEN : IDBKeyRange::LEFT_BOUND; 90 flags |= openRight ? IDBKeyRange::RIGHT_OPEN : IDBKeyRange::RIGHT_BOUND; 91 return IDBKeyRange::create(left, right, flags); 92 } 93 70 94 } // namespace WebCore 71 95 -
trunk/WebCore/storage/IndexedDatabaseRequest.h
r61119 r61120 41 41 42 42 class IDBAny; 43 class IDBKeyRange; 43 44 class IDBRequest; 44 45 class IndexedDatabase; 45 46 class ScriptExecutionContext; 47 class SerializedScriptValue; 46 48 47 49 class IndexedDatabaseRequest : public RefCounted<IndexedDatabaseRequest> { … … 54 56 55 57 PassRefPtr<IDBRequest> open(ScriptExecutionContext*, const String& name, const String& description); 58 PassRefPtr<IDBKeyRange> makeSingleKeyRange(PassRefPtr<SerializedScriptValue> value); 59 PassRefPtr<IDBKeyRange> makeLeftBoundKeyRange(PassRefPtr<SerializedScriptValue> bound, bool open = false); 60 PassRefPtr<IDBKeyRange> makeRightBoundKeyRange(PassRefPtr<SerializedScriptValue> bound, bool open = false); 61 PassRefPtr<IDBKeyRange> makeBoundKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, bool openLeft = false, bool openRight = false); 56 62 57 63 private: -
trunk/WebCore/storage/IndexedDatabaseRequest.idl
r60776 r61120 30 30 ] IndexedDatabaseRequest { 31 31 [CallWith=ScriptExecutionContext] IDBRequest open(in DOMString name, in DOMString description); 32 IDBKeyRange makeSingleKeyRange(in SerializedScriptValue value); 33 IDBKeyRange makeLeftBoundKeyRange(in SerializedScriptValue bound, in [Optional] boolean open); 34 IDBKeyRange makeRightBoundKeyRange(in SerializedScriptValue bound, in [Optional] boolean open); 35 IDBKeyRange makeBoundKeyRange(in SerializedScriptValue left, in SerializedScriptValue right, in [Optional] boolean openLeft, in [Optional] boolean openRight); 32 36 }; 33 37
Note: See TracChangeset
for help on using the changeset viewer.