| OLD | NEW |
| 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 Loading... |
| 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 applyInterfaceExtendedAttributes($interface, $attribute->signatu
re->extendedAttributes); | 153 applyInterfaceExtendedAttributes($interface, $attribute->extende
dAttributes); |
| 154 | 154 |
| 155 push(@{$targetDataNode->attributes}, $attribute); | 155 push(@{$targetDataNode->attributes}, $attribute); |
| 156 } | 156 } |
| 157 | 157 |
| 158 # Support for methods of partial interfaces. | 158 # Support for methods of partial interfaces. |
| 159 foreach my $function (@{$interface->functions}) { | 159 foreach my $function (@{$interface->functions}) { |
| 160 # Record that this method is implemented by $interfaceName. | 160 # Record that this method is implemented by $interfaceName. |
| 161 $function->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e; | 161 $function->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e; |
| 162 | 162 |
| 163 # Add interface-wide extended attributes to each method. | 163 # Add interface-wide extended attributes to each method. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 sub checkIDLAttributes | 253 sub checkIDLAttributes |
| 254 { | 254 { |
| 255 my $idlAttributes = shift; | 255 my $idlAttributes = shift; |
| 256 my $document = shift; | 256 my $document = shift; |
| 257 my $idlFile = shift; | 257 my $idlFile = shift; |
| 258 | 258 |
| 259 foreach my $interface (@{$document->interfaces}) { | 259 foreach my $interface (@{$document->interfaces}) { |
| 260 checkIfIDLAttributesExists($idlAttributes, $interface->extendedAttribute
s, $idlFile); | 260 checkIfIDLAttributesExists($idlAttributes, $interface->extendedAttribute
s, $idlFile); |
| 261 | 261 |
| 262 foreach my $attribute (@{$interface->attributes}) { | 262 foreach my $attribute (@{$interface->attributes}) { |
| 263 checkIfIDLAttributesExists($idlAttributes, $attribute->signature->ex
tendedAttributes, $idlFile); | 263 checkIfIDLAttributesExists($idlAttributes, $attribute->extendedAttri
butes, $idlFile); |
| 264 } | 264 } |
| 265 | 265 |
| 266 foreach my $function (@{$interface->functions}) { | 266 foreach my $function (@{$interface->functions}) { |
| 267 checkIfIDLAttributesExists($idlAttributes, $function->extendedAttrib
utes, $idlFile); | 267 checkIfIDLAttributesExists($idlAttributes, $function->extendedAttrib
utes, $idlFile); |
| 268 foreach my $parameter (@{$function->parameters}) { | 268 foreach my $parameter (@{$function->parameters}) { |
| 269 checkIfIDLAttributesExists($idlAttributes, $parameter->extendedA
ttributes, $idlFile); | 269 checkIfIDLAttributesExists($idlAttributes, $parameter->extendedA
ttributes, $idlFile); |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 } | 273 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 304 last OUTER; | 304 last OUTER; |
| 305 } | 305 } |
| 306 } | 306 } |
| 307 } | 307 } |
| 308 if ($error) { | 308 if ($error) { |
| 309 die "IDL ATTRIBUTE CHECKER ERROR: $error | 309 die "IDL ATTRIBUTE CHECKER ERROR: $error |
| 310 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). | 310 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). |
| 311 "; | 311 "; |
| 312 } | 312 } |
| 313 } | 313 } |
| OLD | NEW |