| 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 | 843 |
| 844 using namespace $parameters{namespace}Names; | 844 using namespace $parameters{namespace}Names; |
| 845 | 845 |
| 846 END | 846 END |
| 847 ; | 847 ; |
| 848 | 848 |
| 849 print F "typedef PassRefPtr<$parameters{namespace}Element> (*ConstructorFunction
)(const QualifiedName&, Document*"; | 849 print F "typedef PassRefPtr<$parameters{namespace}Element> (*ConstructorFunction
)(const QualifiedName&, Document*"; |
| 850 print F ", HTMLFormElement*" if $parameters{namespace} eq "HTML"; | 850 print F ", HTMLFormElement*" if $parameters{namespace} eq "HTML"; |
| 851 print F ", bool createdByParser);\n"; | 851 print F ", bool createdByParser);\n"; |
| 852 print F <<END | 852 print F <<END |
| 853 typedef HashMap<AtomicStringImpl*, ConstructorFunction> FunctionMap; | 853 typedef HashMap<StringImpl*, ConstructorFunction> FunctionMap; |
| 854 | 854 |
| 855 static FunctionMap* gFunctionMap = 0; | 855 static FunctionMap* gFunctionMap = 0; |
| 856 | 856 |
| 857 END | 857 END |
| 858 ; | 858 ; |
| 859 | 859 |
| 860 my %tagConstructorMap = buildConstructorMap(); | 860 my %tagConstructorMap = buildConstructorMap(); |
| 861 | 861 |
| 862 printConstructors($F, \%tagConstructorMap); | 862 printConstructors($F, \%tagConstructorMap); |
| 863 | 863 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 typedef v8::Handle<v8::Object> (*Create$parameters{namespace}ElementWrapperFunct
ion)($parameters{namespace}Element*, v8::Handle<v8::Object> creationContext, v8:
:Isolate*); | 1112 typedef v8::Handle<v8::Object> (*Create$parameters{namespace}ElementWrapperFunct
ion)($parameters{namespace}Element*, v8::Handle<v8::Object> creationContext, v8:
:Isolate*); |
| 1113 | 1113 |
| 1114 END | 1114 END |
| 1115 ; | 1115 ; |
| 1116 | 1116 |
| 1117 printWrapperFunctions($F); | 1117 printWrapperFunctions($F); |
| 1118 | 1118 |
| 1119 print F <<END | 1119 print F <<END |
| 1120 v8::Handle<v8::Object> createV8$parameters{namespace}Wrapper($parameters{namespa
ce}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolat
e) | 1120 v8::Handle<v8::Object> createV8$parameters{namespace}Wrapper($parameters{namespa
ce}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolat
e) |
| 1121 { | 1121 { |
| 1122 typedef HashMap<WTF::AtomicStringImpl*, Create$parameters{namespace}ElementW
rapperFunction> FunctionMap; | 1122 typedef HashMap<WTF::StringImpl*, Create$parameters{namespace}ElementWrapper
Function> FunctionMap; |
| 1123 DEFINE_STATIC_LOCAL(FunctionMap, map, ()); | 1123 DEFINE_STATIC_LOCAL(FunctionMap, map, ()); |
| 1124 if (map.isEmpty()) { | 1124 if (map.isEmpty()) { |
| 1125 END | 1125 END |
| 1126 ; | 1126 ; |
| 1127 | 1127 |
| 1128 for my $tag (sort keys %enabledTags) { | 1128 for my $tag (sort keys %enabledTags) { |
| 1129 # Do not add the name to the map if it does not have a JS wrapper constr
uctor or uses the default wrapper. | 1129 # Do not add the name to the map if it does not have a JS wrapper constr
uctor or uses the default wrapper. |
| 1130 next if (usesDefaultJSWrapper($tag, \%enabledTags) && ($parameters{fallb
ackInterfaceName} eq $parameters{namespace} . "Element")); | 1130 next if (usesDefaultJSWrapper($tag, \%enabledTags) && ($parameters{fallb
ackInterfaceName} eq $parameters{namespace} . "Element")); |
| 1131 | 1131 |
| 1132 my $conditional = $enabledTags{$tag}{conditional}; | 1132 my $conditional = $enabledTags{$tag}{conditional}; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 } | 1253 } |
| 1254 } | 1254 } |
| 1255 END | 1255 END |
| 1256 ; | 1256 ; |
| 1257 print F "#endif // $parameters{guardFactoryWith}\n\n" if $parameters{guardFa
ctoryWith}; | 1257 print F "#endif // $parameters{guardFactoryWith}\n\n" if $parameters{guardFa
ctoryWith}; |
| 1258 | 1258 |
| 1259 print F "#endif // V8$parameters{namespace}ElementWrapperFactory_h\n"; | 1259 print F "#endif // V8$parameters{namespace}ElementWrapperFactory_h\n"; |
| 1260 | 1260 |
| 1261 close F; | 1261 close F; |
| 1262 } | 1262 } |
| OLD | NEW |