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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 if ($interface->name eq $targetInterfaceName) { | 126 if ($interface->name eq $targetInterfaceName) { |
127 $targetDataNode = $interface; | 127 $targetDataNode = $interface; |
128 last; | 128 last; |
129 } | 129 } |
130 } | 130 } |
131 die "Not found an interface ${targetInterfaceName} in ${targetInterf
aceName}.idl." unless defined $targetDataNode; | 131 die "Not found an interface ${targetInterfaceName} in ${targetInterf
aceName}.idl." unless defined $targetDataNode; |
132 | 132 |
133 # Support for attributes of partial interfaces. | 133 # Support for attributes of partial interfaces. |
134 foreach my $attribute (@{$interface->attributes}) { | 134 foreach my $attribute (@{$interface->attributes}) { |
135 # Record that this attribute is implemented by $interfaceName. | 135 # Record that this attribute is implemented by $interfaceName. |
136 $attribute->extendedAttributes->{"ImplementedBy"} = $interfaceNa
me if $interface->isPartial; | 136 $attribute->extendedAttributes->{"ImplementedBy"} = $interfaceNa
me unless $interface->extendedAttributes->{"LegacyImplementedInBaseClass"}; |
137 | 137 |
138 # Add interface-wide extended attributes to each attribute. | 138 # Add interface-wide extended attributes to each attribute. |
139 applyInterfaceExtendedAttributes($interface, $attribute->extende
dAttributes); | 139 applyInterfaceExtendedAttributes($interface, $attribute->extende
dAttributes); |
140 | 140 |
141 push(@{$targetDataNode->attributes}, $attribute); | 141 push(@{$targetDataNode->attributes}, $attribute); |
142 } | 142 } |
143 | 143 |
144 # Support for methods of partial interfaces. | 144 # Support for methods of partial interfaces. |
145 foreach my $function (@{$interface->functions}) { | 145 foreach my $function (@{$interface->functions}) { |
146 # Record that this method is implemented by $interfaceName. | 146 # Record that this method is implemented by $interfaceName. |
147 $function->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e if $interface->isPartial; | 147 $function->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e unless $interface->extendedAttributes->{"LegacyImplementedInBaseClass"}; |
148 | 148 |
149 # Add interface-wide extended attributes to each method. | 149 # Add interface-wide extended attributes to each method. |
150 applyInterfaceExtendedAttributes($interface, $function->extended
Attributes); | 150 applyInterfaceExtendedAttributes($interface, $function->extended
Attributes); |
151 | 151 |
152 push(@{$targetDataNode->functions}, $function); | 152 push(@{$targetDataNode->functions}, $function); |
153 } | 153 } |
154 | 154 |
155 # Support for constants of partial interfaces. | 155 # Support for constants of partial interfaces. |
156 foreach my $constant (@{$interface->constants}) { | 156 foreach my $constant (@{$interface->constants}) { |
157 # Record that this constant is implemented by $interfaceName. | 157 # Record that this constant is implemented by $interfaceName. |
158 $constant->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e if $interface->isPartial; | 158 $constant->extendedAttributes->{"ImplementedBy"} = $interfaceNam
e unless $interface->extendedAttributes->{"LegacyImplementedInBaseClass"}; |
159 | 159 |
160 # Add interface-wide extended attributes to each constant. | 160 # Add interface-wide extended attributes to each constant. |
161 applyInterfaceExtendedAttributes($interface, $constant->extended
Attributes); | 161 applyInterfaceExtendedAttributes($interface, $constant->extended
Attributes); |
162 | 162 |
163 push(@{$targetDataNode->constants}, $constant); | 163 push(@{$targetDataNode->constants}, $constant); |
164 } | 164 } |
165 } else { | 165 } else { |
166 die "$idlFile is not a dependency of $targetIdlFile. There maybe a b
ug in the dependency computer (compute_dependencies.py).\n"; | 166 die "$idlFile is not a dependency of $targetIdlFile. There maybe a b
ug in the dependency computer (compute_dependencies.py).\n"; |
167 } | 167 } |
168 } | 168 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 last OUTER; | 290 last OUTER; |
291 } | 291 } |
292 } | 292 } |
293 } | 293 } |
294 if ($error) { | 294 if ($error) { |
295 die "IDL ATTRIBUTE CHECKER ERROR: $error | 295 die "IDL ATTRIBUTE CHECKER ERROR: $error |
296 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). | 296 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). |
297 "; | 297 "; |
298 } | 298 } |
299 } | 299 } |
OLD | NEW |