Commit 849d0ffc authored by haraken@chromium.org's avatar 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:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent afeb95d4
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
......@@ -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}))
......
......@@ -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");
}
......
......@@ -34,6 +34,6 @@ module test {
] TestEventConstructor {
// Attributes
readonly attribute DOMString attr1;
readonly attribute [InitializedByConstructor] DOMString attr2;
readonly attribute [InitializedByEventConstructor] DOMString attr2;
};
}
......@@ -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 */},
};
......
......@@ -29,7 +29,7 @@ module events {
interface [
ConstructorTemplate=Event
] BeforeLoadEvent : Event {
readonly attribute [InitializedByConstructor] DOMString url;
readonly attribute [InitializedByEventConstructor] DOMString url;
};
}
......@@ -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,
......
......@@ -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;
};
}
......@@ -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();
......
......@@ -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;
};
}
......@@ -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,
......
......@@ -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,
......
......@@ -28,7 +28,7 @@ module events {
interface [
ConstructorTemplate=Event
] PageTransitionEvent : Event {
readonly attribute [InitializedByConstructor] boolean persisted;
readonly attribute [InitializedByEventConstructor] boolean persisted;
};
}
......@@ -30,7 +30,7 @@ module events {
interface [
ConstructorTemplate=Event
] PopStateEvent : Event {
readonly attribute [InitializedByConstructor, CustomGetter] DOMObject state;
readonly attribute [InitializedByEventConstructor, CustomGetter] DOMObject state;
};
#endif
......
......@@ -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;
};
}
......@@ -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;
};
}
......@@ -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;
};
}
......@@ -29,7 +29,7 @@ module html {
Conditional=WEBGL,
ConstructorTemplate=Event
] WebGLContextEvent : Event {
readonly attribute [InitializedByConstructor] DOMString statusMessage;
readonly attribute [InitializedByEventConstructor] DOMString statusMessage;
};
}
......@@ -30,7 +30,7 @@ module html {
EnabledAtRuntime=webkitVideoTrack,
ConstructorTemplate=Event
] TrackEvent : Event {
readonly attribute [InitializedByConstructor, CustomGetter] object track;
readonly attribute [InitializedByEventConstructor, CustomGetter] object track;
};
}
......@@ -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,
......
......@@ -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;
};
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment