Changeset 141541 in webkit
- Timestamp:
- Jan 31, 2013 11:07:33 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r141533 r141541 1 2013-01-31 Nils Barth <nbarth@google.com> 2 3 [CPP,GObject,ObjC] Add 'enum' skip to CodeGenerator{CPP,GObject,ObjC}.pm 4 https://bugs.webkit.org/show_bug.cgi?id=108565 5 6 Reviewed by Kentaro Hara. 7 8 Since legacy code generators (CodeGenerator{CPP,GObject,ObjC}.pm) 9 do not support enumerations, add test to skip attributes of enum type. 10 This lets us remove #if macro from enum in test file and not need 11 these in future. 12 Also minor associated code cleaning: 13 auxiliary variable: $type = $attribute->signature->type. 14 15 Test: bindings/scripts/test/TestObj.idl (run-bindings-test) 16 17 * bindings/scripts/CodeGeneratorCPP.pm: 18 (SkipAttribute): 19 * bindings/scripts/CodeGeneratorGObject.pm: 20 (SkipAttribute): 21 * bindings/scripts/CodeGeneratorObjC.pm: 22 (SkipAttribute): 23 * bindings/scripts/test/TestObj.idl: remove #if macro 24 1 25 2013-01-31 Kent Tamura <tkent@chromium.org> 2 26 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm
r135426 r141541 200 200 { 201 201 my $attribute = shift; 202 my $type = $attribute->signature->type; 202 203 203 204 return 1 if $attribute->signature->extendedAttributes->{"Custom"} 204 205 or $attribute->signature->extendedAttributes->{"CustomGetter"}; 205 206 206 return 1 if $ attribute->signature->type =~ /Constructor$/;207 208 return 1 if $codeGenerator->IsTypedArrayType($ attribute->signature->type);209 210 if ($codeGenerator->GetArrayType($ attribute->signature->type)) {207 return 1 if $type =~ /Constructor$/; 208 209 return 1 if $codeGenerator->IsTypedArrayType($type); 210 211 if ($codeGenerator->GetArrayType($type)) { 211 212 return 1; 212 213 } 213 214 214 if ($codeGenerator->GetSequenceType($ attribute->signature->type)) {215 if ($codeGenerator->GetSequenceType($type)) { 215 216 return 1; 216 217 } 217 218 218 $codeGenerator->AssertNotSequenceType($attribute->signature->type); 219 if ($codeGenerator->IsEnumType($type)) { 220 return 1; 221 } 222 223 $codeGenerator->AssertNotSequenceType($type); 219 224 220 225 # FIXME: This is typically used to add script execution state arguments to the method. -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
r138793 r141541 185 185 186 186 if ($codeGenerator->GetArrayType($propType)) { 187 return 1; 188 } 189 190 if ($codeGenerator->IsEnumType($propType)) { 187 191 return 1; 188 192 } -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r140265 r141541 447 447 { 448 448 my $attribute = shift; 449 450 $codeGenerator->AssertNotSequenceType($attribute->signature->type); 451 return 1 if $codeGenerator->GetArrayType($attribute->signature->type); 452 return 1 if $codeGenerator->IsTypedArrayType($attribute->signature->type); 449 my $type = $attribute->signature->type; 450 451 $codeGenerator->AssertNotSequenceType($type); 452 return 1 if $codeGenerator->GetArrayType($type); 453 return 1 if $codeGenerator->IsTypedArrayType($type); 454 return 1 if $codeGenerator->IsEnumType($type); 453 455 454 456 # This is for DynamicsCompressorNode.idl -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r141360 r141541 31 31 // changes in its ouput. 32 32 33 #if defined(TESTING_JS) || defined(TESTING_V8)34 33 enum TestEnumType { "", "EnumValue1", "EnumValue2", "EnumValue3" }; 35 #endif36 34 37 35 [ … … 47 45 static attribute DOMString staticStringAttr; 48 46 static readonly attribute TestSubObjConstructor TestSubObj; 47 #endif 49 48 attribute TestEnumType enumAttr; 50 #endif51 49 attribute short shortAttr; 52 50 attribute unsigned short unsignedShortAttr;
Note: See TracChangeset
for help on using the changeset viewer.