Summary: | Reenable IDBDatabaseRequest's description attribute | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jeremy Orlow <jorlow> | ||||||
Component: | New Bugs | Assignee: | Jeremy Orlow <jorlow> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andreip, commit-queue, darin, mjs, mrowe, steveblock, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Other | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Jeremy Orlow
2010-05-27 03:50:57 PDT
Created attachment 57217 [details]
Patch
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. (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. Created attachment 57884 [details]
Patch
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.
Ping? Anyone? 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. 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 on attachment 57884 [details] Patch Clearing flags on attachment: 57884 Committed r61112: <http://trac.webkit.org/changeset/61112> All reviewed patches have been landed. Closing bug. |