| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 if ($interface->name eq $targetInterfaceName) { | 108 if ($interface->name eq $targetInterfaceName) { |
| 109 $targetDataNode = $interface; | 109 $targetDataNode = $interface; |
| 110 last; | 110 last; |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 die "Not found an interface ${targetInterfaceName} in ${targetInterf
aceName}.idl." unless defined $targetDataNode; | 113 die "Not found an interface ${targetInterfaceName} in ${targetInterf
aceName}.idl." unless defined $targetDataNode; |
| 114 | 114 |
| 115 # Support for attributes of partial interfaces. | 115 # Support for attributes of partial interfaces. |
| 116 foreach my $attribute (@{$interface->attributes}) { | 116 foreach my $attribute (@{$interface->attributes}) { |
| 117 # Record that this attribute is implemented by $interfaceName. | 117 # Record that this attribute is implemented by $interfaceName. |
| 118 $attribute->extendedAttributes->{"ImplementedBy"} = $interfaceNa
me unless $interface->extendedAttributes->{"LegacyImplementedInBaseClass"}; | 118 $attribute->extendedAttributes->{"ImplementedBy"} = $interfaceNa
me; |
| 119 | 119 |
| 120 # Add interface-wide extended attributes to each attribute. | 120 # Add interface-wide extended attributes to each attribute. |
| 121 applyInterfaceExtendedAttributes($interface, $attribute->extende
dAttributes); | 121 applyInterfaceExtendedAttributes($interface, $attribute->extende
dAttributes); |
| 122 | 122 |
| 123 push(@{$targetDataNode->attributes}, $attribute); | 123 push(@{$targetDataNode->attributes}, $attribute); |
| 124 } | 124 } |
| 125 | 125 |
| 126 # Support for methods of partial interfaces. | 126 # Support for methods of partial interfaces. |
| 127 foreach my $function (@{$interface->functions}) { | 127 foreach my $function (@{$interface->functions}) { |
| 128 # Record that this method is implemented by $interfaceName. | 128 # Record that this method is implemented by $interfaceName. |
| 129 $function->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e unless $interface->extendedAttributes->{"LegacyImplementedInBaseClass"}; | 129 $function->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e; |
| 130 | 130 |
| 131 # Add interface-wide extended attributes to each method. | 131 # Add interface-wide extended attributes to each method. |
| 132 applyInterfaceExtendedAttributes($interface, $function->extended
Attributes); | 132 applyInterfaceExtendedAttributes($interface, $function->extended
Attributes); |
| 133 | 133 |
| 134 push(@{$targetDataNode->functions}, $function); | 134 push(@{$targetDataNode->functions}, $function); |
| 135 } | 135 } |
| 136 | 136 |
| 137 # Support for constants of partial interfaces. | 137 # Support for constants of partial interfaces. |
| 138 foreach my $constant (@{$interface->constants}) { | 138 foreach my $constant (@{$interface->constants}) { |
| 139 # Record that this constant is implemented by $interfaceName. | 139 # Record that this constant is implemented by $interfaceName. |
| 140 $constant->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e unless $interface->extendedAttributes->{"LegacyImplementedInBaseClass"}; | 140 $constant->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e; |
| 141 | 141 |
| 142 # Add interface-wide extended attributes to each constant. | 142 # Add interface-wide extended attributes to each constant. |
| 143 applyInterfaceExtendedAttributes($interface, $constant->extended
Attributes); | 143 applyInterfaceExtendedAttributes($interface, $constant->extended
Attributes); |
| 144 | 144 |
| 145 push(@{$targetDataNode->constants}, $constant); | 145 push(@{$targetDataNode->constants}, $constant); |
| 146 } | 146 } |
| 147 } else { | 147 } else { |
| 148 die "$idlFile is not a dependency of $targetIdlFile. There maybe a b
ug in the dependency computer (compute_dependencies.py).\n"; | 148 die "$idlFile is not a dependency of $targetIdlFile. There maybe a b
ug in the dependency computer (compute_dependencies.py).\n"; |
| 149 } | 149 } |
| 150 } | 150 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 258 } |
| 259 if ($error) { | 259 if ($error) { |
| 260 die "IDL ATTRIBUTE CHECKER ERROR: $error | 260 die "IDL ATTRIBUTE CHECKER ERROR: $error |
| 261 If you want to add a new IDL extended attribute, please add it to: | 261 If you want to add a new IDL extended attribute, please add it to: |
| 262 bindings/IDLExtendedAttributes.txt | 262 bindings/IDLExtendedAttributes.txt |
| 263 and add an explanation to the Blink IDL documentation at: | 263 and add an explanation to the Blink IDL documentation at: |
| 264 http://www.chromium.org/blink/webidl/blink-idl-extended-attributes | 264 http://www.chromium.org/blink/webidl/blink-idl-extended-attributes |
| 265 "; | 265 "; |
| 266 } | 266 } |
| 267 } | 267 } |
| OLD | NEW |