Reviewed by Darin.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Sep 2006 20:38:00 +0000 (20:38 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Sep 2006 20:38:00 +0000 (20:38 +0000)
        Bug 10685: ObjC DOM should have no unnamed parameters
        http://bugzilla.opendarwin.org/show_bug.cgi?id=10685

        - The ObjC code generation script now outputs parameter prefixes
          for methods that have more than 1 parameter. This prefix is simply
          the parameter name. Some parameter names have been changed in the IDL
          files to produce better prefixes. If an extended attribute of "ObjCPrefix"
          exists on a parameter we will use that for the prefix.

        - A backwards compatible version of the method is placed in a
          category with a deprecation marco for 10.5 and later. This step only
          happens if the IDL extended attribute "OldStyleObjC" is defined.
          All new functions in IDL should not get this attribute.

        - Made the $interfaceMethodSelector regex in IDLStructure.pm allow "=" so
          parameter extended attributes can have values.

        - Moved RemoveExcludedAttributesAndFunctions to CodeGenerator.pm
          so it can be shared between the two generators.

        - Removed the die when we encounter a getter that uses exceptions.
          Sam Weinig added support for this in an earlier change.

        - Check if $ENV{"MACOSX_DEPLOYMENT_TARGET"} is defined before we compare.
          This caused a perl warning when generating on other platforms.

        - The ObjC generation will not happen on platforms other than Mac OS.
          This is determined by the "OS" env variable Xcode sets. This check
          is in the DerivedSources.make.

        - Added a way to skip generation if the constructor of the specific
          generator returns undef. Not used yet.

        - Many cleanup tweaks in CodeGeneratorObjC.pm.

        - Removed IDL and CSS files from the project's resource copy phase,
          these do no need to be in WebCore's resources.

        * DerivedSources.make
        * WebCore.xcodeproj/project.pbxproj
        * bindings/scripts/CodeGenerator.pm
        * bindings/scripts/CodeGeneratorJS.pm
        * bindings/scripts/CodeGeneratorObjC.pm
        * bindings/scripts/IDLStructure.pm
        * css/CSSMediaRule.idl
        * css/CSSPrimitiveValue.idl
        * css/CSSStyleDeclaration.idl
        * css/CSSStyleSheet.idl
        * dom/CharacterData.idl
        * dom/DOMImplementation.idl
        * dom/Document.idl
        * dom/Element.idl
        * dom/KeyboardEvent.idl
        * dom/MouseEvent.idl
        * dom/MutationEvent.idl
        * dom/NamedNodeMap.idl
        * dom/UIEvent.idl
        * html/HTMLCanvasElement.idl
        * html/HTMLSelectElement.idl
        * ksvg2/bindings/idl/svg/SVGLengthList.idl
        * ksvg2/bindings/idl/svg/SVGNumberList.idl
        * ksvg2/bindings/idl/svg/SVGPointList.idl
        * ksvg2/bindings/idl/svg/SVGStringList.idl
        * ksvg2/bindings/idl/svg/SVGTextContentElement.idl
        * ksvg2/bindings/idl/svg/SVGTransformList.idl
        * ksvg2/svg/SVGSVGElement.idl
        * page/DOMWindow.idl

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16201 268f45cc-cd09-0410-ab3c-d52691b4dbfc

30 files changed:
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/scripts/CodeGenerator.pm
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bindings/scripts/CodeGeneratorObjC.pm
WebCore/bindings/scripts/IDLStructure.pm
WebCore/css/CSSMediaRule.idl
WebCore/css/CSSPrimitiveValue.idl
WebCore/css/CSSStyleDeclaration.idl
WebCore/css/CSSStyleSheet.idl
WebCore/dom/CharacterData.idl
WebCore/dom/DOMImplementation.idl
WebCore/dom/Document.idl
WebCore/dom/Element.idl
WebCore/dom/KeyboardEvent.idl
WebCore/dom/MouseEvent.idl
WebCore/dom/MutationEvent.idl
WebCore/dom/NamedNodeMap.idl
WebCore/dom/UIEvent.idl
WebCore/html/HTMLCanvasElement.idl
WebCore/html/HTMLSelectElement.idl
WebCore/ksvg2/bindings/idl/svg/SVGLengthList.idl
WebCore/ksvg2/bindings/idl/svg/SVGNumberList.idl
WebCore/ksvg2/bindings/idl/svg/SVGPointList.idl
WebCore/ksvg2/bindings/idl/svg/SVGStringList.idl
WebCore/ksvg2/bindings/idl/svg/SVGTextContentElement.idl
WebCore/ksvg2/bindings/idl/svg/SVGTransformList.idl
WebCore/ksvg2/svg/SVGSVGElement.idl
WebCore/page/DOMWindow.idl

index 1daba83..3988830 100644 (file)
@@ -1,3 +1,75 @@
+2006-09-03  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Darin.
+
+        Bug 10685: ObjC DOM should have no unnamed parameters
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=10685
+
+        - The ObjC code generation script now outputs parameter prefixes
+          for methods that have more than 1 parameter. This prefix is simply
+          the parameter name. Some parameter names have been changed in the IDL
+          files to produce better prefixes. If an extended attribute of "ObjCPrefix"
+          exists on a parameter we will use that for the prefix.
+
+        - A backwards compatible version of the method is placed in a
+          category with a deprecation marco for 10.5 and later. This step only
+          happens if the IDL extended attribute "OldStyleObjC" is defined.
+          All new functions in IDL should not get this attribute.
+
+        - Made the $interfaceMethodSelector regex in IDLStructure.pm allow "=" so 
+          parameter extended attributes can have values.
+
+        - Moved RemoveExcludedAttributesAndFunctions to CodeGenerator.pm
+          so it can be shared between the two generators.
+          
+        - Removed the die when we encounter a getter that uses exceptions.
+          Sam Weinig added support for this in an earlier change.
+
+        - Check if $ENV{"MACOSX_DEPLOYMENT_TARGET"} is defined before we compare.
+          This caused a perl warning when generating on other platforms.
+
+        - The ObjC generation will not happen on platforms other than Mac OS.
+          This is determined by the "OS" env variable Xcode sets. This check
+          is in the DerivedSources.make.
+
+        - Added a way to skip generation if the constructor of the specific
+          generator returns undef. Not used yet.
+
+        - Many cleanup tweaks in CodeGeneratorObjC.pm.
+
+        - Removed IDL and CSS files from the project's resource copy phase,
+          these do no need to be in WebCore's resources. 
+
+        * DerivedSources.make
+        * WebCore.xcodeproj/project.pbxproj
+        * bindings/scripts/CodeGenerator.pm
+        * bindings/scripts/CodeGeneratorJS.pm
+        * bindings/scripts/CodeGeneratorObjC.pm
+        * bindings/scripts/IDLStructure.pm
+        * css/CSSMediaRule.idl
+        * css/CSSPrimitiveValue.idl
+        * css/CSSStyleDeclaration.idl
+        * css/CSSStyleSheet.idl
+        * dom/CharacterData.idl
+        * dom/DOMImplementation.idl
+        * dom/Document.idl
+        * dom/Element.idl
+        * dom/KeyboardEvent.idl
+        * dom/MouseEvent.idl
+        * dom/MutationEvent.idl
+        * dom/NamedNodeMap.idl
+        * dom/UIEvent.idl
+        * html/HTMLCanvasElement.idl
+        * html/HTMLSelectElement.idl
+        * ksvg2/bindings/idl/svg/SVGLengthList.idl
+        * ksvg2/bindings/idl/svg/SVGNumberList.idl
+        * ksvg2/bindings/idl/svg/SVGPointList.idl
+        * ksvg2/bindings/idl/svg/SVGStringList.idl
+        * ksvg2/bindings/idl/svg/SVGTextContentElement.idl
+        * ksvg2/bindings/idl/svg/SVGTransformList.idl
+        * ksvg2/svg/SVGSVGElement.idl
+        * page/DOMWindow.idl
+
 2006-09-03  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by Tim H.
index 5c8c3cc..a330526 100644 (file)
@@ -356,7 +356,7 @@ SVGElementFactory.cpp SVGNames.cpp : ksvg2/scripts/make_names.pl ksvg2/svg/svgta
 XLinkNames.cpp : ksvg2/scripts/make_names.pl ksvg2/misc/xlinkattrs.in
        perl $< --attrs $(WebCore)/ksvg2/misc/xlinkattrs.in \
             --namespace XLink --cppNamespace WebCore --namespaceURI "http://www.w3.org/1999/xlink" --output .
-            
+
 XMLNames.cpp : ksvg2/scripts/make_names.pl xml/xmlattrs.in
        perl $< --attrs $(WebCore)/xml/xmlattrs.in \
             --namespace XML --cppNamespace WebCore --namespaceURI "http://www.w3.org/XML/1998/namespace" --output .
@@ -407,7 +407,9 @@ OBJC_BINDINGS_SCRIPTS = \
 #
 
 DOM%.h : %.idl $(OBJC_BINDINGS_SCRIPTS)
-       perl -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES)" --generator ObjC --include dom --include html --include xpath --include ksvg2/svg --outputdir  . $<
+ifeq ($(OS),MACOS)
+       perl -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES)" --generator ObjC --include dom --include html --include xpath --include ksvg2/svg --outputdir . $<
+endif
 
 # new-style JavaScript bindings
 
@@ -420,4 +422,4 @@ JS_BINDINGS_SCRIPTS = \
 #
 
 JS%.h : %.idl $(JS_BINDINGS_SCRIPTS)
-       perl -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES)" --generator JS --include dom --include html --include xml --include ksvg2/svg --outputdir  . $<
+       perl -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES)" --generator JS --include dom --include html --include xml --include ksvg2/svg --outputdir . $<
index 364b911..2e1225c 100644 (file)
@@ -62,7 +62,6 @@
                1A6938020A11100A00C127FE /* TextDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6938000A11100A00C127FE /* TextDocument.h */; };
                1A750D5C0A90DEE1000FF215 /* JSTreeWalker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A750D5A0A90DEE1000FF215 /* JSTreeWalker.cpp */; };
                1A750D5D0A90DEE1000FF215 /* JSTreeWalker.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A750D5B0A90DEE1000FF215 /* JSTreeWalker.h */; };
-               1A750D880A90E394000FF215 /* NodeIterator.idl in Resources */ = {isa = PBXBuildFile; fileRef = 1A750D870A90E394000FF215 /* NodeIterator.idl */; };
                1A750D8D0A90E521000FF215 /* JSNodeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A750D8B0A90E521000FF215 /* JSNodeIterator.cpp */; };
                1A750D8E0A90E521000FF215 /* JSNodeIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A750D8C0A90E521000FF215 /* JSNodeIterator.h */; };
                1A750DD40A90E729000FF215 /* JSNodeIteratorCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A750DD30A90E729000FF215 /* JSNodeIteratorCustom.cpp */; };
                85032DE80AA8C9BE007D3B7D /* DOMCSSStyleRule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85032DD40AA8C9BE007D3B7D /* DOMCSSStyleRule.mm */; };
                85032DE90AA8C9BE007D3B7D /* DOMCSSUnknownRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 85032DD50AA8C9BE007D3B7D /* DOMCSSUnknownRule.h */; };
                85032DEA0AA8C9BE007D3B7D /* DOMCSSUnknownRule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85032DD60AA8C9BE007D3B7D /* DOMCSSUnknownRule.mm */; };
-               85089CC80A98C22600A275AA /* Comment.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85089CC70A98C22600A275AA /* Comment.idl */; };
-               85089CCA0A98C2AB00A275AA /* CDATASection.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85089CC90A98C2AB00A275AA /* CDATASection.idl */; };
-               85089CCC0A98C33A00A275AA /* EntityReference.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85089CCB0A98C33A00A275AA /* EntityReference.idl */; };
                85089CD70A98C42800A275AA /* DOMCDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 85089CCF0A98C42700A275AA /* DOMCDATASection.h */; settings = {ATTRIBUTES = (); }; };
                85089CD80A98C42800A275AA /* DOMCDATASection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85089CD00A98C42700A275AA /* DOMCDATASection.mm */; };
                85089CD90A98C42800A275AA /* DOMComment.h in Headers */ = {isa = PBXBuildFile; fileRef = 85089CD10A98C42700A275AA /* DOMComment.h */; settings = {ATTRIBUTES = (); }; };
                85ACA99D0A9B575900671E90 /* DOMText.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACA99B0A9B575900671E90 /* DOMText.mm */; };
                85ACA9C00A9B5FA500671E90 /* DOMElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACA9BE0A9B5FA500671E90 /* DOMElement.h */; settings = {ATTRIBUTES = (); }; };
                85ACA9C10A9B5FA500671E90 /* DOMElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACA9BF0A9B5FA500671E90 /* DOMElement.mm */; };
-               85ACA9FB0A9B631000671E90 /* NamedNodeMap.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85ACA9F90A9B631000671E90 /* NamedNodeMap.idl */; };
-               85ACA9FC0A9B631000671E90 /* NodeList.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85ACA9FA0A9B631000671E90 /* NodeList.idl */; };
                85ACAA8D0A9B759C00671E90 /* DOMNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACAA890A9B759C00671E90 /* DOMNodeList.h */; settings = {ATTRIBUTES = (); }; };
                85ACAA8E0A9B759C00671E90 /* DOMNodeList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACAA8A0A9B759C00671E90 /* DOMNodeList.mm */; };
                85ACABB00A9CAF8000671E90 /* DOMDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACABAE0A9CAF8000671E90 /* DOMDocument.h */; settings = {ATTRIBUTES = (); }; };
                BC1A37C0097C715F0019F3D8 /* DOMViews.h in Headers */ = {isa = PBXBuildFile; fileRef = BC1A37AA097C715F0019F3D8 /* DOMViews.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC1A37C1097C715F0019F3D8 /* DOMViews.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC1A37AB097C715F0019F3D8 /* DOMViews.mm */; };
                BC1A37C2097C715F0019F3D8 /* DOMViewsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BC1A37AC097C715F0019F3D8 /* DOMViewsInternal.h */; };
-               BC5EC1770A507E3E006007F5 /* view-source.css in Resources */ = {isa = PBXBuildFile; fileRef = BC5EC1760A507E3E006007F5 /* view-source.css */; };
                BC6B7BAF0993603C0052867B /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6B7BAE0993603C0052867B /* Image.cpp */; };
                BC6B7ECF0998AC7F0052867B /* ImageSource.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6B7ECE0998AC7F0052867B /* ImageSource.h */; };
                BC6D6DD209AF906600F59759 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6D6DD009AF906600F59759 /* Font.cpp */; };
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
+                       projectRoot = "";
+                       shouldCheckCompatibility = 1;
                        targets = (
                                93F198A508245E59001E9ABC /* WebCore */,
                                DD041FBE09D9DDBE0010AF2A /* Derived Sources */,
                                A7B97B850979C3A1000E8EB1 /* WKTableTransferFilter.cikernel in Resources */,
                                A7638A92099592C30007E14F /* WKDisplacementMapFilter.cikernel in Resources */,
                                AB4261D80A2F6C9700BDD17D /* missingImage.tiff in Resources */,
-                               BC5EC1770A507E3E006007F5 /* view-source.css in Resources */,
                                1CD4418D0A4CE76F00A007AB /* eastWestResizeCursor.tiff in Resources */,
                                1CD4418E0A4CE76F00A007AB /* northEastSouthWestResizeCursor.tiff in Resources */,
                                1CD4418F0A4CE76F00A007AB /* northSouthResizeCursor.tiff in Resources */,
                                1CD441900A4CE76F00A007AB /* northWestSouthEastResizeCursor.tiff in Resources */,
-                               1A750D880A90E394000FF215 /* NodeIterator.idl in Resources */,
-                               85089CC80A98C22600A275AA /* Comment.idl in Resources */,
-                               85089CCA0A98C2AB00A275AA /* CDATASection.idl in Resources */,
-                               85089CCC0A98C33A00A275AA /* EntityReference.idl in Resources */,
-                               85ACA9FB0A9B631000671E90 /* NamedNodeMap.idl in Resources */,
-                               85ACA9FC0A9B631000671E90 /* NodeList.idl in Resources */,
                                5115095C0A9CE04700901013 /* urlIcon.tiff in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
index 0ae8023..54b32d2 100644 (file)
@@ -76,23 +76,26 @@ sub ProcessDocument
   # Dynamically load external code generation perl module...
   require $ifaceName . ".pm";
   $codeGenerator = $ifaceName->new($object, $useOutputDir, $useLayerOnTop);
-
-#  print " | *** Starting to generate code using \"$ifaceName\"...\n |\n";
+  unless (defined($codeGenerator)) {
+    my $classes = $useDocument->classes;
+    foreach(@$classes) {
+      my $class = $_;
+      print "Skipping $useGenerator code generation for IDL interface \"" . $class->name . "\".\n";
+    }
+    return;
+  }
 
   # Start the actual code generation!
   $codeGenerator->GenerateModule($useDocument);
 
-  my $arrayRef = $useDocument->classes;
-  foreach(@$arrayRef) {
+  my $classes = $useDocument->classes;
+  foreach(@$classes) {
     my $class = $_;
-
-    print "Generating code for IDL interface \"" . $class->name . "\"...\n";
+    print "Generating $useGenerator bindings code for IDL interface \"" . $class->name . "\"...\n";
     $codeGenerator->GenerateInterface($class);
   }
 
   $codeGenerator->finish();
-
-#  print " | *** Finished generation!\n";
 }
 
 sub AddMethodsConstantsAndAttributesFromParentClasses
@@ -412,6 +415,34 @@ sub RecursiveInheritanceHelper
 }
 
 # Helper for all CodeGenerator***.pm modules
+sub RemoveExcludedAttributesAndFunctions
+{
+    my $object = shift;
+    my $dataNode = shift;
+    my $excludeLang = shift;
+
+    my $i = 0;
+    while ($i < @{$dataNode->attributes}) {
+        my $lang = ${$dataNode->attributes}[$i]->signature->extendedAttributes->{"Exclude"};
+        if ($lang and $lang eq $excludeLang) {
+            splice(@{$dataNode->attributes}, $i, 1);
+        } else {
+            $i++;
+        }
+    }
+
+    $i = 0;
+    while ($i < @{$dataNode->functions}) {
+        my $lang = ${$dataNode->functions}[$i]->signature->extendedAttributes->{"Exclude"};
+        if ($lang and $lang eq $excludeLang) {
+            splice(@{$dataNode->functions}, $i, 1);
+        } else {
+            $i++;
+        }
+    }
+}
+
+# Helper for all CodeGenerator***.pm modules
 sub IsPrimitiveType
 {
   my $object = shift;
index 13e5c21..a246fe6 100644 (file)
@@ -87,7 +87,7 @@ sub GenerateInterface
     my $object = shift;
     my $dataNode = shift;
 
-    $object->RemoveExcludedAttributesAndFunctions($dataNode);
+    $codeGenerator->RemoveExcludedAttributesAndFunctions($dataNode, "JS");
 
     # Start actual generation..
     $object->GenerateHeader($dataNode);
@@ -112,32 +112,6 @@ sub GenerateModule
     $module = $dataNode->module;    
 }
 
-sub RemoveExcludedAttributesAndFunctions
-{
-    my $object = shift;
-    my $dataNode = shift;
-
-    my $i = 0;
-    while ($i < scalar(@{$dataNode->attributes})) {
-        my $lang = ${$dataNode->attributes}[$i]->signature->extendedAttributes->{"Exclude"};
-        if ($lang and $lang eq "JS") {
-            splice(@{$dataNode->attributes}, $i, 1);
-        } else {
-            $i++;
-        }
-    }
-
-    $i = 0;
-    while ($i < scalar(@{$dataNode->functions})) {
-        my $lang = ${$dataNode->functions}[$i]->signature->extendedAttributes->{"Exclude"};
-        if ($lang and $lang eq "JS") {
-            splice(@{$dataNode->functions}, $i, 1);
-        } else {
-            $i++;
-        }
-    }
-}
-
 sub GetParentClassName
 {
     my $dataNode = shift;
index fc7ae1d..2242d21 100644 (file)
@@ -117,7 +117,7 @@ sub GenerateInterface
     my $object = shift;
     my $dataNode = shift;
 
-    $object->RemoveExcludedAttributesAndFunctions($dataNode);
+    $codeGenerator->RemoveExcludedAttributesAndFunctions($dataNode, "ObjC");
 
     # Start actual generation..
     $object->GenerateHeader($dataNode);
@@ -142,37 +142,10 @@ sub GenerateModule
     $module = $dataNode->module;    
 }
 
-sub RemoveExcludedAttributesAndFunctions
-{
-    my $object = shift;
-    my $dataNode = shift;
-
-    my $i = 0;
-
-    while ($i < @{$dataNode->attributes}) {
-        my $lang = ${$dataNode->attributes}[$i]->signature->extendedAttributes->{"Exclude"};
-        if ($lang and $lang eq "ObjC") {
-            splice(@{$dataNode->attributes}, $i, 1);
-        } else {
-            $i++;
-        }
-    }
-
-    $i = 0;
-    while ($i < @{$dataNode->functions}) {
-        my $lang = ${$dataNode->functions}[$i]->signature->extendedAttributes->{"Exclude"};
-        if ($lang and $lang eq "ObjC") {
-            splice(@{$dataNode->functions}, $i, 1);
-        } else {
-            $i++;
-        }
-    }
-}
-
 sub GetClassName
 {
     my $name = $codeGenerator->StripModule(shift);
-    
+
     # special cases
     if ($name eq "boolean") {
         return "BOOL";
@@ -218,12 +191,10 @@ sub GetParentImplClassName
 {
     my $dataNode = shift;
 
-    if (@{$dataNode->parents} eq 0) {
-        return "Object";
-    }
+    return "Object" if @{$dataNode->parents} eq 0;
 
     my $parent = $codeGenerator->StripModule($dataNode->parents(0));
-    
+
     # special cases
     if ($parent eq "EventTargetNode") {
         $parent = "Node";
@@ -318,7 +289,7 @@ sub AddForwardDeclarationsForType
     if ($codeGenerator->IsPrimitiveType($type) or $type eq "DOMString") {
         return;
     }
-    
+
     if ($type eq "DOMImplementation") {
         $headerForwardDeclarations{"$type"} = 1;
         return;
@@ -330,7 +301,6 @@ sub AddForwardDeclarationsForType
     }
 
     if ($type eq "XPathNSResolver") {
-        # Only one protocol so far.
         $headerForwardDeclarationsForProtocols{"DOMXPathNSResolver"} = 1;
         return;
     }
@@ -341,10 +311,8 @@ sub AddForwardDeclarationsForType
 sub AddIncludesForType
 {
     my $type = $codeGenerator->StripModule(shift);
-    
-    if ($codeGenerator->IsPrimitiveType($type)) {
-        return;
-    }
+
+    return if $codeGenerator->IsPrimitiveType($type);
 
     if ($type eq "DOMString") {
         $implIncludes{"PlatformString.h"} = 1;
@@ -372,14 +340,12 @@ sub AddIncludesForType
     }
 
     # Temp DOMStylesheets.h
-    if ($type eq "StyleSheet"
-            or $type eq "StyleSheetList"
-            or $type eq "MediaList") {
+    if ($type eq "StyleSheet" or $type eq "StyleSheetList" or $type eq "MediaList") {
         $implIncludes{"DOMStylesheets.h"} = 1;
         $implIncludes{"$type.h"} = 1;
         return;
     }
-    
+
     # Temp DOMViews.h
     if ($type eq "DOMWindow") {
         $implIncludes{"DOMViews.h"} = 1;
@@ -387,11 +353,9 @@ sub AddIncludesForType
         $implIncludes{"$type.h"} = 1;
         return;
     }
-    
+
     # Temp DOMXPath.h
-    if ($type eq "XPathExpression"
-            or $type eq "XPathNSResolver"
-            or $type eq "XPathResult") {
+    if ($type eq "XPathExpression" or $type eq "XPathNSResolver" or $type eq "XPathResult") {
         $implIncludes{"DOMXPath.h"} = 1;
         $implIncludes{"DOMXPathInternal.h"} = 1;
         $implIncludes{"$type.h"} = 1;
@@ -411,7 +375,7 @@ sub AddIncludesForType
 
 
     # Add type specific internal types.
-    $implIncludes{"DOMHTMLInternal.h"} = 1 if ($type =~ /^HTML/);
+    $implIncludes{"DOMHTMLInternal.h"} = 1 if $type =~ /^HTML/;
 
     # Default, include the same named file (the implementation) and the same name prefixed with "DOM". 
     $implIncludes{"$type.h"} = 1;
@@ -424,9 +388,7 @@ sub GenerateHeader
     my $dataNode = shift;
 
     # Make sure that we don't have more than one parent.
-    if (@{$dataNode->parents} > 1) {
-        die "A class can't have more than one parent.";
-    }
+    die "A class can't have more than one parent in ObjC." if @{$dataNode->parents} > 1;
 
     my $interfaceName = $dataNode->name;
     my $className = GetClassName($interfaceName);
@@ -465,7 +427,7 @@ sub GenerateHeader
         push(@headerContent, $combinedConstants);
         push(@headerContent, "\n};\n\n");        
     }
-    
+
     # - Begin @interface 
     push(@headerContent, "\@interface $className : $parentClassName\n");
 
@@ -475,7 +437,7 @@ sub GenerateHeader
 
         foreach (@{$dataNode->attributes}) {
             my $attribute = $_;
-            
+
             AddForwardDeclarationsForType($attribute->signature->type);
 
             my $attributeName = $attribute->signature->name;
@@ -490,30 +452,27 @@ sub GenerateHeader
             my $attributeType = GetObjCType($attribute->signature->type);
             my $attributeIsReadonly = ($attribute->type =~ /^readonly/);
 
-            if ($ENV{"MACOSX_DEPLOYMENT_TARGET"} >= 10.5) {
+            if ($ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} >= 10.5) {
                 my $property = "\@property" . ($attributeIsReadonly ? "(readonly)" : "") . " " . $attributeType . ($attributeType =~ /\*$/ ? "" : " ") . $attributeName . ";\n";
-
                 push(@headerAttributes, $property);
             } else {
                 # - GETTER
                 my $getter = "- (" . $attributeType . ")" . $attributeName . ";\n";
-
                 push(@headerAttributes, $getter);
 
                 # - SETTER
                 if (!$attributeIsReadonly) {
                     my $setter = "- (void)set" . ucfirst($attributeName) . ":(" . $attributeType . ")new" . ucfirst($attributeName) . ";\n";
-                    
                     push(@headerAttributes, $setter);
                 }
             }
         }
 
-        if (@headerAttributes > 0) {
-            push(@headerContent, @headerAttributes);
-        }
+        push(@headerContent, @headerAttributes) if @headerAttributes > 0;
     }
 
+    my @deprecatedHeaderFunctions = ();
+
     # - Add functions.
     if ($numFunctions > 0) {
         my @headerFunctions = ();
@@ -527,19 +486,36 @@ sub GenerateHeader
             my $returnType = GetObjCType($function->signature->type);
             my $numberOfParameters = @{$function->parameters};
 
-            my $output = "- ($returnType)$functionName";
+            my $parameterIndex = 0;
+            my $functionSig = "- ($returnType)$functionName";
             foreach my $param (@{$function->parameters}) {
                 my $paramName = $param->name;
                 my $paramType = GetObjCType($param->type);
+
                 AddForwardDeclarationsForType($param->type);
 
-                $output .= ":($paramType)$paramName ";
+                if ($parameterIndex >= 1) {
+                    my $paramPrefix = $param->extendedAttributes->{"ObjCPrefix"};
+                    $paramPrefix = $paramName unless defined($paramPrefix);
+                    $functionSig .= " $paramPrefix";
+                }
+
+                $functionSig .= ":($paramType)$paramName";
+
+                $parameterIndex++;
+            }
+
+            $functionSig .= ";\n";
+
+            push(@headerFunctions, $functionSig);
+
+            # generate the old style method names with un-named parameters, these methods are deprecated
+            if (@{$function->parameters} > 1 and $function->signature->extendedAttributes->{"OldStyleObjC"}) {
+                my $deprecatedFunctionSig = $functionSig;
+                $deprecatedFunctionSig =~ s/\s\w+:/ :/g; # remove parameter names
+                $deprecatedFunctionSig =~ s/;\n$/ DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER;\n/;
+                push(@deprecatedHeaderFunctions, $deprecatedFunctionSig);
             }
-            # remove any trailing spaces.
-            $output =~ s/\s+$//;
-            $output .= ";\n";
-    
-            push(@headerFunctions, $output);
         }
 
         if (@headerFunctions > 0) {
@@ -550,6 +526,13 @@ sub GenerateHeader
 
     # - End @interface 
     push(@headerContent, "\@end\n");
+
+    if (@deprecatedHeaderFunctions > 0) {
+        # - Deprecated category @interface 
+        push(@headerContent, "\n\@interface $className (" . $className . "Deprecated)\n");
+        push(@headerContent, @deprecatedHeaderFunctions);
+        push(@headerContent, "\@end\n");
+    }
 }
 
 sub GenerateImplementation
@@ -576,7 +559,7 @@ sub GenerateImplementation
     if ($hasFunctionsOrAttributes) {
         push(@implContentHeader, "#import \"DOMInternal.h\"\n");
         push(@implContentHeader, "#import <wtf/GetPtr.h>\n");
-        
+
         # include module-dependent internal interfaces.
         if ($module eq "html") {
             # HTML module internal interfaces
@@ -665,20 +648,14 @@ sub GenerateImplementation
 
             # - GETTER
             my $getterSig = "- ($attributeType)$interfaceName\n";
-            
-            # Exception handling
             my $hasGetterException = @{$attribute->getterExceptions};
-            if ($hasGetterException) {
-                die "We should not have any getter exceptions yet!";
-            }
-            
             my $getterContentHead = "IMPL->$attributeName(";
             my $getterContentTail = ")";
 
             my $attributeTypeSansPtr = $attributeType;
             $attributeTypeSansPtr =~ s/ \*$//; # Remove trailing " *" from pointer types.
             my $typeMaker = GetObjCTypeMaker($attribute->signature->type);
-            
+
             # Special cases
             if ($attributeTypeSansPtr eq "DOMImplementation") {
                 # FIXME: We have to special case DOMImplementation until DOMImplementationFront is removed
@@ -693,14 +670,14 @@ sub GenerateImplementation
                 $getterContentHead = "[$attributeTypeSansPtr $typeMaker:WTF::getPtr(" . $getterContentHead;
                 $getterContentTail .= ")]";
             }
-            
+
             my $getterContent;
             if ($hasGetterException) {
                 $getterContent = $getterContentHead . "ec" . $getterContentTail;
             } else {
                 $getterContent = $getterContentHead . $getterContentTail;
             }
-            
+
             push(@implContent, $getterSig);
             push(@implContent, "{\n");
             if ($hasGetterException) {
@@ -743,7 +720,6 @@ sub GenerateImplementation
                     $arg = "[" . $argName . " _" . lcfirst($idlType) . "]";
                 }
 
-
                 my $setterSig = "- (void)$setterName:($attributeType)$argName\n";
 
                 push(@implContent, $setterSig);
@@ -766,6 +742,8 @@ sub GenerateImplementation
         }
     }
 
+    my @deprecatedFunctions = ();
+
     # - Functions
     if ($numFunctions > 0) {
         foreach (@{$dataNode->functions}) {
@@ -782,14 +760,14 @@ sub GenerateImplementation
             my @needsAssert = ();
             my %custom = ();
 
+            my $parameterIndex = 0;
             my $functionSig = "- ($returnType)$functionName";
             foreach (@{$function->parameters}) {
                 my $param = $_;
-
+                my $paramName = $param->name;
                 my $paramType = GetObjCType($param->type);
-                AddIncludesForType($param->type);
 
-                my $paramName = $param->name;
+                AddIncludesForType($param->type);
 
                 # FIXME: should move this out into it's own fuction to share with
                 # the similar setter parameter code above.
@@ -815,13 +793,27 @@ sub GenerateImplementation
                     push(@needsAssert, "    ASSERT($paramName);\n");
                 }
 
-                $functionSig .= ":($paramType)$paramName ";
+                if ($parameterIndex >= 1) {
+                    my $paramPrefix = $param->extendedAttributes->{"ObjCPrefix"};
+                    $paramPrefix = $paramName unless defined($paramPrefix);
+                    $functionSig .= " $paramPrefix";
+                }
+
+                $functionSig .= ":($paramType)$paramName";
+
+                $parameterIndex++;
             }
-            # remove any trailing spaces.
-            $functionSig =~ s/\s+$//;
 
             my @functionContent = ();
 
+            # special case the XPathNSResolver
+            if (defined $needsCustom{"XPathNSResolver"}) {
+                my $paramName = $needsCustom{"XPathNSResolver"};
+                push(@functionContent, "    if ($paramName && ![$paramName isMemberOfClass:[DOMNativeXPathNSResolver class]])\n");
+                push(@functionContent, "        [NSException raise:NSGenericException format:\@\"createExpression currently does not work with custom NS resolvers\"];\n");
+                push(@functionContent, "    DOMNativeXPathNSResolver *nativeResolver = (DOMNativeXPathNSResolver *)$paramName;\n\n");
+            }
+
             if ($returnType eq "void") {
                 # Special case 'void' return type.
                 my $functionContentHead = "IMPL->$functionName(";
@@ -842,7 +834,7 @@ sub GenerateImplementation
                         $content = $functionContentHead . $functionContentTail;
                     }
                 }
-                
+
                 if ($raisesExceptions) {
                     push(@functionContent, "    $exceptionInit\n");
                     push(@functionContent, "    $content\n");
@@ -892,7 +884,7 @@ sub GenerateImplementation
                         $content = $functionContentHead . $functionContentTail;
                     }
                 }
-                
+
                 if ($raisesExceptions) {
                     # Differentiated between when the return type is a pointer and
                     # not for white space issue (ie. Foo *result vs. int result).
@@ -901,7 +893,7 @@ sub GenerateImplementation
                     } else {
                         $content = $returnType . " result = " . $content;
                     }
-                    
+
                     push(@functionContent, "    $exceptionInit\n");
                     push(@functionContent, "    $content;\n");
                     push(@functionContent, "    $exceptionRaiseOnError\n");
@@ -913,18 +905,20 @@ sub GenerateImplementation
 
             push(@implContent, "$functionSig\n");
             push(@implContent, "{\n");
-            
-            # special case the XPathNSResolver
-            if (defined $needsCustom{"XPathNSResolver"}) {
-                my $paramName = $needsCustom{"XPathNSResolver"};
-                push(@implContent, "    if ($paramName && ![$paramName isMemberOfClass:[DOMNativeXPathNSResolver class]])\n");
-                push(@implContent, "        [NSException raise:NSGenericException format:\@\"createExpression currently does not work with custom NS resolvers\"];\n");
-                push(@implContent, "    DOMNativeXPathNSResolver *nativeResolver = (DOMNativeXPathNSResolver *)$paramName;\n\n");
-            }
-
             push(@implContent, @functionContent);
             push(@implContent, "}\n\n");
-            
+
+            # generate the old style method names with un-named parameters, these methods are deprecated
+            if (@{$function->parameters} > 1 and $function->signature->extendedAttributes->{"OldStyleObjC"}) {
+                my $deprecatedFunctionSig = $functionSig;
+                $deprecatedFunctionSig =~ s/\s\w+:/ :/g; # remove parameter names
+
+                push(@deprecatedFunctions, "\n$deprecatedFunctionSig\n");
+                push(@deprecatedFunctions, "{\n");
+                push(@deprecatedFunctions, @functionContent);
+                push(@deprecatedFunctions, "}\n\n");
+            }
+
             # Clear the hash
             %needsCustom = ();
         }
@@ -932,6 +926,13 @@ sub GenerateImplementation
 
     # END implementation
     push(@implContent, "\@end\n");
+
+    if (@deprecatedFunctions > 0) {
+        # - Deprecated category @implementation
+        push(@implContent, "\n\@implementation $className (" . $className . "Deprecated)\n");
+        push(@implContent, @deprecatedFunctions);
+        push(@implContent, "\@end\n");
+    }
 }
 
 # Internal helper
@@ -940,21 +941,19 @@ sub WriteData
     if (defined($IMPL)) {
         # Write content to file.
         print $IMPL @implContentHeader;
-        
+
         my $includeCount = 0;
         foreach my $implInclude (sort keys(%implIncludes)) {
             print $IMPL "#import \"$implInclude\"\n";
             $includeCount++;
         }
-        
-        unless ($includeCount == 0) {
-            print $IMPL "\n";
-        }
+
+        print $IMPL "\n" if $includeCount;
 
         print $IMPL @implContent;
         close($IMPL);
         undef($IMPL);
-        
+
         @implHeaderContent = "";
         @implContent = "";    
         %implIncludes = ();
@@ -963,26 +962,24 @@ sub WriteData
     if (defined($HEADER)) {
         # Write content to file.
         print $HEADER @headerContentHeader;
-        
+
         my $forwardDeclarationCount = 0;
         foreach my $forwardClassDeclaration (sort keys(%headerForwardDeclarations)) {
             print $HEADER "\@class $forwardClassDeclaration;\n";
             $forwardDeclarationCount++;
         }
-        
+
         foreach my $forwardProtocolDeclaration (sort keys(%headerForwardDeclarationsForProtocols)) {
             print $HEADER "\@protocol $forwardProtocolDeclaration;\n";
             $forwardDeclarationCount++;
         }
-        
-        unless ($forwardDeclarationCount == 0) {
-            print $HEADER "\n";
-        }
+
+        print $HEADER "\n" if $forwardDeclarationCount;
 
         print $HEADER @headerContent;
         close($HEADER);
         undef($HEADER);
-        
+
         @headerContentHeader = "";
         @headerContent = "";
         %headerForwardDeclarations = ();
index 6e5a712..1fe4068 100644 (file)
@@ -99,7 +99,7 @@ $exceptionSelector = 'exception\s*(' . $idlIdNs . '*)\s*([a-zA-Z\s{;]*};)';
 $exceptionSubSelector = '{\s*' . $supportedTypes . '\s*(' . $idlType . '*)\s*;\s*}';
 
 $interfaceSelector = 'interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([a-zA-Z0-9_=\s(),;:\[\]]*)';
-$interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,\[\]]*)';
+$interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]]*)';
 $interfaceParameterSelector = 'in\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
 
 $interfaceAttributeSelector = '\s*(readonly attribute|attribute)\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)';
index 8d673c7..5d7ed0d 100644 (file)
@@ -27,7 +27,7 @@ module css {
         readonly attribute CSSRuleList      cssRules;
         
         // FIXME: the DOM spec says that this can raise an exeception.
-        unsigned long      insertRule(in DOMString rule, 
+        [OldStyleObjC] unsigned long      insertRule(in DOMString rule, 
                                       in unsigned long index)
             /*raises(DOMException)*/;
             
index 34739eb..795b6ce 100644 (file)
@@ -51,11 +51,11 @@ module css {
 
         readonly attribute unsigned short primitiveType;
 
-        void setFloatValue(in unsigned short unitType,
+        [OldStyleObjC] void setFloatValue(in unsigned short unitType,
                            in float floatValue)
             raises(dom::DOMException);
         float getFloatValue(in unsigned short unitType);
-        void setStringValue(in unsigned short stringType, 
+        [OldStyleObjC] void setStringValue(in unsigned short stringType, 
                             in DOMString stringValue)
             raises(dom::DOMException);
         DOMString getStringValue();
index 7479e5e..7b9ceda 100644 (file)
@@ -31,7 +31,7 @@ module css {
         [Exclude=JS] DOMString          removeProperty(in DOMString propertyName)
             raises(DOMException);
         [Exclude=JS] DOMString          getPropertyPriority(in DOMString propertyName);
-        [Exclude=JS] void               setProperty(in DOMString propertyName, 
+        [Exclude=JS, OldStyleObjC] void setProperty(in DOMString propertyName, 
                                                     in DOMString value, 
                                                     in DOMString priority)
             raises(DOMException);
index da74b90..dc6b249 100644 (file)
@@ -25,7 +25,7 @@ module css {
 
         readonly attribute CSSRule          ownerRule;
         readonly attribute CSSRuleList      cssRules;
-        unsigned long      insertRule(in DOMString rule, 
+        [OldStyleObjC] unsigned long insertRule(in DOMString rule, 
                                       in unsigned long index)
             raises(DOMException);
         void               deleteRule(in unsigned long index)
index d2e9c8e..151bdc6 100644 (file)
@@ -26,24 +26,24 @@ module core {
 
         readonly attribute unsigned long length;
         
-        [ConvertNullStringTo=Null] DOMString substringData(in [IsIndex] unsigned long offset, 
-                                                           in [IsIndex] unsigned long count)
+        [ConvertNullStringTo=Null, OldStyleObjC] DOMString substringData(in [IsIndex] unsigned long offset, 
+                                                           in [IsIndex] unsigned long length)
             raises(DOMException);
 
-        void appendData(in DOMString arg)
+        void appendData(in DOMString data)
             raises(DOMException);
 
-        void insertData(in [IsIndex] unsigned long offset, 
-                        in DOMString arg)
+        [OldStyleObjC] void insertData(in [IsIndex] unsigned long offset, 
+                        in DOMString data)
             raises(DOMException);
 
-        void deleteData(in [IsIndex] unsigned long offset, 
-                        in [IsIndex] unsigned long count)
+        [OldStyleObjC] void deleteData(in [IsIndex] unsigned long offset, 
+                        in [IsIndex] unsigned long length)
             raises(DOMException);
 
-        void replaceData(in [IsIndex] unsigned long offset, 
-                         in [IsIndex] unsigned long count,
-                         in DOMString arg)
+        [OldStyleObjC] void replaceData(in [IsIndex] unsigned long offset, 
+                         in [IsIndex] unsigned long length,
+                         in DOMString data)
             raises(DOMException);
     
     };
index aa9930d..ee17e8d 100644 (file)
@@ -24,24 +24,24 @@ module core {
 
         // DOM Level 1
 
-        boolean hasFeature(in DOMString feature, 
+        [OldStyleObjC] boolean hasFeature(in DOMString feature, 
                            in [ConvertNullToNullString] DOMString version);
 
         // DOM Level 2
 
-        DocumentType createDocumentType(in DOMString qualifiedName,
+        [OldStyleObjC] DocumentType createDocumentType(in DOMString qualifiedName,
                                                          in DOMString publicId,
                                                          in DOMString systemId)
             raises(DOMException);
-        Document createDocument(in [ConvertNullToNullString] DOMString namespaceURI, 
+        [OldStyleObjC] Document createDocument(in [ConvertNullToNullString] DOMString namespaceURI, 
                                                  in [ConvertNullToNullString] DOMString qualifiedName, 
                                                  in [ConvertNullToNullString] DocumentType doctype)
             raises(DOMException);
 
         // DOMImplementationCSS interface from DOM Level 2 CSS
 
-        CSSStyleSheet createCSSStyleSheet(in DOMString title,
-                                                                                              in DOMString media)
+        [OldStyleObjC] CSSStyleSheet createCSSStyleSheet(in DOMString title,
+                                          in DOMString media)
             raises(DOMException);
 
         // HTMLDOMImplementation interface from DOM Level 2 HTML
index 130269d..9029adb 100644 (file)
@@ -42,7 +42,7 @@ module core {
         CDATASection createCDATASection(in DOMString data)
             raises(DOMException);
         
-        ProcessingInstruction createProcessingInstruction(in DOMString target, 
+        [OldStyleObjC] ProcessingInstruction createProcessingInstruction(in DOMString target, 
                                                                            in DOMString data)
             raises (DOMException);
         
@@ -56,19 +56,19 @@ module core {
         
         // DOM Level 2 Core
         
-        Node importNode(in Node importedNode,
+        [OldStyleObjC] Node importNode(in Node importedNode,
                                          in boolean deep)
             raises (DOMException);
         
-        Element createElementNS(in DOMString namespaceURI,
+        [OldStyleObjC] Element createElementNS(in DOMString namespaceURI,
                                                  in DOMString qualifiedName)
             raises (DOMException);
         
-        Attr createAttributeNS(in DOMString namespaceURI,
+        [OldStyleObjC] Attr createAttributeNS(in DOMString namespaceURI,
                                                 in DOMString qualifiedName)
             raises (DOMException);
         
-        NodeList getElementsByTagNameNS(in DOMString namespaceURI,
+        [OldStyleObjC] NodeList getElementsByTagNameNS(in DOMString namespaceURI,
                                                          in DOMString localName);
         
         Element getElementById(in DOMString elementId);
@@ -106,8 +106,8 @@ module core {
 
         // DOM Level 2 Style (DocumentCSS interface)
 
-        CSSStyleDeclaration getOverrideStyle(in Element elt, 
-                                             in DOMString pseudoElt);
+        [OldStyleObjC] CSSStyleDeclaration getOverrideStyle(in Element element, 
+                                             in DOMString pseudoElement);
 
         // DOM Level 3 Core
 
@@ -118,13 +118,13 @@ module core {
 
 #ifdef XPATH_SUPPORT
         // DOM Level 3 XPath (XPathEvaluator interface)
-        XPathExpression createExpression(in DOMString expression,
+        [OldStyleObjC] XPathExpression createExpression(in DOMString expression,
                                          in XPathNSResolver resolver)
             raises(DOMException);
 
         XPathNSResolver createNSResolver(in Node nodeResolver);
         
-        XPathResult evaluate(in DOMString expression,
+        [OldStyleObjC] XPathResult evaluate(in DOMString expression,
                              in Node contextNode, 
                              in XPathNSResolver resolver,
                              in unsigned short type,
index aec21bb..2f9bb3b 100644 (file)
@@ -28,7 +28,7 @@ module core {
 
         [ConvertNullStringTo=Null] DOMString getAttribute(in DOMString name);
 
-        void setAttribute(in DOMString name,
+        [OldStyleObjC] void setAttribute(in DOMString name,
                           in DOMString value)
             raises(DOMException);
 
@@ -47,22 +47,22 @@ module core {
 
         // DOM Level 2 Core
 
-        DOMString getAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
+        [OldStyleObjC] DOMString getAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                  in DOMString localName);
 
-        void setAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
+        [OldStyleObjC] void setAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
                             in DOMString qualifiedName, 
                             in DOMString value)
             raises(DOMException);
 
-        void removeAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
+        [OldStyleObjC] void removeAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                in DOMString localName)
             raises(DOMException);
 
-        NodeList getElementsByTagNameNS(in [ConvertNullToNullString] DOMString namespaceURI,
+        [OldStyleObjC] NodeList getElementsByTagNameNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                                          in DOMString localName);
 
-        Attr getAttributeNodeNS(in [ConvertNullToNullString] DOMString namespaceURI,
+        [OldStyleObjC] Attr getAttributeNodeNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                                  in DOMString localName);
 
         Attr setAttributeNodeNS(in Attr newAttr)
@@ -70,7 +70,7 @@ module core {
 
         boolean hasAttribute(in DOMString name);
 
-        boolean hasAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
+        [OldStyleObjC] boolean hasAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                in DOMString localName);
 
         readonly attribute CSSStyleDeclaration style;
@@ -108,7 +108,7 @@ module core {
         // IE extensions
 
         [Exclude=ObjC] Node insertAdjacentElement(in DOMString position, 
-                                                  in Node newElement)
+                                                  in Node element)
             raises(DOMException);
 
         [Exclude=ObjC] boolean contains(in Element element);
index bfc1caa..3fe7706 100644 (file)
@@ -29,17 +29,17 @@ module events {
         readonly attribute boolean          shiftKey;
         readonly attribute boolean          altGraphKey;
 
-        void initKeyboardEvent(in AtomicString typeArg
-                               in boolean canBubbleArg
-                               in boolean cancelableArg
-                               in DOMWindow viewArg
+        [OldStyleObjC] void initKeyboardEvent(in AtomicString type
+                               in boolean canBubble, 
+                               in boolean cancelable, 
+                               in DOMWindow view, 
                                in DOMString keyIdentifier,
-                               in unsigned long keyLocationArg,
-                               in boolean ctrlKeyArg,
-                               in boolean altKeyArg,
-                               in boolean shiftKeyArg,
-                               in boolean metaKeyArg,
-                               in boolean altGraphKeyArg);
+                               in unsigned long keyLocation,
+                               in boolean ctrlKey,
+                               in boolean altKey,
+                               in boolean shiftKey,
+                               in boolean metaKey,
+                               in boolean altGraphKey);
     };
 
 }
index 0df6622..c3fc146 100644 (file)
@@ -38,21 +38,21 @@ module events {
         readonly attribute Node             fromElement;
         readonly attribute Node             toElement;
         
-        void               initMouseEvent(in AtomicString typeArg
-                                          in boolean canBubbleArg
-                                          in boolean cancelableArg
-                                          in DOMWindow viewArg
-                                          in long detailArg
-                                          in long screenXArg
-                                          in long screenYArg
-                                          in long clientXArg
-                                          in long clientYArg
-                                          in boolean ctrlKeyArg
-                                          in boolean altKeyArg
-                                          in boolean shiftKeyArg
-                                          in boolean metaKeyArg
-                                          in unsigned short buttonArg
-                                          in EventTarget relatedTargetArg);
+        [OldStyleObjC] void initMouseEvent(in AtomicString type
+                                          in boolean canBubble, 
+                                          in boolean cancelable, 
+                                          in DOMWindow view, 
+                                          in long detail, 
+                                          in long screenX, 
+                                          in long screenY, 
+                                          in long clientX, 
+                                          in long clientY, 
+                                          in boolean ctrlKey, 
+                                          in boolean altKey, 
+                                          in boolean shiftKey, 
+                                          in boolean metaKey, 
+                                          in unsigned short button, 
+                                          in EventTarget relatedTarget);
     };
 
 }
index 066cfbb..0605d3f 100644 (file)
@@ -33,14 +33,14 @@ module events {
         readonly attribute DOMString      attrName;
         readonly attribute unsigned short attrChange;
 
-        void initMutationEvent(in AtomicString typeArg
-                               in boolean canBubbleArg
-                               in boolean cancelableArg
-                               in Node relatedNodeArg
-                               in DOMString prevValueArg
-                               in DOMString newValueArg
-                               in DOMString attrNameArg
-                               in unsigned short attrChangeArg);
+        [OldStyleObjC] void initMutationEvent(in AtomicString type
+                               in boolean canBubble, 
+                               in boolean cancelable, 
+                               in Node relatedNode, 
+                               in DOMString prevValue, 
+                               in DOMString newValue, 
+                               in DOMString attrName, 
+                               in unsigned short attrChange);
 
     };
 
index d8e54a7..2fc81a1 100644 (file)
@@ -36,7 +36,7 @@ module core {
 
         // Introduced in DOM Level 2:
 
-        Node getNamedItemNS(in DOMString namespaceURI, 
+        [OldStyleObjC] Node getNamedItemNS(in DOMString namespaceURI, 
                                              in DOMString localName)
             // FIXME: the implementation does take an exceptioncode parameter.
             /*raises(DOMException)*/;
@@ -44,7 +44,7 @@ module core {
         Node setNamedItemNS(in Node arg)
             raises(DOMException);
 
-        Node removeNamedItemNS(in DOMString namespaceURI, 
+        [OldStyleObjC] Node removeNamedItemNS(in DOMString namespaceURI, 
                                                 in DOMString localName)
             raises(DOMException);
 
index a15cb96..f16065b 100644 (file)
@@ -34,11 +34,11 @@ module events {
         readonly attribute long                 pageY;
         readonly attribute long                 which;
         
-        void               initUIEvent(in AtomicString typeArg
-                                       in boolean canBubbleArg
-                                       in boolean cancelableArg
-                                       in DOMWindow viewArg
-                                       in long detailArg);
+        [OldStyleObjC] void initUIEvent(in AtomicString type
+                                       in boolean canBubble, 
+                                       in boolean cancelable, 
+                                       in DOMWindow view, 
+                                       in long detail);
     };
 
 }
index 30cb962..39da748 100644 (file)
@@ -30,7 +30,7 @@ module html {
         attribute long width;
         attribute long height;
 
-        DOMObject getContext(in DOMString contextID);
+        DOMObject getContext(in DOMString contextId);
 
     };
 
index 971883c..6f9395e 100644 (file)
@@ -44,7 +44,7 @@ module html {
                  attribute long            size;
                  attribute long            tabIndex;
         
-        void               add(in HTMLElement element, 
+        [OldStyleObjC] void add(in HTMLElement element, 
                                in HTMLElement before)
             raises(DOMException);
         void               remove(in long index);
index 2b67513..bf53dd5 100644 (file)
@@ -29,17 +29,17 @@ module svg
     readonly attribute unsigned long numberOfItems;
     void   clear (  )
                     raises( DOMException );
-    SVGLength initialize ( in SVGLength newItem )
+    SVGLength initialize ( in SVGLength item )
                     raises( DOMException, SVGException );
     SVGLength getItem ( in unsigned long index )
                     raises( DOMException );
-    SVGLength insertItemBefore ( in SVGLength newItem, in unsigned long index )
+    SVGLength insertItemBefore ( in SVGLength item, in unsigned long index )
                     raises( DOMException, SVGException );
-    SVGLength replaceItem ( in SVGLength newItem, in unsigned long index )
+    SVGLength replaceItem ( in SVGLength item, in unsigned long index )
                     raises( DOMException, SVGException );
     SVGLength removeItem ( in unsigned long index )
                     raises( DOMException );
-    SVGLength appendItem ( in SVGLength newItem )
+    SVGLength appendItem ( in SVGLength item )
                     raises( DOMException, SVGException );
   };
 };
index cfe40e1..cdc24e5 100644 (file)
@@ -29,17 +29,17 @@ module svg
     readonly attribute unsigned long numberOfItems;
     void   clear (  )
                     raises( DOMException );
-    SVGNumber initialize ( in SVGNumber newItem )
+    SVGNumber initialize ( in SVGNumber item )
                     raises( DOMException, SVGException );
     SVGNumber getItem ( in unsigned long index )
                     raises( DOMException );
-    SVGNumber insertItemBefore ( in SVGNumber newItem, in unsigned long index )
+    SVGNumber insertItemBefore ( in SVGNumber item, in unsigned long index )
                     raises( DOMException, SVGException );
-    SVGNumber replaceItem ( in SVGNumber newItem, in unsigned long index )
+    SVGNumber replaceItem ( in SVGNumber item, in unsigned long index )
                     raises( DOMException, SVGException );
     SVGNumber removeItem ( in unsigned long index )
                     raises( DOMException );
-    SVGNumber appendItem ( in SVGNumber newItem )
+    SVGNumber appendItem ( in SVGNumber item )
                     raises( DOMException, SVGException );
   };
 };
index f02d388..4e9421f 100644 (file)
@@ -29,17 +29,17 @@ module svg
     readonly attribute unsigned long numberOfItems;
     void   clear (  )
                     raises( DOMException );
-    SVGPoint initialize ( in SVGPoint newItem )
+    SVGPoint initialize ( in SVGPoint item )
                     raises( DOMException, SVGException );
     SVGPoint getItem ( in unsigned long index )
                     raises( DOMException );
-    SVGPoint insertItemBefore ( in SVGPoint newItem, in unsigned long index )
+    SVGPoint insertItemBefore ( in SVGPoint item, in unsigned long index )
                     raises( DOMException, SVGException );
-    SVGPoint replaceItem ( in SVGPoint newItem, in unsigned long index )
+    SVGPoint replaceItem ( in SVGPoint item, in unsigned long index )
                     raises( DOMException, SVGException );
     SVGPoint removeItem ( in unsigned long index )
                     raises( DOMException );
-    SVGPoint appendItem ( in SVGPoint newItem )
+    SVGPoint appendItem ( in SVGPoint item )
                     raises( DOMException, SVGException );
   };
 };
index 5df6549..8693839 100644 (file)
@@ -29,17 +29,17 @@ module svg
     readonly attribute unsigned long numberOfItems;
     void   clear (  )
                     raises( core::DOMException );
-    core::DOMString initialize ( in core::DOMString newItem )
+    core::DOMString initialize ( in core::DOMString item )
                     raises( core::DOMException, SVGException );
     core::DOMString getItem ( in unsigned long index )
                     raises( core::DOMException );
-    core::DOMString insertItemBefore ( in core::DOMString newItem, in unsigned long index )
+    core::DOMString insertItemBefore ( in core::DOMString item, in unsigned long index )
                     raises( core::DOMException, SVGException );
-    core::DOMString replaceItem ( in core::DOMString newItem, in unsigned long index )
+    core::DOMString replaceItem ( in core::DOMString item, in unsigned long index )
                     raises( core::DOMException, SVGException );
     core::DOMString removeItem ( in unsigned long index )
                     raises( core::DOMException );
-    core::DOMString appendItem ( in core::DOMString newItem )
+    core::DOMString appendItem ( in core::DOMString item )
                     raises( core::DOMException, SVGException );
   };
 };
index 1741371..9d4566b 100644 (file)
@@ -39,18 +39,18 @@ module svg
     readonly attribute SVGAnimatedEnumeration lengthAdjust;
     long     getNumberOfChars (  );
     float    getComputedTextLength (  );
-    float    getSubStringLength ( in unsigned long charnum, in unsigned long nchars )
+    float    getSubStringLength ( in unsigned long offset, in unsigned long length )
                     raises( DOMException );
-    SVGPoint getStartPositionOfChar ( in unsigned long charnum )
+    SVGPoint getStartPositionOfChar ( in unsigned long offset )
                     raises( DOMException );
-    SVGPoint getEndPositionOfChar ( in unsigned long charnum )
+    SVGPoint getEndPositionOfChar ( in unsigned long offset )
                     raises( DOMException );
-    SVGRect  getExtentOfChar ( in unsigned long charnum )
+    SVGRect  getExtentOfChar ( in unsigned long offset )
                     raises( DOMException );
-    float    getRotationOfChar ( in unsigned long charnum )
+    float    getRotationOfChar ( in unsigned long offset )
                     raises( DOMException );
     long     getCharNumAtPosition ( in SVGPoint point );
-    void     selectSubString ( in unsigned long charnum, in unsigned long nchars )
+    void     selectSubString ( in unsigned long offset, in unsigned long length )
                     raises( DOMException );
   };
 };
index f7c4f1f..c8b48da 100644 (file)
@@ -29,17 +29,17 @@ module svg
     readonly attribute unsigned long numberOfItems;
     void   clear (  )
                     raises( DOMException );
-    SVGTransform initialize ( in SVGTransform newItem )
+    SVGTransform initialize ( in SVGTransform item )
                     raises( DOMException, SVGException );
     SVGTransform getItem ( in unsigned long index )
                     raises( DOMException );
-    SVGTransform insertItemBefore ( in SVGTransform newItem, in unsigned long index )
+    SVGTransform insertItemBefore ( in SVGTransform item, in unsigned long index )
                     raises( DOMException, SVGException );
-    SVGTransform replaceItem ( in SVGTransform newItem, in unsigned long index )
+    SVGTransform replaceItem ( in SVGTransform item, in unsigned long index )
                     raises( DOMException, SVGException );
     SVGTransform removeItem ( in unsigned long index )
                     raises( DOMException );
-    SVGTransform appendItem ( in SVGTransform newItem )
+    SVGTransform appendItem ( in SVGTransform item )
                     raises( DOMException, SVGException );
     SVGTransform createSVGTransformFromMatrix ( in SVGMatrix matrix );
     SVGTransform consolidate (  );
index 1c39f13..ff288d1 100644 (file)
@@ -56,8 +56,8 @@ module svg
                         setter raises DOMException;
         readonly attribute SVGPoint currentTranslate;
 
-        unsigned long suspendRedraw( in unsigned long max_wait_milliseconds );
-        void          unsuspendRedraw( in unsigned long suspend_handle_id )
+        unsigned long suspendRedraw( in unsigned long maxWaitMilliseconds );
+        void          unsuspendRedraw( in unsigned long suspendHandleId )
                         raises( DOMException );
         void          unsuspendRedrawAll();
         void          forceRedraw();
index be8f681..bfa84e2 100644 (file)
@@ -32,12 +32,12 @@ module window {
         readonly attribute Document document;
         
         // DOM Level 2 Style Interface
-        CSSStyleDeclaration getComputedStyle(in Element elt,
-                                             in DOMString pseudoElt);
+        CSSStyleDeclaration getComputedStyle(in Element element,
+                                             in DOMString pseudoElement);
 
         // WebKit extensions
-        CSSRuleList getMatchedCSSRules(in Element elt,
-                                       in DOMString pseudoElt,
+        CSSRuleList getMatchedCSSRules(in Element element,
+                                       in DOMString pseudoElement,
                                        in [Optional] boolean authorOnly);
         readonly attribute double devicePixelRatio;