| 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;
|
|
|