| OLD | NEW |
| 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
| 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
| 5 # Copyright (C) 2006 Apple Computer, Inc. | 5 # Copyright (C) 2006 Apple Computer, Inc. |
| 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |
| 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |
| (...skipping 5211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5222 return "String" if $type eq "DOMString" or IsEnumType($type); | 5222 return "String" if $type eq "DOMString" or IsEnumType($type); |
| 5223 | 5223 |
| 5224 return "ScriptPromise" if $type eq "Promise"; | 5224 return "ScriptPromise" if $type eq "Promise"; |
| 5225 | 5225 |
| 5226 return "Range::CompareHow" if $type eq "CompareHow"; | 5226 return "Range::CompareHow" if $type eq "CompareHow"; |
| 5227 return "DOMTimeStamp" if $type eq "DOMTimeStamp"; | 5227 return "DOMTimeStamp" if $type eq "DOMTimeStamp"; |
| 5228 return "double" if $type eq "Date"; | 5228 return "double" if $type eq "Date"; |
| 5229 return "ScriptValue" if $type eq "any" or IsCallbackFunctionType($type); | 5229 return "ScriptValue" if $type eq "any" or IsCallbackFunctionType($type); |
| 5230 return "Dictionary" if $type eq "Dictionary"; | 5230 return "Dictionary" if $type eq "Dictionary"; |
| 5231 | 5231 |
| 5232 return "RefPtr<DOMStringList>" if $type eq "DOMStringList"; | |
| 5233 return "RefPtr<MediaQueryListListener>" if $type eq "MediaQueryListListener"
; | |
| 5234 return "RefPtr<NodeFilter>" if $type eq "NodeFilter"; | |
| 5235 return "RefPtr<SerializedScriptValue>" if $type eq "SerializedScriptValue"; | |
| 5236 return "RefPtr<XPathNSResolver>" if $type eq "XPathNSResolver"; | |
| 5237 | |
| 5238 die "UnionType is not supported" if IsUnionType($type); | 5232 die "UnionType is not supported" if IsUnionType($type); |
| 5239 | 5233 |
| 5240 if (IsTypedArrayType($type)) { | 5234 if (IsTypedArrayType($type)) { |
| 5241 return $isParameter ? "${type}*" : "RefPtr<${type}>"; | 5235 return $isParameter ? "${type}*" : "RefPtr<${type}>"; |
| 5242 } | 5236 } |
| 5243 | 5237 |
| 5244 # We need to check [ImplementedAs] extended attribute for wrapper types. | 5238 # We need to check [ImplementedAs] extended attribute for wrapper types. |
| 5239 return "RefPtr<$type>" if $type eq "DOMStringList" or $type eq "XPathNSResol
ver"; # FIXME: can these be put in nonWrapperTypes instead? |
| 5245 if (IsWrapperType($type)) { | 5240 if (IsWrapperType($type)) { |
| 5246 my $interface = ParseInterface($type); | 5241 my $interface = ParseInterface($type); |
| 5247 my $implClassName = GetImplName($interface); | 5242 my $implClassName = GetImplName($interface); |
| 5248 return $isParameter ? "${implClassName}*" : "RefPtr<${implClassName}>"; | 5243 return $isParameter ? "${implClassName}*" : "RefPtr<${implClassName}>"; |
| 5249 } | 5244 } |
| 5250 return "RefPtr<${type}>" if IsRefPtrType($type) and not $isParameter; | 5245 return "RefPtr<$type>" if IsRefPtrType($type) and (not $isParameter or $nonW
rapperTypes{$type}); |
| 5251 | 5246 |
| 5252 my $arrayOrSequenceType = GetArrayOrSequenceType($type); | 5247 my $arrayOrSequenceType = GetArrayOrSequenceType($type); |
| 5253 | 5248 |
| 5254 if ($arrayOrSequenceType) { | 5249 if ($arrayOrSequenceType) { |
| 5255 my $nativeType = GetNativeType($arrayOrSequenceType); | 5250 my $nativeType = GetNativeType($arrayOrSequenceType); |
| 5256 $nativeType .= " " if ($nativeType =~ />$/); | 5251 $nativeType .= " " if ($nativeType =~ />$/); |
| 5257 return "Vector<${nativeType}>"; | 5252 return "Vector<${nativeType}>"; |
| 5258 } | 5253 } |
| 5259 | 5254 |
| 5260 # Default, assume native type is a pointer with same type name as idl type | 5255 # Default, assume native type is a pointer with same type name as idl type |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6228 my $interface = shift; | 6223 my $interface = shift; |
| 6229 | 6224 |
| 6230 return 1 if $interface->extendedAttributes->{"CustomToV8"}; | 6225 return 1 if $interface->extendedAttributes->{"CustomToV8"}; |
| 6231 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; | 6226 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; |
| 6232 return 1 if InheritsInterface($interface, "Document"); | 6227 return 1 if InheritsInterface($interface, "Document"); |
| 6233 | 6228 |
| 6234 return 0; | 6229 return 0; |
| 6235 } | 6230 } |
| 6236 | 6231 |
| 6237 1; | 6232 1; |
| OLD | NEW |