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