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

Side by Side Diff: Source/bindings/scripts/generate-bindings.pl

Issue 16924018: [Binding] Remove signature from domAttribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 6 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
OLDNEW
1 #!/usr/bin/perl -w 1 #!/usr/bin/perl -w
2 # 2 #
3 # Copyright (C) 2005 Apple Computer, Inc. 3 # Copyright (C) 2005 Apple Computer, Inc.
4 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 4 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
5 # 5 #
6 # This file is part of WebKit 6 # This file is part of WebKit
7 # 7 #
8 # This library is free software; you can redistribute it and/or 8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Library General Public 9 # modify it under the terms of the GNU Library General Public
10 # License as published by the Free Software Foundation; either 10 # License as published by the Free Software Foundation; either
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 if ($interface->name eq $targetInterfaceName) { 140 if ($interface->name eq $targetInterfaceName) {
141 $targetDataNode = $interface; 141 $targetDataNode = $interface;
142 last; 142 last;
143 } 143 }
144 } 144 }
145 die "Not found an interface ${targetInterfaceName} in ${targetInterf aceName}.idl." unless defined $targetDataNode; 145 die "Not found an interface ${targetInterfaceName} in ${targetInterf aceName}.idl." unless defined $targetDataNode;
146 146
147 # Support for attributes of partial interfaces. 147 # Support for attributes of partial interfaces.
148 foreach my $attribute (@{$interface->attributes}) { 148 foreach my $attribute (@{$interface->attributes}) {
149 # Record that this attribute is implemented by $interfaceName. 149 # Record that this attribute is implemented by $interfaceName.
150 $attribute->signature->extendedAttributes->{"ImplementedBy"} = $ interfaceName; 150 $attribute->extendedAttributes->{"ImplementedBy"} = $interfaceNa me;
151 151
152 # Add interface-wide extended attributes to each attribute. 152 # Add interface-wide extended attributes to each attribute.
153 foreach my $extendedAttributeName (keys %{$interface->extendedAt tributes}) { 153 foreach my $extendedAttributeName (keys %{$interface->extendedAt tributes}) {
154 $attribute->signature->extendedAttributes->{$extendedAttribu teName} = $interface->extendedAttributes->{$extendedAttributeName}; 154 $attribute->extendedAttributes->{$extendedAttributeName} = $ interface->extendedAttributes->{$extendedAttributeName};
155 } 155 }
156 push(@{$targetDataNode->attributes}, $attribute); 156 push(@{$targetDataNode->attributes}, $attribute);
157 } 157 }
158 158
159 # Support for methods of partial interfaces. 159 # Support for methods of partial interfaces.
160 foreach my $function (@{$interface->functions}) { 160 foreach my $function (@{$interface->functions}) {
161 # Record that this method is implemented by $interfaceName. 161 # Record that this method is implemented by $interfaceName.
162 $function->extendedAttributes->{"ImplementedBy"} = $interfaceNam e; 162 $function->extendedAttributes->{"ImplementedBy"} = $interfaceNam e;
163 163
164 # Add interface-wide extended attributes to each method. 164 # Add interface-wide extended attributes to each method.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 sub checkIDLAttributes 256 sub checkIDLAttributes
257 { 257 {
258 my $idlAttributes = shift; 258 my $idlAttributes = shift;
259 my $document = shift; 259 my $document = shift;
260 my $idlFile = shift; 260 my $idlFile = shift;
261 261
262 foreach my $interface (@{$document->interfaces}) { 262 foreach my $interface (@{$document->interfaces}) {
263 checkIfIDLAttributesExists($idlAttributes, $interface->extendedAttribute s, $idlFile); 263 checkIfIDLAttributesExists($idlAttributes, $interface->extendedAttribute s, $idlFile);
264 264
265 foreach my $attribute (@{$interface->attributes}) { 265 foreach my $attribute (@{$interface->attributes}) {
266 checkIfIDLAttributesExists($idlAttributes, $attribute->signature->ex tendedAttributes, $idlFile); 266 checkIfIDLAttributesExists($idlAttributes, $attribute->extendedAttri butes, $idlFile);
267 } 267 }
268 268
269 foreach my $function (@{$interface->functions}) { 269 foreach my $function (@{$interface->functions}) {
270 checkIfIDLAttributesExists($idlAttributes, $function->extendedAttrib utes, $idlFile); 270 checkIfIDLAttributesExists($idlAttributes, $function->extendedAttrib utes, $idlFile);
271 foreach my $parameter (@{$function->parameters}) { 271 foreach my $parameter (@{$function->parameters}) {
272 checkIfIDLAttributesExists($idlAttributes, $parameter->extendedA ttributes, $idlFile); 272 checkIfIDLAttributesExists($idlAttributes, $parameter->extendedA ttributes, $idlFile);
273 } 273 }
274 } 274 }
275 } 275 }
276 } 276 }
(...skipping 19 matching lines...) Expand all
296 last OUTER; 296 last OUTER;
297 } 297 }
298 } 298 }
299 } 299 }
300 if ($error) { 300 if ($error) {
301 die "IDL ATTRIBUTE CHECKER ERROR: $error 301 die "IDL ATTRIBUTE CHECKER ERROR: $error
302 If you want to add a new IDL attribute, you need to add it to bindings/scripts/I DLAttributes.txt and add explanations to the Blink IDL document (http://chromium .org/blink/webidl). 302 If you want to add a new IDL attribute, you need to add it to bindings/scripts/I DLAttributes.txt and add explanations to the Blink IDL document (http://chromium .org/blink/webidl).
303 "; 303 ";
304 } 304 }
305 } 305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698