Summary: | [CPP,GObject,ObjC] Add 'enum' skip to CodeGenerator{CPP,GObject,ObjC}.pm | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nils Barth <nbarth> | ||||||
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, haraken, japhet, ojan.autocc, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Nils Barth
2013-01-31 19:03:32 PST
Created attachment 185936 [details]
Patch
Simple patch -- adds IsEnumType test to SkipAttribute in legacy code generators
so we can remove #if macro from IDL test file.
Also minor associated code cleaning (b/c we're checking type):
aux var: $type = $attribute->signature->type
(is this ok?)
Comment on attachment 185936 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185936&action=review > Source/WebCore/ChangeLog:8 > + Add IsEnumType test to SkipAttribute in legacy code generators. Please explain the rationale for the change, not only what you did but also why you did it. e.g. Since CodeGenerator{CPP,GObject,ObjC}.pm does not support 'enum', this patch adds code to skip DOM attributes that return 'enum'. > Source/WebCore/bindings/scripts/test/TestObj.idl:47 > static readonly attribute long staticReadOnlyLongAttr; > static attribute DOMString staticStringAttr; > static readonly attribute TestSubObjConstructor TestSubObj; > - attribute TestEnumType enumAttr; > #endif I think you can remove this #if too by skipping 'static' in CodeGenerator{ObjC,GObject,CPP}.pm. You can do it in a follow-up patch. (In reply to comment #2) > (From update of attachment 185936 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185936&action=review > > > Source/WebCore/ChangeLog:8 > > + Add IsEnumType test to SkipAttribute in legacy code generators. > > Please explain the rationale for the change, not only what you did but also why you did it. > > e.g. Since CodeGenerator{CPP,GObject,ObjC}.pm does not support 'enum', this patch adds code to skip DOM attributes that return 'enum'. Got it -- will update ChangeLog. > > Source/WebCore/bindings/scripts/test/TestObj.idl:47 > > static readonly attribute long staticReadOnlyLongAttr; > > static attribute DOMString staticStringAttr; > > static readonly attribute TestSubObjConstructor TestSubObj; > > - attribute TestEnumType enumAttr; > > #endif > > I think you can remove this #if too by skipping 'static' in CodeGenerator{ObjC,GObject,CPP}.pm. You can do it in a follow-up patch. I was wondering about that; should I open a different bug for that? > > I think you can remove this #if too by skipping 'static' in CodeGenerator{ObjC,GObject,CPP}.pm. You can do it in a follow-up patch.
>
> I was wondering about that; should I open a different bug for that?
Yes.
(In reply to comment #4) > > > I think you can remove this #if too by skipping 'static' in CodeGenerator{ObjC,GObject,CPP}.pm. You can do it in a follow-up patch. > > > > I was wondering about that; should I open a different bug for that? > > Yes. Got it: Bug 108578 Created attachment 185941 [details] Patch (In reply to comment #2) > (From update of attachment 185936 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185936&action=review > > > Source/WebCore/ChangeLog:8 > > + Add IsEnumType test to SkipAttribute in legacy code generators. > > Please explain the rationale for the change, not only what you did but also why you did it. > > e.g. Since CodeGenerator{CPP,GObject,ObjC}.pm does not support 'enum', this patch adds code to skip DOM attributes that return 'enum'. Got it -- fixed. Comment on attachment 185941 [details]
Patch
LGTM
Comment on attachment 185941 [details] Patch Clearing flags on attachment: 185941 Committed r141541: <http://trac.webkit.org/changeset/141541> All reviewed patches have been landed. Closing bug. |