Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: Source/bindings/scripts/deprecated_code_generator_v8.pm

Issue 22649003: Have the Performance interface inherit EventTarget (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline additional w3c test Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 5071 matching lines...) Expand 10 before | Expand all | Expand 10 after
6016 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { 6005 if ($currentInterface->extendedAttributes->{$extendedAttribute}) {
6017 $found = 1; 6006 $found = 1;
6018 } 6007 }
6019 return 1 if $found; 6008 return 1 if $found;
6020 }, 0); 6009 }, 0);
6021 6010
6022 return $found; 6011 return $found;
6023 } 6012 }
6024 6013
6025 1; 6014 1;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698