| 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 return toV8(impl.get(), creationContext, isolate); | 906 return toV8(impl.get(), creationContext, isolate); |
| 907 } | 907 } |
| 908 | 908 |
| 909 END | 909 END |
| 910 | 910 |
| 911 if (IsConstructorTemplate($interface, "Event")) { | 911 if (IsConstructorTemplate($interface, "Event")) { |
| 912 $header{nameSpaceWebCore}->add("bool fill${implClassName}Init(${implClas
sName}Init&, const Dictionary&);\n\n"); | 912 $header{nameSpaceWebCore}->add("bool fill${implClassName}Init(${implClas
sName}Init&, const Dictionary&);\n\n"); |
| 913 } | 913 } |
| 914 } | 914 } |
| 915 | 915 |
| 916 sub HasEventHandlerAttribute | |
| 917 { | |
| 918 my $interface = shift; | |
| 919 | |
| 920 foreach my $attribute (@{$interface->attributes}) { | |
| 921 return 1 if $attribute->type eq "EventHandler"; | |
| 922 } | |
| 923 | |
| 924 return 0; | |
| 925 } | |
| 926 | |
| 927 sub GetInternalFields | 916 sub GetInternalFields |
| 928 { | 917 { |
| 929 my $interface = shift; | 918 my $interface = shift; |
| 930 | 919 |
| 931 my @customInternalFields = (); | 920 my @customInternalFields = (); |
| 932 # Event listeners on DOM nodes are explicitly supported in the GC controller
. | 921 # Event listeners on DOM nodes are explicitly supported in the GC controller
. |
| 933 if (!InheritsInterface($interface, "Node") && | 922 if (!InheritsInterface($interface, "Node") && |
| 934 (InheritsInterface($interface, "EventTarget") || HasEventHandlerAttribut
e($interface))) { | 923 InheritsInterface($interface, "EventTarget")) { |
| 935 push(@customInternalFields, "eventListenerCacheIndex"); | 924 push(@customInternalFields, "eventListenerCacheIndex"); |
| 936 } | 925 } |
| 937 return @customInternalFields; | 926 return @customInternalFields; |
| 938 } | 927 } |
| 939 | 928 |
| 940 sub GenerateHeaderCustomInternalFieldIndices | 929 sub GenerateHeaderCustomInternalFieldIndices |
| 941 { | 930 { |
| 942 my $interface = shift; | 931 my $interface = shift; |
| 943 my @customInternalFields = GetInternalFields($interface); | 932 my @customInternalFields = GetInternalFields($interface); |
| 944 my $customFieldCounter = 0; | 933 my $customFieldCounter = 0; |
| (...skipping 5056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6001 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 5990 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
| 6002 $found = 1; | 5991 $found = 1; |
| 6003 } | 5992 } |
| 6004 return 1 if $found; | 5993 return 1 if $found; |
| 6005 }, 0); | 5994 }, 0); |
| 6006 | 5995 |
| 6007 return $found; | 5996 return $found; |
| 6008 } | 5997 } |
| 6009 | 5998 |
| 6010 1; | 5999 1; |
| OLD | NEW |