Remove [ConstructorParameters] from IDL files that have [Constructor]
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Feb 2012 23:22:32 +0000 (23:22 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Feb 2012 23:22:32 +0000 (23:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79643

Reviewed by Adam Barth.

This patch removes [ConstructorParameters] from IDL files that have [Constructor],
since CodeGeneratorJS.pm can automatically detect the number of constructor
arguments by the [Constructor(...)] signature.

Test: fast/js/constructor-length.html

* Modules/mediastream/PeerConnection.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* css/WebKitCSSMatrix.idl:
* page/EventSource.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:

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

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/PeerConnection.idl
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/css/WebKitCSSMatrix.idl
Source/WebCore/page/EventSource.idl
Source/WebCore/workers/SharedWorker.idl
Source/WebCore/workers/Worker.idl

index 917bdf8..b1c751c 100644 (file)
@@ -1,3 +1,24 @@
+2012-02-27  Kentaro Hara  <haraken@chromium.org>
+
+        Remove [ConstructorParameters] from IDL files that have [Constructor]
+        https://bugs.webkit.org/show_bug.cgi?id=79643
+
+        Reviewed by Adam Barth.
+
+        This patch removes [ConstructorParameters] from IDL files that have [Constructor],
+        since CodeGeneratorJS.pm can automatically detect the number of constructor
+        arguments by the [Constructor(...)] signature.
+
+        Test: fast/js/constructor-length.html
+
+        * Modules/mediastream/PeerConnection.idl:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateConstructorDefinition):
+        * css/WebKitCSSMatrix.idl:
+        * page/EventSource.idl:
+        * workers/SharedWorker.idl:
+        * workers/Worker.idl:
+
 2012-02-27  Julien Chaffraix  <jchaffraix@webkit.org>
 
         Avoid doing 2 hash lookups if we override RenderBox's logical width / height
index 7760d10..7543a0d 100644 (file)
@@ -27,7 +27,6 @@ module p2p {
     interface [
         Conditional=MEDIA_STREAM,
         ActiveDOMObject,
-        ConstructorParameters=2,
         Constructor(in DOMString serverConfiguration, in [Callback] SignalingCallback signalingCallback),
         CallWith=ScriptExecutionContext,
         JSCustomConstructor,
index 2aa9f59..f9aa5c8 100644 (file)
@@ -3368,7 +3368,7 @@ sub GenerateConstructorDefinition
     if (!defined $numberOfConstructorParameters) {
         if (IsConstructorTemplate($dataNode, "Event")) {
             $numberOfConstructorParameters = 2;
-        } elsif ($dataNode->extendedAttributes->{"Constructor"} and !$dataNode->extendedAttributes->{"CustomConstructor"} and !$dataNode->extendedAttributes->{"JSCustomConstructor"}) {
+        } elsif ($dataNode->extendedAttributes->{"Constructor"}) {
             $numberOfConstructorParameters = @{$dataNode->constructor->parameters};
         }
     }
index 08fd664..08c41aa 100644 (file)
@@ -27,7 +27,6 @@ module css {
 
     // Introduced in DOM Level ?:
     interface [
-        ConstructorParameters=1,
         Constructor(in [Optional=DefaultIsNullString] DOMString cssValue),
         ConstructorRaisesException,
     ] WebKitCSSMatrix {
index 9b7fe38..48df3eb 100644 (file)
@@ -33,7 +33,6 @@ module window {
 
     interface [
         ActiveDOMObject,
-        ConstructorParameters=1,
         Constructor(in DOMString scriptUrl),
         CallWith=ScriptExecutionContext,
         ConstructorRaisesException,
index d215272..40ccdd4 100644 (file)
@@ -35,7 +35,6 @@ module threads {
         Conditional=SHARED_WORKERS,
         ActiveDOMObject,
         JSCustomConstructor,
-        ConstructorParameters=2,
         Constructor(in DOMString scriptURL, in [Optional=DefaultIsNullString] DOMString name),
         CallWith=ScriptExecutionContext,
         ConstructorRaisesException,
index 867d367..083353c 100644 (file)
@@ -31,7 +31,6 @@ module threads {
         Conditional=WORKERS,
         ActiveDOMObject,
         JSCustomConstructor,
-        ConstructorParameters=1,
         Constructor(in DOMString scriptUrl),
         CallWith=ScriptExecutionContext,
         ConstructorRaisesException,