| 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 5261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5272 return "ScriptValue" if $type eq "any" or IsCallbackFunctionType($type); | 5272 return "ScriptValue" if $type eq "any" or IsCallbackFunctionType($type); |
| 5273 return "Dictionary" if $type eq "Dictionary"; | 5273 return "Dictionary" if $type eq "Dictionary"; |
| 5274 | 5274 |
| 5275 die "UnionType is not supported" if IsUnionType($type); | 5275 die "UnionType is not supported" if IsUnionType($type); |
| 5276 | 5276 |
| 5277 if (IsTypedArrayType($type)) { | 5277 if (IsTypedArrayType($type)) { |
| 5278 return $isParameter ? "${type}*" : "RefPtr<${type}>"; | 5278 return $isParameter ? "${type}*" : "RefPtr<${type}>"; |
| 5279 } | 5279 } |
| 5280 | 5280 |
| 5281 # We need to check [ImplementedAs] extended attribute for wrapper types. | 5281 # We need to check [ImplementedAs] extended attribute for wrapper types. |
| 5282 return "RefPtr<$type>" if $type eq "DOMStringList" or $type eq "XPathNSResol
ver"; # FIXME: can these be put in nonWrapperTypes instead? | 5282 return "RefPtr<$type>" if $type eq "XPathNSResolver"; # FIXME: can this be
put in nonWrapperTypes instead? |
| 5283 if (IsWrapperType($type)) { | 5283 if (IsWrapperType($type)) { |
| 5284 my $interface = ParseInterface($type); | 5284 my $interface = ParseInterface($type); |
| 5285 my $implClassName = GetImplName($interface); | 5285 my $implClassName = GetImplName($interface); |
| 5286 return $isParameter ? "${implClassName}*" : "RefPtr<${implClassName}>"; | 5286 return $isParameter ? "${implClassName}*" : "RefPtr<${implClassName}>"; |
| 5287 } | 5287 } |
| 5288 return "RefPtr<$type>" if IsRefPtrType($type) and (not $isParameter or $nonW
rapperTypes{$type}); | 5288 return "RefPtr<$type>" if IsRefPtrType($type) and (not $isParameter or $nonW
rapperTypes{$type}); |
| 5289 | 5289 |
| 5290 my $arrayOrSequenceType = GetArrayOrSequenceType($type); | 5290 my $arrayOrSequenceType = GetArrayOrSequenceType($type); |
| 5291 | 5291 |
| 5292 if ($arrayOrSequenceType) { | 5292 if ($arrayOrSequenceType) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5364 } else { | 5364 } else { |
| 5365 return "toInt8($value)" if $type eq "byte"; | 5365 return "toInt8($value)" if $type eq "byte"; |
| 5366 return "toUInt8($value)" if $type eq "octet"; | 5366 return "toUInt8($value)" if $type eq "octet"; |
| 5367 return "toInt32($value)" if $type eq "long" or $type eq "short"; | 5367 return "toInt32($value)" if $type eq "long" or $type eq "short"; |
| 5368 return "toUInt32($value)" if $type eq "unsigned long" or $type eq "unsig
ned short"; | 5368 return "toUInt32($value)" if $type eq "unsigned long" or $type eq "unsig
ned short"; |
| 5369 return "toInt64($value)" if $type eq "long long"; | 5369 return "toInt64($value)" if $type eq "long long"; |
| 5370 return "toUInt64($value)" if $type eq "unsigned long long"; | 5370 return "toUInt64($value)" if $type eq "unsigned long long"; |
| 5371 } | 5371 } |
| 5372 return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "C
ompareHow"; | 5372 return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "C
ompareHow"; |
| 5373 return "toWebCoreDate($value)" if $type eq "Date"; | 5373 return "toWebCoreDate($value)" if $type eq "Date"; |
| 5374 return "toDOMStringList($value, $getIsolate)" if $type eq "DOMStringList"; | |
| 5375 | 5374 |
| 5376 if ($type eq "DOMString" or IsEnumType($type)) { | 5375 if ($type eq "DOMString" or IsEnumType($type)) { |
| 5377 return $value; | 5376 return $value; |
| 5378 } | 5377 } |
| 5379 | 5378 |
| 5380 if ($type eq "SerializedScriptValue") { | 5379 if ($type eq "SerializedScriptValue") { |
| 5381 AddToImplIncludes("bindings/v8/SerializedScriptValue.h"); | 5380 AddToImplIncludes("bindings/v8/SerializedScriptValue.h"); |
| 5382 return "SerializedScriptValue::create($value, $getIsolate)"; | 5381 return "SerializedScriptValue::create($value, $getIsolate)"; |
| 5383 } | 5382 } |
| 5384 | 5383 |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6274 | 6273 |
| 6275 return 1 if $interface->extendedAttributes->{"CustomToV8"}; | 6274 return 1 if $interface->extendedAttributes->{"CustomToV8"}; |
| 6276 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; | 6275 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; |
| 6277 return 1 if InheritsInterface($interface, "Document"); | 6276 return 1 if InheritsInterface($interface, "Document"); |
| 6278 return 1 if SVGTypeNeedsToHoldContextElement($interface->name); | 6277 return 1 if SVGTypeNeedsToHoldContextElement($interface->name); |
| 6279 | 6278 |
| 6280 return 0; | 6279 return 0; |
| 6281 } | 6280 } |
| 6282 | 6281 |
| 6283 1; | 6282 1; |
| OLD | NEW |