Bug 40250 - Adds IndexedDB's KeyRange.
Summary: Adds IndexedDB's KeyRange.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 11:52 PDT by Marcus Bulach
Modified: 2010-06-14 06:43 PDT (History)
3 users (show)

See Also:


Attachments
Patch (24.84 KB, patch)
2010-06-07 11:56 PDT, Marcus Bulach
no flags Details | Formatted Diff | Diff
Patch (26.34 KB, patch)
2010-06-08 05:47 PDT, Marcus Bulach
no flags Details | Formatted Diff | Diff
Patch (35.34 KB, patch)
2010-06-08 09:35 PDT, Marcus Bulach
no flags Details | Formatted Diff | Diff
Patch (35.55 KB, patch)
2010-06-08 09:53 PDT, Marcus Bulach
no flags Details | Formatted Diff | Diff
Patch (35.48 KB, patch)
2010-06-10 03:30 PDT, Marcus Bulach
jorlow: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Bulach 2010-06-07 11:52:57 PDT
Adds IndexedDB's KeyRange.
Comment 1 Marcus Bulach 2010-06-07 11:56:59 PDT
Created attachment 58065 [details]
Patch
Comment 2 Jeremy Orlow 2010-06-07 12:40:12 PDT
Comment on attachment 58065 [details]
Patch

Looking pretty good....

WebCore/storage/IndexedDatabaseRequest.idl:32
 +          IDBKeyRange makeSingleKeyRange(in SerializedScriptValue value);
Use [Optional] after the "in" for all the optional args and get rid of the comment documenting it.  Put them all on the same line.

WebCore/storage/IndexedDatabaseRequest.h:60
 +      PassRefPtr<IDBKeyRange> makeBoundKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, bool openLeft, bool openRight);
For the optional parameters, put the default here (i.e. |bool open = false|).

WebCore/storage/IDBKeyRange.idl:31
 +          const unsigned short SINGLE = 0;
Add "// Keep in sync with what's in the .h file."

WebCore/storage/IDBKeyRange.h:57
 +      PassRefPtr<IDBAny> left() { return m_left; }
const for all 3

WebCore/storage/IndexedDatabaseRequest.cpp:65
 +      SerializedScriptValue* rawValue = value.releaseRef();
Now is a good time to read http://webkit.org/coding/RefPtr.html again.

PassRefPtr<IDBKeyRange> IndexedDatabaseRequest::makeSingleKeyRange(PassRefPtr<SerializedScriptValue> prpValue) {
RefPtr<SerializedScriptValue> value = prpValue;
Comment 3 Marcus Bulach 2010-06-08 05:47:50 PDT
Created attachment 58132 [details]
Patch
Comment 4 Marcus Bulach 2010-06-08 05:51:11 PDT
(In reply to comment #2)
> (From update of attachment 58065 [details])
> Looking pretty good....
thanks Jeremy! all comments addressed, another look please?

> 
> WebCore/storage/IndexedDatabaseRequest.idl:32
>  +          IDBKeyRange makeSingleKeyRange(in SerializedScriptValue value);
> Use [Optional] after the "in" for all the optional args and get rid of the comment documenting it.  Put them all on the same line.
done.

> 
> WebCore/storage/IndexedDatabaseRequest.h:60
>  +      PassRefPtr<IDBKeyRange> makeBoundKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, bool openLeft, bool openRight);
> For the optional parameters, put the default here (i.e. |bool open = false|).
done.

> 
> WebCore/storage/IDBKeyRange.idl:31
>  +          const unsigned short SINGLE = 0;
> Add "// Keep in sync with what's in the .h file."
done.

> 
> WebCore/storage/IDBKeyRange.h:57
>  +      PassRefPtr<IDBAny> left() { return m_left; }
> const for all 3
done.

> 
> WebCore/storage/IndexedDatabaseRequest.cpp:65
>  +      SerializedScriptValue* rawValue = value.releaseRef();
> Now is a good time to read http://webkit.org/coding/RefPtr.html again.
> 
> PassRefPtr<IDBKeyRange> IndexedDatabaseRequest::makeSingleKeyRange(PassRefPtr<SerializedScriptValue> prpValue) {
> RefPtr<SerializedScriptValue> value = prpValue;

thanks for the refresher! done.
Comment 5 Jeremy Orlow 2010-06-08 06:09:19 PDT
Comment on attachment 58132 [details]
Patch

You need to add the KeyRange.h/cpp to Android.mk + CMakeLists.txt

the idl's need to be added to derivedSrouces make and all in one files.

You also forgot the xcode project + visual studio.WebCore/storage/IDBKeyRange.cpp:13
 +   * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
Copy the license from one of the other IDB files...the 2 clause license without "Apple Computer" is the latest.

WebCore/storage/IDBKeyRange.cpp:40
 +      : m_left(IDBAny::create()), m_right(IDBAny::create()), m_flags(flags)
separate onto their own lines.
Comment 6 Marcus Bulach 2010-06-08 09:35:54 PDT
Created attachment 58145 [details]
Patch
Comment 7 Jeremy Orlow 2010-06-08 09:41:36 PDT
Comment on attachment 58145 [details]
Patch

WebCore/storage/IDBKeyRange.cpp:38
 +        m_right(IDBAny::create()),
commas at beginning not end
Comment 8 Marcus Bulach 2010-06-08 09:53:15 PDT
Created attachment 58147 [details]
Patch
Comment 9 Jeremy Orlow 2010-06-08 10:02:44 PDT
Comment on attachment 58147 [details]
Patch

my r+ cq- meant that I was fine with the last patch but just wanted you to fix it upon landing.
Comment 10 WebKit Commit Bot 2010-06-09 20:36:10 PDT
Comment on attachment 58147 [details]
Patch

Rejecting patch 58147 from commit-queue.

Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Jeremy Orlow', u'--force']" exit_code: 1
Last 500 characters of output:
).
Hunk #4 succeeded at 14509 (offset 12 lines).
Hunk #5 FAILED at 19460.
Hunk #6 FAILED at 21763.
2 out of 6 hunks FAILED -- saving rejects to file WebCore/WebCore.xcodeproj/project.pbxproj.rej
patching file WebCore/storage/IDBKeyRange.cpp
patching file WebCore/storage/IDBKeyRange.h
patching file WebCore/storage/IDBKeyRange.idl
patching file WebCore/storage/IndexedDatabaseRequest.cpp
patching file WebCore/storage/IndexedDatabaseRequest.h
patching file WebCore/storage/IndexedDatabaseRequest.idl

Full output: http://webkit-commit-queue.appspot.com/results/3190120
Comment 11 Marcus Bulach 2010-06-10 03:30:22 PDT
Created attachment 58355 [details]
Patch
Comment 12 Jeremy Orlow 2010-06-10 03:32:38 PDT
Comment on attachment 58355 [details]
Patch

Rubber stamped because you already had a r+ from me.
Comment 13 WebKit Commit Bot 2010-06-10 13:22:47 PDT
Comment on attachment 58355 [details]
Patch

Rejecting patch 58355 from commit-queue.

Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Jeremy Orlow', u'--force']" exit_code: 1
Last 500 characters of output:
55.
Hunk #4 succeeded at 14519 (offset 4 lines).
Hunk #5 FAILED at 19477.
Hunk #6 FAILED at 21783.
3 out of 6 hunks FAILED -- saving rejects to file WebCore/WebCore.xcodeproj/project.pbxproj.rej
patching file WebCore/storage/IDBKeyRange.cpp
patching file WebCore/storage/IDBKeyRange.h
patching file WebCore/storage/IDBKeyRange.idl
patching file WebCore/storage/IndexedDatabaseRequest.cpp
patching file WebCore/storage/IndexedDatabaseRequest.h
patching file WebCore/storage/IndexedDatabaseRequest.idl

Full output: http://webkit-commit-queue.appspot.com/results/3231145
Comment 14 Marcus Bulach 2010-06-14 06:43:27 PDT
Committed r61120: <http://trac.webkit.org/changeset/61120>