Skip to content
Permalink
Browse files
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:


Canonical link: https://commits.webkit.org/96794@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
xharaken committed Feb 27, 2012
1 parent 75ca704 commit e40c5d14649e74c2a001548b27d05e3ea58707e2
@@ -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
@@ -27,7 +27,6 @@ module p2p {
interface [
Conditional=MEDIA_STREAM,
ActiveDOMObject,
ConstructorParameters=2,
Constructor(in DOMString serverConfiguration, in [Callback] SignalingCallback signalingCallback),
CallWith=ScriptExecutionContext,
JSCustomConstructor,
@@ -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};
}
}
@@ -27,7 +27,6 @@ module css {

// Introduced in DOM Level ?:
interface [
ConstructorParameters=1,
Constructor(in [Optional=DefaultIsNullString] DOMString cssValue),
ConstructorRaisesException,
] WebKitCSSMatrix {
@@ -33,7 +33,6 @@ module window {

interface [
ActiveDOMObject,
ConstructorParameters=1,
Constructor(in DOMString scriptUrl),
CallWith=ScriptExecutionContext,
ConstructorRaisesException,
@@ -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,
@@ -31,7 +31,6 @@ module threads {
Conditional=WORKERS,
ActiveDOMObject,
JSCustomConstructor,
ConstructorParameters=1,
Constructor(in DOMString scriptUrl),
CallWith=ScriptExecutionContext,
ConstructorRaisesException,

0 comments on commit e40c5d1

Please sign in to comment.