Bug 39826 - Reenable IDBDatabaseRequest's description attribute
Summary: Reenable IDBDatabaseRequest's description attribute
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: Jeremy Orlow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 03:50 PDT by Jeremy Orlow
Modified: 2010-06-14 05:09 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.99 KB, patch)
2010-05-27 03:59 PDT, Jeremy Orlow
no flags Details | Formatted Diff | Diff
Patch (22.68 KB, patch)
2010-06-04 08:57 PDT, Jeremy Orlow
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2010-05-27 03:50:57 PDT
Reenable IDBDatabaseRequest's description attribute
Comment 1 Jeremy Orlow 2010-05-27 03:59:23 PDT
Created attachment 57217 [details]
Patch
Comment 2 Dumitru Daniliuc 2010-06-03 15:23:33 PDT
Comment on attachment 57217 [details]
Patch

> @@ -738,8 +739,8 @@ sub GenerateHeader
> -            if ($attributeName eq "id" or $attributeName eq "hash") {
> -                # Special case attributes id and hash to be idName and hashName to avoid ObjC naming conflict.
> +            if ($attributeName eq "id" or $attributeName eq "hash" or $attributeName eq "description") {
> +                # Special case some attributes (like id and hash) to have a "Name" prefix to avoid ObjC naming conflicts.
>                  $attributeName .= "Name";

s/(like id and hash)/(id, hash and description)/ ?
s/prefix/suffix/.

> @@ -1155,8 +1156,8 @@ sub GenerateImplementation
> -            if ($attributeName eq "id" or $attributeName eq "hash") {
> -                # Special case attributes id and hash to be idName and hashName to avoid ObjC naming conflict.
> +            if ($attributeName eq "id" or $attributeName eq "hash" or $attributeName eq "description") {
> +                # Special case some attributes (like id and hash) to have a "Name" prefix to avoid ObjC naming conflicts.
>                  $attributeInterfaceName .= "Name";

same comment.

also, i think we should add a test for this to WebCore/bindings/scripts/test/TestObj.idl, and modify WebCore/bindings/scripts/test/ObjC/DOMTestObj.{h|mm} accordingly. you can run WebKitTools/Scripts/run-bindings-tests to test these changes.
Comment 3 Jeremy Orlow 2010-06-03 16:24:39 PDT
(In reply to comment #2)
> (From update of attachment 57217 [details])
> > @@ -738,8 +739,8 @@ sub GenerateHeader
> > -            if ($attributeName eq "id" or $attributeName eq "hash") {
> > -                # Special case attributes id and hash to be idName and hashName to avoid ObjC naming conflict.
> > +            if ($attributeName eq "id" or $attributeName eq "hash" or $attributeName eq "description") {
> > +                # Special case some attributes (like id and hash) to have a "Name" prefix to avoid ObjC naming conflicts.
> >                  $attributeName .= "Name";
> 
> s/(like id and hash)/(id, hash and description)/ ?

I did this intentionally.  I feel like listing them all here is redundant, but I thought the comment had value and was most clear using examples.

> s/prefix/suffix/.

Good catch.

> > @@ -1155,8 +1156,8 @@ sub GenerateImplementation
> > -            if ($attributeName eq "id" or $attributeName eq "hash") {
> > -                # Special case attributes id and hash to be idName and hashName to avoid ObjC naming conflict.
> > +            if ($attributeName eq "id" or $attributeName eq "hash" or $attributeName eq "description") {
> > +                # Special case some attributes (like id and hash) to have a "Name" prefix to avoid ObjC naming conflicts.
> >                  $attributeInterfaceName .= "Name";
> 
> same comment.
> 
> also, i think we should add a test for this to WebCore/bindings/scripts/test/TestObj.idl, and modify WebCore/bindings/scripts/test/ObjC/DOMTestObj.{h|mm} accordingly. you can run WebKitTools/Scripts/run-bindings-tests to test these changes.

Good point.  Will do.
Comment 4 Jeremy Orlow 2010-06-04 08:57:50 PDT
Created attachment 57884 [details]
Patch
Comment 5 WebKit Review Bot 2010-06-04 09:02:09 PDT
Attachment 57884 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:499:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:508:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:517:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:525:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Jeremy Orlow 2010-06-08 08:35:39 PDT
Ping?  Anyone?
Comment 7 Darin Adler 2010-06-12 18:53:49 PDT
Comment on attachment 57884 [details]
Patch

> -            if ($attributeName eq "id" or $attributeName eq "hash") {
> -                # Special case attributes id and hash to be idName and hashName to avoid ObjC naming conflict.
> +            if ($attributeName eq "id" or $attributeName eq "hash" or $attributeName eq "description") {
> +                # Special case some attributes (like id and hash) to have a "Name" suffix to avoid ObjC naming conflicts.

Seems like we should use a Perl function for this now that it's getting to be a larger number of names than just two.
Comment 8 Jeremy Orlow 2010-06-14 04:47:31 PDT
Since this has a r+(In reply to comment #7)
> (From update of attachment 57884 [details])
> > -            if ($attributeName eq "id" or $attributeName eq "hash") {
> > -                # Special case attributes id and hash to be idName and hashName to avoid ObjC naming conflict.
> > +            if ($attributeName eq "id" or $attributeName eq "hash" or $attributeName eq "description") {
> > +                # Special case some attributes (like id and hash) to have a "Name" suffix to avoid ObjC naming conflicts.
> 
> Seems like we should use a Perl function for this now that it's getting to be a larger number of names than just two.

I'll do that in a follow up patch then.
Comment 9 WebKit Commit Bot 2010-06-14 05:09:17 PDT
Comment on attachment 57884 [details]
Patch

Clearing flags on attachment: 57884

Committed r61112: <http://trac.webkit.org/changeset/61112>
Comment 10 WebKit Commit Bot 2010-06-14 05:09:25 PDT
All reviewed patches have been landed.  Closing bug.