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

Unified Diff: Source/bindings/scripts/generate-bindings.pl

Issue 17031006: Rename DOMWindow interface to Window (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/scripts/CodeGeneratorV8.pm ('k') | Source/bindings/scripts/preprocess_idls.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/generate-bindings.pl
diff --git a/Source/bindings/scripts/generate-bindings.pl b/Source/bindings/scripts/generate-bindings.pl
index 95d73fb0634299c32bdbc80c8296f6c4561bd757..bc56b3117911e6b8fcd711ca0d0e30e659416153 100755
--- a/Source/bindings/scripts/generate-bindings.pl
+++ b/Source/bindings/scripts/generate-bindings.pl
@@ -84,12 +84,12 @@ my @supplementedIdlFiles;
if ($supplementalDependencyFile) {
# The format of a supplemental dependency file:
#
- # DOMWindow.idl P.idl Q.idl R.idl
+ # Window.idl P.idl Q.idl R.idl
# Document.idl S.idl
# Event.idl
# ...
#
- # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl,
+ # The above indicates that Window.idl is supplemented by P.idl, Q.idl and R.idl,
# Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs.
# The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file.
open FH, "< $supplementalDependencyFile" or die "Cannot open $supplementalDependencyFile\n";
@@ -150,9 +150,8 @@ foreach my $idlFile (@supplementedIdlFiles) {
$attribute->signature->extendedAttributes->{"ImplementedBy"} = $interfaceName;
# Add interface-wide extended attributes to each attribute.
- foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) {
- $attribute->signature->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName};
- }
+ applyInterfaceExtendedAttributes($interface, $attribute->signature->extendedAttributes);
+
push(@{$targetDataNode->attributes}, $attribute);
}
@@ -162,9 +161,8 @@ foreach my $idlFile (@supplementedIdlFiles) {
$function->extendedAttributes->{"ImplementedBy"} = $interfaceName;
# Add interface-wide extended attributes to each method.
- foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) {
- $function->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName};
- }
+ applyInterfaceExtendedAttributes($interface, $function->extendedAttributes);
+
push(@{$targetDataNode->functions}, $function);
}
@@ -174,9 +172,8 @@ foreach my $idlFile (@supplementedIdlFiles) {
$constant->extendedAttributes->{"ImplementedBy"} = $interfaceName;
# Add interface-wide extended attributes to each constant.
- foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) {
- $constant->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName};
- }
+ applyInterfaceExtendedAttributes($interface, $constant->extendedAttributes);
+
push(@{$targetDataNode->constants}, $constant);
}
} else {
@@ -275,6 +272,17 @@ sub checkIDLAttributes
}
}
+sub applyInterfaceExtendedAttributes
+{
+ my $interface = shift;
+ my $extendedAttributes = shift;
+
+ foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) {
+ next if $extendedAttributeName eq "ImplementedAs";
+ $extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName};
+ }
+}
+
sub checkIfIDLAttributesExists
{
my $idlAttributes = shift;
« no previous file with comments | « Source/bindings/scripts/CodeGeneratorV8.pm ('k') | Source/bindings/scripts/preprocess_idls.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698