OLD | NEW |
1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -w |
2 | 2 |
3 # Copyright (C) 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. | 3 # Copyright (C) 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. |
4 # Copyright (C) 2009, Julien Chaffraix <jchaffraix@webkit.org> | 4 # Copyright (C) 2009, Julien Chaffraix <jchaffraix@webkit.org> |
5 # Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmob
ile.com/) | 5 # Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmob
ile.com/) |
6 # Copyright (C) 2011 Ericsson AB. All rights reserved. | 6 # Copyright (C) 2011 Ericsson AB. All rights reserved. |
7 # | 7 # |
8 # Redistribution and use in source and binary forms, with or without | 8 # Redistribution and use in source and binary forms, with or without |
9 # modification, are permitted provided that the following conditions | 9 # modification, are permitted provided that the following conditions |
10 # are met: | 10 # are met: |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 | 812 |
813 using namespace $parameters{namespace}Names; | 813 using namespace $parameters{namespace}Names; |
814 | 814 |
815 END | 815 END |
816 ; | 816 ; |
817 | 817 |
818 print F "typedef PassRefPtr<$parameters{namespace}Element> (*ConstructorFunction
)(const QualifiedName&, Document*"; | 818 print F "typedef PassRefPtr<$parameters{namespace}Element> (*ConstructorFunction
)(const QualifiedName&, Document*"; |
819 print F ", HTMLFormElement*" if $parameters{namespace} eq "HTML"; | 819 print F ", HTMLFormElement*" if $parameters{namespace} eq "HTML"; |
820 print F ", bool createdByParser);\n"; | 820 print F ", bool createdByParser);\n"; |
821 print F <<END | 821 print F <<END |
822 typedef HashMap<AtomicStringImpl*, ConstructorFunction> FunctionMap; | 822 typedef HashMap<StringImpl*, ConstructorFunction> FunctionMap; |
823 | 823 |
824 static FunctionMap* gFunctionMap = 0; | 824 static FunctionMap* gFunctionMap = 0; |
825 | 825 |
826 END | 826 END |
827 ; | 827 ; |
828 | 828 |
829 my %tagConstructorMap = buildConstructorMap(); | 829 my %tagConstructorMap = buildConstructorMap(); |
830 | 830 |
831 printConstructors($F, \%tagConstructorMap); | 831 printConstructors($F, \%tagConstructorMap); |
832 | 832 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 typedef v8::Handle<v8::Object> (*Create$parameters{namespace}ElementWrapperFunct
ion)($parameters{namespace}Element*, v8::Handle<v8::Object> creationContext, v8:
:Isolate*); | 1081 typedef v8::Handle<v8::Object> (*Create$parameters{namespace}ElementWrapperFunct
ion)($parameters{namespace}Element*, v8::Handle<v8::Object> creationContext, v8:
:Isolate*); |
1082 | 1082 |
1083 END | 1083 END |
1084 ; | 1084 ; |
1085 | 1085 |
1086 printWrapperFunctions($F); | 1086 printWrapperFunctions($F); |
1087 | 1087 |
1088 print F <<END | 1088 print F <<END |
1089 v8::Handle<v8::Object> createV8$parameters{namespace}Wrapper($parameters{namespa
ce}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolat
e) | 1089 v8::Handle<v8::Object> createV8$parameters{namespace}Wrapper($parameters{namespa
ce}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolat
e) |
1090 { | 1090 { |
1091 typedef HashMap<WTF::AtomicStringImpl*, Create$parameters{namespace}ElementW
rapperFunction> FunctionMap; | 1091 typedef HashMap<WTF::StringImpl*, Create$parameters{namespace}ElementWrapper
Function> FunctionMap; |
1092 DEFINE_STATIC_LOCAL(FunctionMap, map, ()); | 1092 DEFINE_STATIC_LOCAL(FunctionMap, map, ()); |
1093 if (map.isEmpty()) { | 1093 if (map.isEmpty()) { |
1094 END | 1094 END |
1095 ; | 1095 ; |
1096 | 1096 |
1097 for my $tag (sort keys %enabledTags) { | 1097 for my $tag (sort keys %enabledTags) { |
1098 # Do not add the name to the map if it does not have a JS wrapper constr
uctor or uses the default wrapper. | 1098 # Do not add the name to the map if it does not have a JS wrapper constr
uctor or uses the default wrapper. |
1099 next if (usesDefaultJSWrapper($tag, \%enabledTags) && ($parameters{fallb
ackInterfaceName} eq $parameters{namespace} . "Element")); | 1099 next if (usesDefaultJSWrapper($tag, \%enabledTags) && ($parameters{fallb
ackInterfaceName} eq $parameters{namespace} . "Element")); |
1100 | 1100 |
1101 my $conditional = $enabledTags{$tag}{conditional}; | 1101 my $conditional = $enabledTags{$tag}{conditional}; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 | 1276 |
1277 while ( my ($name, $identifier) = each %parameters ) { | 1277 while ( my ($name, $identifier) = each %parameters ) { |
1278 print F " new ((void*)&$name) AtomicString(${name}Impl);\n"; | 1278 print F " new ((void*)&$name) AtomicString(${name}Impl);\n"; |
1279 } | 1279 } |
1280 | 1280 |
1281 print F "}\n}\n}\n"; | 1281 print F "}\n}\n}\n"; |
1282 close F; | 1282 close F; |
1283 exit 0; | 1283 exit 0; |
1284 } | 1284 } |
1285 | 1285 |
OLD | NEW |