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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 return toV8(impl.get(), creationContext, isolate); | 934 return toV8(impl.get(), creationContext, isolate); |
935 } | 935 } |
936 | 936 |
937 END | 937 END |
938 | 938 |
939 if (IsConstructorTemplate($interface, "Event")) { | 939 if (IsConstructorTemplate($interface, "Event")) { |
940 $header{nameSpaceWebCore}->add("bool fill${implClassName}Init(${implClas
sName}Init&, const Dictionary&);\n\n"); | 940 $header{nameSpaceWebCore}->add("bool fill${implClassName}Init(${implClas
sName}Init&, const Dictionary&);\n\n"); |
941 } | 941 } |
942 } | 942 } |
943 | 943 |
| 944 sub HasEventListenerAttribute |
| 945 { |
| 946 my $interface = shift; |
| 947 |
| 948 foreach my $attribute (@{$interface->attributes}) { |
| 949 return 1 if $attribute->type eq "EventListener"; |
| 950 } |
| 951 |
| 952 return 0; |
| 953 } |
| 954 |
944 sub GetInternalFields | 955 sub GetInternalFields |
945 { | 956 { |
946 my $interface = shift; | 957 my $interface = shift; |
947 | 958 |
948 my @customInternalFields = (); | 959 my @customInternalFields = (); |
949 # Event listeners on DOM nodes are explicitly supported in the GC controller
. | 960 # Event listeners on DOM nodes are explicitly supported in the GC controller
. |
950 if (!InheritsInterface($interface, "Node") && | 961 if (!InheritsInterface($interface, "Node") && |
951 InheritsExtendedAttribute($interface, "EventTarget")) { | 962 (InheritsExtendedAttribute($interface, "EventTarget") || HasEventListene
rAttribute($interface))) { |
952 push(@customInternalFields, "eventListenerCacheIndex"); | 963 push(@customInternalFields, "eventListenerCacheIndex"); |
953 } | 964 } |
954 return @customInternalFields; | 965 return @customInternalFields; |
955 } | 966 } |
956 | 967 |
957 sub GenerateHeaderCustomInternalFieldIndices | 968 sub GenerateHeaderCustomInternalFieldIndices |
958 { | 969 { |
959 my $interface = shift; | 970 my $interface = shift; |
960 my @customInternalFields = GetInternalFields($interface); | 971 my @customInternalFields = GetInternalFields($interface); |
961 my $customFieldCounter = 0; | 972 my $customFieldCounter = 0; |
(...skipping 5074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6036 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 6047 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
6037 $found = 1; | 6048 $found = 1; |
6038 } | 6049 } |
6039 return 1 if $found; | 6050 return 1 if $found; |
6040 }, 0); | 6051 }, 0); |
6041 | 6052 |
6042 return $found; | 6053 return $found; |
6043 } | 6054 } |
6044 | 6055 |
6045 1; | 6056 1; |
OLD | NEW |