OLD | NEW |
1 | 1 |
2 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 3 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
4 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 4 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
5 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 5 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
6 # Copyright (C) 2006 Apple Computer, Inc. | 6 # Copyright (C) 2006 Apple Computer, Inc. |
7 # Copyright (C) 2007, 2008, 2009 Google Inc. | 7 # Copyright (C) 2007, 2008, 2009 Google Inc. |
8 # | 8 # |
9 # This file is part of the KDE project | 9 # This file is part of the KDE project |
10 # | 10 # |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 $getter = "${interfaceName}Internal::${interfaceName}ConstructorGetter"; | 950 $getter = "${interfaceName}Internal::${interfaceName}ConstructorGetter"; |
951 $setter = "0"; | 951 $setter = "0"; |
952 $propAttr = "v8::ReadOnly"; | 952 $propAttr = "v8::ReadOnly"; |
953 | 953 |
954 # EventListeners | 954 # EventListeners |
955 } elsif ($attribute->signature->type eq "EventListener") { | 955 } elsif ($attribute->signature->type eq "EventListener") { |
956 if ($interfaceName eq "DOMWindow") { | 956 if ($interfaceName eq "DOMWindow") { |
957 $getter = "V8Custom::v8DOMWindowEventHandlerAccessorGetter"; | 957 $getter = "V8Custom::v8DOMWindowEventHandlerAccessorGetter"; |
958 $setter = "V8Custom::v8DOMWindowEventHandlerAccessorSetter"; | 958 $setter = "V8Custom::v8DOMWindowEventHandlerAccessorSetter"; |
959 } elsif ($interfaceName eq "Element" || $interfaceName eq "Document" ||
$interfaceName eq "HTMLBodyElement" || $interfaceName eq "SVGElementInstance" ||
$interfaceName eq "HTMLFrameSetElement") { | 959 } elsif ($interfaceName eq "Element" || $interfaceName eq "Document" ||
$interfaceName eq "HTMLBodyElement" || $interfaceName eq "SVGElementInstance" ||
$interfaceName eq "HTMLFrameSetElement") { |
960 $getter = "V8Custom::v8ElementEventHandlerAccessorGetter"; | 960 $getter = "V8Custom::v8NodeEventHandlerAccessorGetter"; |
961 $setter = "V8Custom::v8ElementEventHandlerAccessorSetter"; | 961 $setter = "V8Custom::v8NodeEventHandlerAccessorSetter"; |
962 } else { | 962 } else { |
963 $getter = "V8Custom::v8${customAccessor}AccessorGetter"; | 963 $getter = "V8Custom::v8${customAccessor}AccessorGetter"; |
964 if ($interfaceName eq "WorkerContext" and $attrName eq "self") { | 964 if ($interfaceName eq "WorkerContext" and $attrName eq "self") { |
965 $setter = "0"; | 965 $setter = "0"; |
966 $propAttr = "v8::ReadOnly"; | 966 $propAttr = "v8::ReadOnly"; |
967 } else { | 967 } else { |
968 $setter = "V8Custom::v8${customAccessor}AccessorSetter"; | 968 $setter = "V8Custom::v8${customAccessor}AccessorSetter"; |
969 } | 969 } |
970 } | 970 } |
971 | 971 |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 sizeof(shadow_attrs)/sizeof(*shadow_attrs)); | 1228 sizeof(shadow_attrs)/sizeof(*shadow_attrs)); |
1229 return templ; | 1229 return templ; |
1230 } | 1230 } |
1231 END | 1231 END |
1232 } | 1232 } |
1233 | 1233 |
1234 # Generate the template configuration method | 1234 # Generate the template configuration method |
1235 push(@implContent, <<END); | 1235 push(@implContent, <<END); |
1236 static v8::Persistent<v8::FunctionTemplate> Configure${className}Template(v8::Pe
rsistent<v8::FunctionTemplate> desc) { | 1236 static v8::Persistent<v8::FunctionTemplate> Configure${className}Template(v8::Pe
rsistent<v8::FunctionTemplate> desc) { |
1237 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); | 1237 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); |
1238 instance->SetInternalFieldCount(2); | 1238 END |
| 1239 if (IsNodeSubType($dataNode)) { |
| 1240 push(@implContent, <<END); |
| 1241 instance->SetInternalFieldCount(V8Custom::kNodeMinimumInternalFieldCount); |
| 1242 END |
| 1243 } else { |
| 1244 push(@implContent, <<END); |
| 1245 instance->SetInternalFieldCount(V8Custom::kDefaultWrapperInternalFieldCount); |
| 1246 END |
| 1247 } |
| 1248 |
| 1249 push(@implContent, <<END); |
1239 v8::Local<v8::Signature> default_signature = v8::Signature::New(desc); | 1250 v8::Local<v8::Signature> default_signature = v8::Signature::New(desc); |
1240 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); | 1251 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); |
1241 $access_check | 1252 $access_check |
1242 END | 1253 END |
1243 | 1254 |
1244 | 1255 |
1245 # Set up our attributes if we have them | 1256 # Set up our attributes if we have them |
1246 if ($has_attributes) { | 1257 if ($has_attributes) { |
1247 push(@implContent, <<END); | 1258 push(@implContent, <<END); |
1248 batchConfigureAttributes(instance, proto, ${interfaceName}_attrs, sizeof(${int
erfaceName}_attrs)/sizeof(*${interfaceName}_attrs)); | 1259 batchConfigureAttributes(instance, proto, ${interfaceName}_attrs, sizeof(${int
erfaceName}_attrs)/sizeof(*${interfaceName}_attrs)); |
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2196 return 0; | 2207 return 0; |
2197 } | 2208 } |
2198 | 2209 |
2199 sub DebugPrint | 2210 sub DebugPrint |
2200 { | 2211 { |
2201 my $output = shift; | 2212 my $output = shift; |
2202 | 2213 |
2203 print $output; | 2214 print $output; |
2204 print "\n"; | 2215 print "\n"; |
2205 } | 2216 } |
OLD | NEW |