| 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 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2623 # use the naming convension, interface + (capitalize) attr name | 2623 # use the naming convension, interface + (capitalize) attr name |
| 2624 $customAccessor = $interfaceName . "::" . $attrName; | 2624 $customAccessor = $interfaceName . "::" . $attrName; |
| 2625 } | 2625 } |
| 2626 | 2626 |
| 2627 my $getter; | 2627 my $getter; |
| 2628 my $setter; | 2628 my $setter; |
| 2629 my $getterForMainWorld; | 2629 my $getterForMainWorld; |
| 2630 my $setterForMainWorld; | 2630 my $setterForMainWorld; |
| 2631 my $propAttr = "v8::None"; | 2631 my $propAttr = "v8::None"; |
| 2632 | 2632 |
| 2633 my $isConstructor = ($attribute->signature->type =~ /Constructor$/); |
| 2634 |
| 2633 # Check attributes. | 2635 # Check attributes. |
| 2634 if ($attrExt->{"NotEnumerable"}) { | 2636 # As per Web IDL specification, constructor properties on the ECMAScript glo
bal object should be |
| 2637 # configurable and should not be enumerable. |
| 2638 if ($attrExt->{"NotEnumerable"} || $isConstructor) { |
| 2635 $propAttr .= " | v8::DontEnum"; | 2639 $propAttr .= " | v8::DontEnum"; |
| 2636 } | 2640 } |
| 2637 if ($attrExt->{"Unforgeable"}) { | 2641 if ($attrExt->{"Unforgeable"} && !$isConstructor) { |
| 2638 $propAttr .= " | v8::DontDelete"; | 2642 $propAttr .= " | v8::DontDelete"; |
| 2639 } | 2643 } |
| 2640 | 2644 |
| 2641 my $on_proto = "0 /* on instance */"; | 2645 my $on_proto = "0 /* on instance */"; |
| 2642 my $data = "0 /* no data */"; | 2646 my $data = "0 /* no data */"; |
| 2643 | 2647 |
| 2644 # Constructor | 2648 # Constructor |
| 2645 if ($attribute->signature->type =~ /Constructor$/) { | 2649 if ($isConstructor) { |
| 2646 my $constructorType = $attribute->signature->type; | 2650 my $constructorType = $attribute->signature->type; |
| 2647 $constructorType =~ s/Constructor$//; | 2651 $constructorType =~ s/Constructor$//; |
| 2648 # $constructorType ~= /Constructor$/ indicates that it is NamedConstruct
or. | 2652 # $constructorType ~= /Constructor$/ indicates that it is NamedConstruct
or. |
| 2649 # We do not generate the header file for NamedConstructor of class XXXX, | 2653 # We do not generate the header file for NamedConstructor of class XXXX, |
| 2650 # since we generate the NamedConstructor declaration into the header fil
e of class XXXX. | 2654 # since we generate the NamedConstructor declaration into the header fil
e of class XXXX. |
| 2651 if ($constructorType !~ /Constructor$/ || $attribute->signature->extende
dAttributes->{"CustomConstructor"}) { | 2655 if ($constructorType !~ /Constructor$/ || $attribute->signature->extende
dAttributes->{"CustomConstructor"}) { |
| 2652 AddToImplIncludes("V8${constructorType}.h", $attribute->signature->e
xtendedAttributes->{"Conditional"}); | 2656 AddToImplIncludes("V8${constructorType}.h", $attribute->signature->e
xtendedAttributes->{"Conditional"}); |
| 2653 } | 2657 } |
| 2654 $data = "&V8${constructorType}::info"; | 2658 $data = "&V8${constructorType}::info"; |
| 2655 $getter = "${interfaceName}V8Internal::${interfaceName}ConstructorGetter
"; | 2659 $getter = "${interfaceName}V8Internal::${interfaceName}ConstructorGetter
"; |
| (...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4878 | 4882 |
| 4879 sub GetPassRefPtrType | 4883 sub GetPassRefPtrType |
| 4880 { | 4884 { |
| 4881 my $v8InterfaceName = shift; | 4885 my $v8InterfaceName = shift; |
| 4882 | 4886 |
| 4883 my $angleBracketSpace = $v8InterfaceName =~ />$/ ? " " : ""; | 4887 my $angleBracketSpace = $v8InterfaceName =~ />$/ ? " " : ""; |
| 4884 return "PassRefPtr<${v8InterfaceName}${angleBracketSpace}>"; | 4888 return "PassRefPtr<${v8InterfaceName}${angleBracketSpace}>"; |
| 4885 } | 4889 } |
| 4886 | 4890 |
| 4887 1; | 4891 1; |
| OLD | NEW |