Rename [InitializedByConstructor] IDL to [InitializedByEventConstructor] IDL
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Feb 2012 11:02:22 +0000 (11:02 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Feb 2012 11:02:22 +0000 (11:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77711

Reviewed by Adam Barth.

[InitializedByConstructor] can be used only when [ConstructorTemplate=Event]
is specified on the interface. This patch renames [InitializedByConstructor] to
[InitializedByEventConstructor] for clarification.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateEventConstructorCallback):

* bindings/scripts/test/TestEventConstructor.idl:
* bindings/scripts/test/V8/V8TestEventConstructor.cpp: Updated the run-bindings-tests results.
(WebCore):

* dom/BeforeLoadEvent.idl:
* dom/CustomEvent.idl:
* dom/ErrorEvent.idl:
* dom/Event.idl:
* dom/HashChangeEvent.idl:
* dom/MessageEvent.idl:
* dom/OverflowEvent.idl:
* dom/PageTransitionEvent.idl:
* dom/PopStateEvent.idl:
* dom/ProgressEvent.idl:
* dom/WebKitAnimationEvent.idl:
* dom/WebKitTransitionEvent.idl:
* html/canvas/WebGLContextEvent.idl:
* html/track/TrackEvent.idl:
* storage/StorageEvent.idl:
* websockets/CloseEvent.idl:

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

21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/TestEventConstructor.idl
Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp
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/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/WebKitTransitionEvent.idl
Source/WebCore/html/canvas/WebGLContextEvent.idl
Source/WebCore/html/track/TrackEvent.idl
Source/WebCore/storage/StorageEvent.idl
Source/WebCore/websockets/CloseEvent.idl

index b80546e..89fff8e 100644 (file)
@@ -1,5 +1,44 @@
 2012-02-03  Kentaro Hara  <haraken@chromium.org>
 
+        Rename [InitializedByConstructor] IDL to [InitializedByEventConstructor] IDL
+        https://bugs.webkit.org/show_bug.cgi?id=77711
+
+        Reviewed by Adam Barth.
+
+        [InitializedByConstructor] can be used only when [ConstructorTemplate=Event]
+        is specified on the interface. This patch renames [InitializedByConstructor] to
+        [InitializedByEventConstructor] for clarification.
+
+        No tests. No change in behavior.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateConstructorDefinition):
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateEventConstructorCallback):
+
+        * bindings/scripts/test/TestEventConstructor.idl:
+        * bindings/scripts/test/V8/V8TestEventConstructor.cpp: Updated the run-bindings-tests results.
+        (WebCore):
+
+        * dom/BeforeLoadEvent.idl:
+        * dom/CustomEvent.idl:
+        * dom/ErrorEvent.idl:
+        * dom/Event.idl:
+        * dom/HashChangeEvent.idl:
+        * dom/MessageEvent.idl:
+        * dom/OverflowEvent.idl:
+        * dom/PageTransitionEvent.idl:
+        * dom/PopStateEvent.idl:
+        * dom/ProgressEvent.idl:
+        * dom/WebKitAnimationEvent.idl:
+        * dom/WebKitTransitionEvent.idl:
+        * html/canvas/WebGLContextEvent.idl:
+        * html/track/TrackEvent.idl:
+        * storage/StorageEvent.idl:
+        * websockets/CloseEvent.idl:
+
+2012-02-03  Kentaro Hara  <haraken@chromium.org>
+
         Add the "CPP" prefix to CPP specific IDL attributes
         https://bugs.webkit.org/show_bug.cgi?id=77707
 
index 917c356..cd84c57 100644 (file)
@@ -3493,7 +3493,7 @@ END
 
             for (my $index = 0; $index < @{$dataNode->attributes}; $index++) {
                 my $attribute = @{$dataNode->attributes}[$index];
-                if ($attribute->signature->extendedAttributes->{"InitializedByConstructor"}) {
+                if ($attribute->signature->extendedAttributes->{"InitializedByEventConstructor"}) {
                     my $attributeName = $attribute->signature->name;
                     push(@implContent, <<END);
     if (!dictionary.tryGetProperty("${attributeName}", eventInit.${attributeName}))
index 83a7274..debd912 100644 (file)
@@ -1751,7 +1751,7 @@ END
 
     for (my $index = 0; $index < @{$dataNode->attributes}; $index++) {
         my $attribute = @{$dataNode->attributes}[$index];
-        if ($attribute->signature->extendedAttributes->{"InitializedByConstructor"}) {
+        if ($attribute->signature->extendedAttributes->{"InitializedByEventConstructor"}) {
             my $attributeName = $attribute->signature->name;
             push(@implContent, "    options.get(\"$attributeName\", eventInit.$attributeName);\n");
         }
index 7783826..706f1e2 100644 (file)
@@ -34,6 +34,6 @@ module test {
     ] TestEventConstructor {
         // Attributes
         readonly attribute DOMString attr1;
-        readonly attribute [InitializedByConstructor] DOMString attr2;
+        readonly attribute [InitializedByEventConstructor] DOMString attr2;
     };
 }
index dd33aa0..d561eb4 100644 (file)
@@ -58,7 +58,7 @@ static v8::Handle<v8::Value> attr2AttrGetter(v8::Local<v8::String> name, const v
 static const BatchedAttribute TestEventConstructorAttrs[] = {
     // Attribute 'attr1' (Type: 'readonly attribute' ExtAttr: '')
     {"attr1", TestEventConstructorInternal::attr1AttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
-    // Attribute 'attr2' (Type: 'readonly attribute' ExtAttr: 'InitializedByConstructor')
+    // Attribute 'attr2' (Type: 'readonly attribute' ExtAttr: 'InitializedByEventConstructor')
     {"attr2", TestEventConstructorInternal::attr2AttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 };
 
index 4600e85..08dfbbb 100644 (file)
@@ -29,7 +29,7 @@ module events {
     interface [
         ConstructorTemplate=Event
     ] BeforeLoadEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString url;
+        readonly attribute [InitializedByEventConstructor] DOMString url;
     };
 
 }
index 3be3955..53a1ffc 100644 (file)
@@ -30,7 +30,7 @@ module events {
     interface [
         ConstructorTemplate=Event
     ] CustomEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMObject detail;
+        readonly attribute [InitializedByEventConstructor] DOMObject detail;
 
         void initCustomEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, 
                              in [Optional=CallWithDefaultValue] boolean canBubbleArg, 
index 6d3dc6c..87f7503 100644 (file)
@@ -34,9 +34,9 @@ module events {
         NoStaticTables,
         ConstructorTemplate=Event
     ] ErrorEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString message;
-        readonly attribute [InitializedByConstructor] DOMString filename;
-        readonly attribute [InitializedByConstructor] unsigned long lineno;
+        readonly attribute [InitializedByEventConstructor] DOMString message;
+        readonly attribute [InitializedByEventConstructor] DOMString filename;
+        readonly attribute [InitializedByEventConstructor] unsigned long lineno;
     };
 
 }
index 80b2f33..75c9c66 100644 (file)
@@ -57,8 +57,8 @@ module events {
         readonly attribute EventTarget      target;
         readonly attribute EventTarget      currentTarget;
         readonly attribute unsigned short   eventPhase;
-        readonly attribute [InitializedByConstructor] boolean bubbles;
-        readonly attribute [InitializedByConstructor] boolean cancelable;
+        readonly attribute [InitializedByEventConstructor] boolean bubbles;
+        readonly attribute [InitializedByEventConstructor] boolean cancelable;
         readonly attribute DOMTimeStamp     timeStamp;
 
         void               stopPropagation();
index 561b606..b2b4887 100644 (file)
@@ -28,8 +28,8 @@ module events {
                                  in [Optional=CallWithDefaultValue] boolean cancelable, 
                                  in [Optional=CallWithDefaultValue] DOMString oldURL, 
                                  in [Optional=CallWithDefaultValue] DOMString newURL); 
-        readonly attribute [InitializedByConstructor] DOMString oldURL;
-        readonly attribute [InitializedByConstructor] DOMString newURL;
+        readonly attribute [InitializedByEventConstructor] DOMString oldURL;
+        readonly attribute [InitializedByEventConstructor] DOMString newURL;
     };
 
 }
index 6d324f7..ab6473e 100644 (file)
@@ -31,12 +31,12 @@ module events {
         NoStaticTables,
         ConstructorTemplate=Event
     ] MessageEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString origin;
-        readonly attribute [InitializedByConstructor] DOMString lastEventId;
-        readonly attribute [InitializedByConstructor] DOMWindow source;
+        readonly attribute [InitializedByEventConstructor] DOMString origin;
+        readonly attribute [InitializedByEventConstructor] DOMString lastEventId;
+        readonly attribute [InitializedByEventConstructor] DOMWindow source;
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
-        readonly attribute [InitializedByConstructor, CachedAttribute, CustomGetter] DOMObject data;
-        readonly attribute [InitializedByConstructor, CustomGetter] Array ports;
+        readonly attribute [InitializedByEventConstructor, CachedAttribute, CustomGetter] DOMObject data;
+        readonly attribute [InitializedByEventConstructor, CustomGetter] Array ports;
 
         [Custom] void initMessageEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, 
                                        in [Optional=CallWithDefaultValue] boolean canBubbleArg, 
index b43b52c..a1ecc41 100644 (file)
@@ -32,9 +32,9 @@ module events {
         const unsigned short VERTICAL   = 1;
         const unsigned short BOTH       = 2;
         
-        readonly attribute [InitializedByConstructor] unsigned short orient;
-        readonly attribute [InitializedByConstructor] boolean horizontalOverflow;
-        readonly attribute [InitializedByConstructor] boolean verticalOverflow;
+        readonly attribute [InitializedByEventConstructor] unsigned short orient;
+        readonly attribute [InitializedByEventConstructor] boolean horizontalOverflow;
+        readonly attribute [InitializedByEventConstructor] boolean verticalOverflow;
 
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
         void initOverflowEvent(in [Optional=CallWithDefaultValue] unsigned short orient,
index 3734dc6..76c8727 100644 (file)
@@ -28,7 +28,7 @@ module events {
     interface [
         ConstructorTemplate=Event
     ] PageTransitionEvent : Event {
-        readonly attribute [InitializedByConstructor] boolean persisted;
+        readonly attribute [InitializedByEventConstructor] boolean persisted;
     };
 
 }
index 58ad952..6326a9d 100644 (file)
@@ -30,7 +30,7 @@ module events {
     interface [
         ConstructorTemplate=Event
     ] PopStateEvent : Event {
-        readonly attribute [InitializedByConstructor, CustomGetter] DOMObject state;
+        readonly attribute [InitializedByEventConstructor, CustomGetter] DOMObject state;
     };
 #endif
 
index 3bcdd3d..f8d0b5b 100644 (file)
@@ -28,9 +28,9 @@ module events {
     interface [
         ConstructorTemplate=Event
     ] ProgressEvent : Event {
-        readonly attribute [InitializedByConstructor] boolean lengthComputable;
-        readonly attribute [InitializedByConstructor] unsigned long long loaded;
-        readonly attribute [InitializedByConstructor] unsigned long long total;
+        readonly attribute [InitializedByEventConstructor] boolean lengthComputable;
+        readonly attribute [InitializedByEventConstructor] unsigned long long loaded;
+        readonly attribute [InitializedByEventConstructor] unsigned long long total;
     };
 
 }
index fab8c09..5e52250 100644 (file)
@@ -28,8 +28,8 @@ module events {
     interface [
         ConstructorTemplate=Event
     ] WebKitAnimationEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString animationName;
-        readonly attribute [InitializedByConstructor] double elapsedTime;
+        readonly attribute [InitializedByEventConstructor] DOMString animationName;
+        readonly attribute [InitializedByEventConstructor] double elapsedTime;
 };
 
 }
index 9f024d6..39903bd 100644 (file)
@@ -28,8 +28,8 @@ module events {
     interface [
         ConstructorTemplate=Event
     ] WebKitTransitionEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString propertyName;
-        readonly attribute [InitializedByConstructor] double elapsedTime;
+        readonly attribute [InitializedByEventConstructor] DOMString propertyName;
+        readonly attribute [InitializedByEventConstructor] double elapsedTime;
     };
 
 }
index 8b4bbdd..3735f12 100644 (file)
@@ -29,7 +29,7 @@ module html {
         Conditional=WEBGL,
         ConstructorTemplate=Event
     ] WebGLContextEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString statusMessage;
+        readonly attribute [InitializedByEventConstructor] DOMString statusMessage;
     };
 
 }
index 5d28f3b..eee1565 100644 (file)
@@ -30,7 +30,7 @@ module html {
         EnabledAtRuntime=webkitVideoTrack,
         ConstructorTemplate=Event
     ] TrackEvent : Event {
-        readonly attribute [InitializedByConstructor, CustomGetter] object track;
+        readonly attribute [InitializedByEventConstructor, CustomGetter] object track;
     };
 
 }
index ff548fe..fccbb81 100644 (file)
@@ -28,11 +28,11 @@ module storage {
     interface [
         ConstructorTemplate=Event
     ] StorageEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString key;
-        readonly attribute [InitializedByConstructor, ConvertNullStringTo=Null] DOMString oldValue;
-        readonly attribute [InitializedByConstructor, ConvertNullStringTo=Null] DOMString newValue;
-        readonly attribute [InitializedByConstructor] DOMString url;
-        readonly attribute [InitializedByConstructor] Storage storageArea;
+        readonly attribute [InitializedByEventConstructor] DOMString key;
+        readonly attribute [InitializedByEventConstructor, ConvertNullStringTo=Null] DOMString oldValue;
+        readonly attribute [InitializedByEventConstructor, ConvertNullStringTo=Null] DOMString newValue;
+        readonly attribute [InitializedByEventConstructor] DOMString url;
+        readonly attribute [InitializedByEventConstructor] Storage storageArea;
 
         void initStorageEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, 
                               in [Optional=CallWithDefaultValue] boolean canBubbleArg, 
index db78544..82085da 100644 (file)
@@ -34,9 +34,9 @@ module events {
         NoStaticTables,
         ConstructorTemplate=Event
     ] CloseEvent : Event {
-        readonly attribute [InitializedByConstructor] boolean wasClean;
-        readonly attribute [InitializedByConstructor] unsigned short code;
-        readonly attribute [InitializedByConstructor, ConvertingNullStringTo=Undefined] DOMString reason;
+        readonly attribute [InitializedByEventConstructor] boolean wasClean;
+        readonly attribute [InitializedByEventConstructor] unsigned short code;
+        readonly attribute [InitializedByEventConstructor, ConvertingNullStringTo=Undefined] DOMString reason;
     };
 
 }