OLD | NEW |
1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -w |
2 # | 2 # |
3 # Copyright (C) 2011 Google Inc. All rights reserved. | 3 # Copyright (C) 2011 Google Inc. All rights reserved. |
4 # | 4 # |
5 # This library is free software; you can redistribute it and/or | 5 # This library is free software; you can redistribute it and/or |
6 # modify it under the terms of the GNU Library General Public | 6 # modify it under the terms of the GNU Library General Public |
7 # License as published by the Free Software Foundation; either | 7 # License as published by the Free Software Foundation; either |
8 # version 2 of the License, or (at your option) any later version. | 8 # version 2 of the License, or (at your option) any later version. |
9 # | 9 # |
10 # This library is distributed in the hope that it will be useful, | 10 # This library is distributed in the hope that it will be useful, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 $idlFileToInterfaceName{$fullPath} = $interfaceName; | 70 $idlFileToInterfaceName{$fullPath} = $interfaceName; |
71 $supplementals{$fullPath} = []; | 71 $supplementals{$fullPath} = []; |
72 } | 72 } |
73 | 73 |
74 # Generate DOMWindow Constructors partial interface. | 74 # Generate DOMWindow Constructors partial interface. |
75 open PARTIAL_WINDOW_FH, "> $windowConstructorsFile" or die "Cannot open $windowC
onstructorsFile\n"; | 75 open PARTIAL_WINDOW_FH, "> $windowConstructorsFile" or die "Cannot open $windowC
onstructorsFile\n"; |
76 print PARTIAL_WINDOW_FH "partial interface DOMWindow {\n"; | 76 print PARTIAL_WINDOW_FH "partial interface DOMWindow {\n"; |
77 print PARTIAL_WINDOW_FH $constructorAttributesCode; | 77 print PARTIAL_WINDOW_FH $constructorAttributesCode; |
78 print PARTIAL_WINDOW_FH "};\n"; | 78 print PARTIAL_WINDOW_FH "};\n"; |
79 close PARTIAL_WINDOW_FH; | 79 close PARTIAL_WINDOW_FH; |
80 $supplementalDependencies{$windowConstructorsFile} = "DOMWindow"; | 80 $supplementalDependencies{$windowConstructorsFile} = "DOMWindow" if $interfaceNa
meToIdlFile{"DOMWindow"}; |
81 | 81 |
82 # Resolves partial interfaces dependencies. | 82 # Resolves partial interfaces dependencies. |
83 foreach my $idlFile (keys %supplementalDependencies) { | 83 foreach my $idlFile (keys %supplementalDependencies) { |
84 my $baseFile = $supplementalDependencies{$idlFile}; | 84 my $baseFile = $supplementalDependencies{$idlFile}; |
85 my $targetIdlFile = $interfaceNameToIdlFile{$baseFile}; | 85 my $targetIdlFile = $interfaceNameToIdlFile{$baseFile}; |
86 push(@{$supplementals{$targetIdlFile}}, $idlFile); | 86 push(@{$supplementals{$targetIdlFile}}, $idlFile); |
87 delete $supplementals{$idlFile}; | 87 delete $supplementals{$idlFile}; |
88 } | 88 } |
89 | 89 |
90 # Outputs the dependency. | 90 # Outputs the dependency. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 my $key = trim($keyValue[0]); | 186 my $key = trim($keyValue[0]); |
187 next unless length($key); | 187 next unless length($key); |
188 my $value = "VALUE_IS_MISSING"; | 188 my $value = "VALUE_IS_MISSING"; |
189 $value = trim($keyValue[1]) if @keyValue > 1; | 189 $value = trim($keyValue[1]) if @keyValue > 1; |
190 $extendedAttributes->{$key} = $value; | 190 $extendedAttributes->{$key} = $value; |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 return $extendedAttributes; | 194 return $extendedAttributes; |
195 } | 195 } |
OLD | NEW |