Remove redundant [CanBeConstructed] IDLs
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2011 18:07:12 +0000 (18:07 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2011 18:07:12 +0000 (18:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71868

Reviewed by Adam Barth.

If a class has [Constructor] or [CustomConstructor],
then [CanBeConstructed] is not necessary.
This patch just removes [CanBeConstructed] from all the classes
that already have [Constructor] or [CustomConstructor].

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm: Corrected typo. This correction is required for this patch.
* bindings/scripts/test/V8/V8TestObj.cpp: Updated a run-bindings-tests result.
(WebCore::ConfigureV8TestObjTemplate):
* css/WebKitCSSMatrix.idl:
* dom/BeforeLoadEvent.idl:
* dom/CustomEvent.idl:
* dom/ErrorEvent.idl:
* dom/Event.idl:
* dom/HashChangeEvent.idl:
* dom/MessageChannel.idl:
* dom/MessageEvent.idl:
* dom/OverflowEvent.idl:
* dom/PageTransitionEvent.idl:
* dom/PopStateEvent.idl:
* dom/ProgressEvent.idl:
* dom/WebKitAnimationEvent.idl:
* dom/WebKitMutationObserver.idl:
* dom/WebKitTransitionEvent.idl:
* fileapi/FileReader.idl:
* html/DOMFormData.idl:
* html/TextTrackCue.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/track/TrackEvent.idl:
* mediastream/PeerConnection.idl:
* page/EventSource.idl:
* page/WebKitPoint.idl:
* webaudio/AudioContext.idl:
* websockets/CloseEvent.idl:
* websockets/WebSocket.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* xml/XMLHttpRequest.idl:
* xml/XSLTProcessor.idl:

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

42 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
Source/WebCore/css/WebKitCSSMatrix.idl
Source/WebCore/dom/BeforeLoadEvent.idl
Source/WebCore/dom/CustomEvent.idl
Source/WebCore/dom/ErrorEvent.idl
Source/WebCore/dom/Event.idl
Source/WebCore/dom/HashChangeEvent.idl
Source/WebCore/dom/MessageChannel.idl
Source/WebCore/dom/MessageEvent.idl
Source/WebCore/dom/OverflowEvent.idl
Source/WebCore/dom/PageTransitionEvent.idl
Source/WebCore/dom/PopStateEvent.idl
Source/WebCore/dom/ProgressEvent.idl
Source/WebCore/dom/WebKitAnimationEvent.idl
Source/WebCore/dom/WebKitMutationObserver.idl
Source/WebCore/dom/WebKitTransitionEvent.idl
Source/WebCore/fileapi/FileReader.idl
Source/WebCore/html/DOMFormData.idl
Source/WebCore/html/TextTrackCue.idl
Source/WebCore/html/canvas/ArrayBuffer.idl
Source/WebCore/html/canvas/DataView.idl
Source/WebCore/html/canvas/Float32Array.idl
Source/WebCore/html/canvas/Float64Array.idl
Source/WebCore/html/canvas/Int16Array.idl
Source/WebCore/html/canvas/Int32Array.idl
Source/WebCore/html/canvas/Int8Array.idl
Source/WebCore/html/canvas/Uint16Array.idl
Source/WebCore/html/canvas/Uint32Array.idl
Source/WebCore/html/canvas/Uint8Array.idl
Source/WebCore/html/track/TrackEvent.idl
Source/WebCore/mediastream/PeerConnection.idl
Source/WebCore/page/EventSource.idl
Source/WebCore/page/WebKitPoint.idl
Source/WebCore/webaudio/AudioContext.idl
Source/WebCore/websockets/CloseEvent.idl
Source/WebCore/websockets/WebSocket.idl
Source/WebCore/workers/SharedWorker.idl
Source/WebCore/workers/Worker.idl
Source/WebCore/xml/XMLHttpRequest.idl
Source/WebCore/xml/XSLTProcessor.idl

index dc90e7a..ccf3094 100755 (executable)
@@ -1,3 +1,60 @@
+2011-11-09  Kentaro Hara  <haraken@chromium.org>
+
+        Remove redundant [CanBeConstructed] IDLs
+        https://bugs.webkit.org/show_bug.cgi?id=71868
+
+        Reviewed by Adam Barth.
+
+        If a class has [Constructor] or [CustomConstructor],
+        then [CanBeConstructed] is not necessary.
+        This patch just removes [CanBeConstructed] from all the classes
+        that already have [Constructor] or [CustomConstructor].
+
+        No tests. No change in behavior.
+
+        * bindings/scripts/CodeGeneratorV8.pm: Corrected typo. This correction is required for this patch.
+        * bindings/scripts/test/V8/V8TestObj.cpp: Updated a run-bindings-tests result.
+        (WebCore::ConfigureV8TestObjTemplate):
+        * css/WebKitCSSMatrix.idl:
+        * dom/BeforeLoadEvent.idl:
+        * dom/CustomEvent.idl:
+        * dom/ErrorEvent.idl:
+        * dom/Event.idl:
+        * dom/HashChangeEvent.idl:
+        * dom/MessageChannel.idl:
+        * dom/MessageEvent.idl:
+        * dom/OverflowEvent.idl:
+        * dom/PageTransitionEvent.idl:
+        * dom/PopStateEvent.idl:
+        * dom/ProgressEvent.idl:
+        * dom/WebKitAnimationEvent.idl:
+        * dom/WebKitMutationObserver.idl:
+        * dom/WebKitTransitionEvent.idl:
+        * fileapi/FileReader.idl:
+        * html/DOMFormData.idl:
+        * html/TextTrackCue.idl:
+        * html/canvas/ArrayBuffer.idl:
+        * html/canvas/DataView.idl:
+        * html/canvas/Float32Array.idl:
+        * html/canvas/Float64Array.idl:
+        * html/canvas/Int16Array.idl:
+        * html/canvas/Int32Array.idl:
+        * html/canvas/Int8Array.idl:
+        * html/canvas/Uint16Array.idl:
+        * html/canvas/Uint32Array.idl:
+        * html/canvas/Uint8Array.idl:
+        * html/track/TrackEvent.idl:
+        * mediastream/PeerConnection.idl:
+        * page/EventSource.idl:
+        * page/WebKitPoint.idl:
+        * webaudio/AudioContext.idl:
+        * websockets/CloseEvent.idl:
+        * websockets/WebSocket.idl:
+        * workers/SharedWorker.idl:
+        * workers/Worker.idl:
+        * xml/XMLHttpRequest.idl:
+        * xml/XSLTProcessor.idl:
+
 2011-11-09  Ken Buchanan  <kenrb@chromium.org>
 
         SVG foreignObject wrong container
index b7fc8e3..23b8f96 100644 (file)
@@ -2379,7 +2379,7 @@ END
     UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
 END
 
-    if ($dataNode->extendedAttributes->{"CanBeConstructed"} || $dataNode->extendedAttributes->{"CustomConstructor"} || $dataNode->extendedAttributes->{"V8CustomConstructor"} || $dataNode->extendedAttributes->{"Constructer"}) {
+    if ($dataNode->extendedAttributes->{"CanBeConstructed"} || $dataNode->extendedAttributes->{"CustomConstructor"} || $dataNode->extendedAttributes->{"V8CustomConstructor"} || $dataNode->extendedAttributes->{"Constructor"}) {
         push(@implContent, <<END);
     desc->SetCallHandler(V8${interfaceName}::constructorCallback);
 END
index 847764a..4f913bf 100644 (file)
@@ -1516,6 +1516,7 @@ static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
         TestObjAttrs, WTF_ARRAY_LENGTH(TestObjAttrs),
         TestObjCallbacks, WTF_ARRAY_LENGTH(TestObjCallbacks));
     UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
+    desc->SetCallHandler(V8TestObj::constructorCallback);
     v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
     v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
     UNUSED_PARAM(instance); // In some cases, it will not be used.
index db558c2..f2173bf 100644 (file)
@@ -27,7 +27,6 @@ module css {
 
     // Introduced in DOM Level ?:
     interface [
-        CanBeConstructed,
         ConstructorParameters=1,
         Constructor(in [Optional=CallWithNullValue] DOMString cssValue),
         ConstructorRaisesException,
index 296b902..2308d01 100644 (file)
@@ -27,7 +27,6 @@
 module events {
 
     interface [
-        CanBeConstructed,
         CustomConstructor
     ] BeforeLoadEvent : Event {
         readonly attribute DOMString url;
index 21b5beb..d028805 100644 (file)
@@ -28,7 +28,6 @@ module events {
 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
     // Introduced in DOM Level 3:
     interface [
-        CanBeConstructed,
         CustomConstructor
     ] CustomEvent : Event {
 
index 71be4a9..2fce31f 100644 (file)
@@ -32,7 +32,6 @@ module events {
 
     interface [
         NoStaticTables,
-        CanBeConstructed,
         CustomConstructor
     ] ErrorEvent : Event {
         readonly attribute DOMString message;
index 896cc28..f22828c 100644 (file)
@@ -23,7 +23,6 @@ module events {
     // Introduced in DOM Level 2:
     interface [
         CustomToJS,
-        CanBeConstructed,
         CustomConstructor,
         NoStaticTables,
         Polymorphic
index af49062..745e275 100644 (file)
@@ -21,7 +21,6 @@ module events {
 
     // Introduced in http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-hashchange
     interface [
-        CanBeConstructed,
         CustomConstructor
     ] HashChangeEvent : Event {
         void initHashChangeEvent(in [Optional=CallWithDefaultValue] DOMString type, 
index d415d90..4fc2bf8 100644 (file)
@@ -27,7 +27,6 @@
 module events {
 
     interface [
-        CanBeConstructed,
         Constructor,
         CallWith=ScriptExecutionContext,
         V8CustomConstructor,
index cce2855..527fc00 100644 (file)
@@ -29,7 +29,6 @@ module events {
 
     interface [
         NoStaticTables,
-        CanBeConstructed,
         CustomConstructor
     ] MessageEvent : Event {
         readonly attribute DOMString origin;
index ffc1c2a..be4dfea 100644 (file)
@@ -26,7 +26,6 @@
 module events {
 
     interface [
-        CanBeConstructed,
         CustomConstructor
     ] OverflowEvent : Event {
         const unsigned short HORIZONTAL = 0;
index 924dfc7..2d183fd 100644 (file)
@@ -26,7 +26,6 @@
 module events {
 
     interface [
-        CanBeConstructed,
         CustomConstructor
     ] PageTransitionEvent : Event {
         readonly attribute boolean persisted;
index b31f98c..9999f6f 100644 (file)
@@ -28,8 +28,7 @@ module events {
 
 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
     interface [
-        CanBeConstructed,
-        CustomConstructor,
+        CustomConstructor
     ] PopStateEvent : Event {
         readonly attribute [CustomGetter] DOMObject state;
     };
index bb76dba..d969a50 100644 (file)
@@ -26,7 +26,6 @@
 module events {
 
     interface [
-        CanBeConstructed,
         CustomConstructor
     ] ProgressEvent : Event {
         readonly attribute boolean lengthComputable;
index 625800f..e50ee91 100644 (file)
@@ -26,7 +26,6 @@
 module events {
 
     interface [
-        CanBeConstructed,
         CustomConstructor
     ] WebKitAnimationEvent : Event {
      readonly attribute DOMString          animationName;
index b54575f..2c0e8fa 100644 (file)
@@ -31,7 +31,6 @@
 module core {
     interface [
         Conditional=MUTATION_OBSERVERS,
-        CanBeConstructed,
         CustomConstructor
     ] WebKitMutationObserver {
         [Custom] void observe(in Node target, in MutationObserverOptions options)
index 378a1c1..c8cfdfe 100644 (file)
@@ -26,7 +26,6 @@
 module events {
 
     interface [
-        CanBeConstructed,
         CustomConstructor
     ] WebKitTransitionEvent : Event {
     readonly attribute DOMString          propertyName;
index 50d14c6..6c81038 100644 (file)
@@ -33,11 +33,10 @@ module html {
     interface [
         Conditional=BLOB,
         ActiveDOMObject,
-        CanBeConstructed,
+        Constructor,
         CallWith=ScriptExecutionContext,
         EventTarget,
-        NoStaticTables,
-        Constructor
+        NoStaticTables
     ] FileReader {
         // ready states
         const unsigned short EMPTY = 0;
index c838510..992f047 100644 (file)
@@ -31,7 +31,6 @@
 module html {
 
     interface [
-        CanBeConstructed,
         CustomConstructor,
         GenerateNativeConverter,
         GenerateToJS
index fce95a6..e2a1883 100644 (file)
@@ -28,7 +28,6 @@ module html {
     interface [
         Conditional=VIDEO_TRACK,
         EnabledAtRuntime=webkitVideoTrack,
-        CanBeConstructed,
         GenerateNativeConverter,
         Constructor(in DOMString id, in double startTime, in double endTime, in DOMString text, in [Optional=CallWithDefaultValue] DOMString settings, in [Optional=CallWithDefaultValue] boolean pauseOnExit),
         CallWith=ScriptExecutionContext
index 7963182..9ba85ca 100644 (file)
@@ -27,7 +27,6 @@ module html {
 
     interface [
         GenerateIsReachable=Impl,
-        CanBeConstructed,
         CustomConstructor,
         NoStaticTables
     ] ArrayBuffer {
index 976cfde..bba13c9 100755 (executable)
 module html {
 
     interface [
-        CanBeConstructed,
         CustomConstructor,
         CustomToJS,
-        NoStaticTables,
+        NoStaticTables
     ] DataView : ArrayBufferView {
         // All these methods raise an exception if they would read or write beyond the end of the view.
 
index 98130bd..ef6c956 100644 (file)
@@ -26,7 +26,6 @@
 
 module html {
     interface [
-        CanBeConstructed,
         CustomConstructor,
         HasNumericIndexGetter,
         HasCustomIndexSetter,
index e4e43aa..0149535 100644 (file)
@@ -26,7 +26,6 @@
 
 module html {
     interface [
-        CanBeConstructed,
         CustomConstructor,
         HasNumericIndexGetter,
         HasCustomIndexSetter,
index df7c85f..b1a5471 100644 (file)
@@ -25,7 +25,6 @@
 
 module html {
     interface [
-        CanBeConstructed,
         CustomConstructor,
         HasNumericIndexGetter,
         HasCustomIndexSetter,
index 110d6ab..bad745d 100644 (file)
@@ -26,7 +26,6 @@
 
 module html {
     interface [
-        CanBeConstructed,
         CustomConstructor,
         HasNumericIndexGetter,
         HasCustomIndexSetter,
index 110c4ad..4ae2eac 100644 (file)
@@ -26,7 +26,6 @@
 
 module html {
     interface [
-        CanBeConstructed,
         CustomConstructor,
         HasNumericIndexGetter,
         HasCustomIndexSetter,
index 7a792cb..bb08a4f 100644 (file)
@@ -26,7 +26,6 @@
 
 module html {
     interface [
-        CanBeConstructed,
         CustomConstructor,
         HasNumericIndexGetter,
         HasCustomIndexSetter,
index d58cc20..2a87885 100644 (file)
@@ -26,7 +26,6 @@
 
 module html {
     interface [
-        CanBeConstructed,
         CustomConstructor,
         HasNumericIndexGetter,
         HasCustomIndexSetter,
index 8386eab..1a6f588 100644 (file)
@@ -26,7 +26,6 @@
 
 module html {
     interface [
-        CanBeConstructed,
         CustomConstructor,
         HasNumericIndexGetter,
         HasCustomIndexSetter,
index 421d9db..1c27729 100644 (file)
@@ -28,8 +28,7 @@ module html {
     interface [
         Conditional=VIDEO_TRACK,
         EnabledAtRuntime=webkitVideoTrack,
-        CanBeConstructed,
-        CustomConstructor,
+        CustomConstructor
     ] TrackEvent : Event {
 
         readonly attribute [CustomGetter] object track;
index 8a566cd..f9ee192 100644 (file)
@@ -27,7 +27,6 @@ module p2p {
     interface [
         Conditional=MEDIA_STREAM,
         ActiveDOMObject,
-        CanBeConstructed,
         ConstructorParameters=2,
         Constructor(in DOMString serverConfiguration, in [Callback=FunctionOnly] SignalingCallback signalingCallback),
         CallWith=ScriptExecutionContext,
index be55ce9..c06076c 100644 (file)
@@ -33,7 +33,6 @@ module window {
 
     interface [
         ActiveDOMObject,
-        CanBeConstructed,
         ConstructorParameters=1,
         Constructor(in DOMString scriptUrl),
         CallWith=ScriptExecutionContext,
index 4cbca60..e44fd21 100644 (file)
@@ -26,9 +26,8 @@
 module window {
 
     interface [
-        CanBeConstructed,
         CustomConstructor,
-        ConstructorParameters=2,
+        ConstructorParameters=2
     ] WebKitPoint {
         attribute float x;
         attribute float y;
index 479cd50..92d1a78 100644 (file)
@@ -27,7 +27,6 @@ module webaudio {
     interface [
         Conditional=WEB_AUDIO,
         ActiveDOMObject,
-        CanBeConstructed,
         CustomConstructor,
         CustomMarkFunction,
 #if defined(V8_BINDING) && V8_BINDING
index 5f5f3ba..326834a 100644 (file)
@@ -32,7 +32,6 @@ module events {
 
     interface [
         NoStaticTables,
-        CanBeConstructed,
         CustomConstructor
     ] CloseEvent : Event {
         readonly attribute boolean wasClean;
index bcd2255..cb50eb6 100644 (file)
@@ -34,7 +34,6 @@ module websockets {
     interface [
         Conditional=WEB_SOCKETS,
         ActiveDOMObject,
-        CanBeConstructed,
         CustomConstructor,
         ConstructorParameters=1,
         EventTarget,
index abf283b..6061f64 100644 (file)
@@ -34,7 +34,6 @@ module threads {
     interface [
         Conditional=SHARED_WORKERS,
         ActiveDOMObject,
-        CanBeConstructed,
         JSCustomConstructor,
         ConstructorParameters=2,
         Constructor(in DOMString scriptURL, in [Optional=CallWithNullValue] DOMString name),
index 4cb9ae0..f0df628 100644 (file)
@@ -30,7 +30,6 @@ module threads {
     interface [
         Conditional=WORKERS,
         ActiveDOMObject,
-        CanBeConstructed,
         JSCustomConstructor,
         ConstructorParameters=1,
         Constructor(in DOMString scriptUrl),
index 7a96512..826d101 100644 (file)
@@ -30,7 +30,6 @@ module xml {
 
     interface [
         ActiveDOMObject,
-        CanBeConstructed,
         Constructor,
         CallWith=ScriptExecutionContext,
         V8CustomConstructor,
index bd876ac..4fcae9a 100644 (file)
@@ -34,7 +34,6 @@ module xml {
 
     interface [
         Conditional=XSLT,
-        CanBeConstructed,
         Constructor
     ] XSLTProcessor {