Title: [106644] trunk/Source/WebCore
Revision
106644
Author
[email protected]
Date
2012-02-03 03:02:22 -0800 (Fri, 03 Feb 2012)

Log Message

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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106643 => 106644)


--- trunk/Source/WebCore/ChangeLog	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/ChangeLog	2012-02-03 11:02:22 UTC (rev 106644)
@@ -1,5 +1,44 @@
 2012-02-03  Kentaro Hara  <[email protected]>
 
+        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  <[email protected]>
+
         Add the "CPP" prefix to CPP specific IDL attributes
         https://bugs.webkit.org/show_bug.cgi?id=77707
 

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (106643 => 106644)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2012-02-03 11:02:22 UTC (rev 106644)
@@ -3493,7 +3493,7 @@
 
             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}))

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (106643 => 106644)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-02-03 11:02:22 UTC (rev 106644)
@@ -1751,7 +1751,7 @@
 
     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");
         }

Modified: trunk/Source/WebCore/bindings/scripts/test/TestEventConstructor.idl (106643 => 106644)


--- trunk/Source/WebCore/bindings/scripts/test/TestEventConstructor.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/bindings/scripts/test/TestEventConstructor.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -34,6 +34,6 @@
     ] TestEventConstructor {
         // Attributes
         readonly attribute DOMString attr1;
-        readonly attribute [InitializedByConstructor] DOMString attr2;
+        readonly attribute [InitializedByEventConstructor] DOMString attr2;
     };
 }

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp (106643 => 106644)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp	2012-02-03 11:02:22 UTC (rev 106644)
@@ -58,7 +58,7 @@
 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 */},
 };
 

Modified: trunk/Source/WebCore/dom/BeforeLoadEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/BeforeLoadEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/BeforeLoadEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -29,7 +29,7 @@
     interface [
         ConstructorTemplate=Event
     ] BeforeLoadEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString url;
+        readonly attribute [InitializedByEventConstructor] DOMString url;
     };
 
 }

Modified: trunk/Source/WebCore/dom/CustomEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/CustomEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/CustomEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -30,7 +30,7 @@
     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, 

Modified: trunk/Source/WebCore/dom/ErrorEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/ErrorEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/ErrorEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -34,9 +34,9 @@
         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;
     };
 
 }

Modified: trunk/Source/WebCore/dom/Event.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/Event.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/Event.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -57,8 +57,8 @@
         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();

Modified: trunk/Source/WebCore/dom/HashChangeEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/HashChangeEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/HashChangeEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -28,8 +28,8 @@
                                  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;
     };
 
 }

Modified: trunk/Source/WebCore/dom/MessageEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/MessageEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/MessageEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -31,12 +31,12 @@
         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, 

Modified: trunk/Source/WebCore/dom/OverflowEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/OverflowEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/OverflowEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -32,9 +32,9 @@
         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,

Modified: trunk/Source/WebCore/dom/PageTransitionEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/PageTransitionEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/PageTransitionEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -28,7 +28,7 @@
     interface [
         ConstructorTemplate=Event
     ] PageTransitionEvent : Event {
-        readonly attribute [InitializedByConstructor] boolean persisted;
+        readonly attribute [InitializedByEventConstructor] boolean persisted;
     };
 
 }

Modified: trunk/Source/WebCore/dom/PopStateEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/PopStateEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/PopStateEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -30,7 +30,7 @@
     interface [
         ConstructorTemplate=Event
     ] PopStateEvent : Event {
-        readonly attribute [InitializedByConstructor, CustomGetter] DOMObject state;
+        readonly attribute [InitializedByEventConstructor, CustomGetter] DOMObject state;
     };
 #endif
 

Modified: trunk/Source/WebCore/dom/ProgressEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/ProgressEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/ProgressEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -28,9 +28,9 @@
     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;
     };
 
 }

Modified: trunk/Source/WebCore/dom/WebKitAnimationEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/WebKitAnimationEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/WebKitAnimationEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -28,8 +28,8 @@
     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;
 };
 
 }

Modified: trunk/Source/WebCore/dom/WebKitTransitionEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/dom/WebKitTransitionEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/dom/WebKitTransitionEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -28,8 +28,8 @@
     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;
     };
 
 }

Modified: trunk/Source/WebCore/html/canvas/WebGLContextEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/html/canvas/WebGLContextEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/html/canvas/WebGLContextEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -29,7 +29,7 @@
         Conditional=WEBGL,
         ConstructorTemplate=Event
     ] WebGLContextEvent : Event {
-        readonly attribute [InitializedByConstructor] DOMString statusMessage;
+        readonly attribute [InitializedByEventConstructor] DOMString statusMessage;
     };
 
 }

Modified: trunk/Source/WebCore/html/track/TrackEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/html/track/TrackEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/html/track/TrackEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -30,7 +30,7 @@
         EnabledAtRuntime=webkitVideoTrack,
         ConstructorTemplate=Event
     ] TrackEvent : Event {
-        readonly attribute [InitializedByConstructor, CustomGetter] object track;
+        readonly attribute [InitializedByEventConstructor, CustomGetter] object track;
     };
 
 }

Modified: trunk/Source/WebCore/storage/StorageEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/storage/StorageEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/storage/StorageEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -28,11 +28,11 @@
     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, 

Modified: trunk/Source/WebCore/websockets/CloseEvent.idl (106643 => 106644)


--- trunk/Source/WebCore/websockets/CloseEvent.idl	2012-02-03 10:31:41 UTC (rev 106643)
+++ trunk/Source/WebCore/websockets/CloseEvent.idl	2012-02-03 11:02:22 UTC (rev 106644)
@@ -34,9 +34,9 @@
         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;
     };
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to