Diff
Modified: trunk/Source/WebCore/ChangeLog (207301 => 207302)
--- trunk/Source/WebCore/ChangeLog 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/ChangeLog 2016-10-13 19:26:19 UTC (rev 207302)
@@ -1,3 +1,29 @@
+2016-10-13 Chris Dumez <cdu...@apple.com>
+
+ Rename [ConstructorTemplate=*] to [LegacyConstructorTemplate=*]
+ https://bugs.webkit.org/show_bug.cgi?id=163390
+
+ Reviewed by Darin Adler.
+
+ Rename [ConstructorTemplate=*] to [LegacyConstructorTemplate=*] as the
+ modern way of doing this is to use a constructor that takes in a
+ dictionary. I am working on getting rid of this extended attribute
+ entirely but the remaining uses require better support for union types.
+
+ * Modules/applepay/ApplePayValidateMerchantEvent.idl:
+ * Modules/indexeddb/IDBVersionChangeEvent.idl:
+ * Modules/mediastream/RTCTrackEvent.idl:
+ * bindings/scripts/CodeGenerator.pm:
+ (IsConstructorTemplate):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateConstructorDefinition):
+ (IsConstructable):
+ * bindings/scripts/IDLAttributes.txt:
+ * dom/Event.idl:
+ * dom/ProgressEvent.idl:
+ * dom/UIEvent.idl:
+ * html/track/TrackEvent.idl:
+
2016-10-13 Ryan Haddad <ryanhad...@apple.com>
Unreviewed, rolling out r207297.
Modified: trunk/Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.idl (207301 => 207302)
--- trunk/Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.idl 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.idl 2016-10-13 19:26:19 UTC (rev 207302)
@@ -27,5 +27,5 @@
Conditional=APPLE_PAY,
NoInterfaceObject,
] interface ApplePayValidateMerchantEvent : Event {
- [InitializedByEventConstructor] readonly attribute DOMString validationURL;
+ readonly attribute DOMString validationURL;
};
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl (207301 => 207302)
--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl 2016-10-13 19:26:19 UTC (rev 207302)
@@ -29,8 +29,8 @@
EnabledAtRuntime=IndexedDB,
Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict),
] interface IDBVersionChangeEvent : Event {
- [InitializedByEventConstructor] readonly attribute unsigned long long oldVersion;
- [InitializedByEventConstructor] readonly attribute unsigned long long? newVersion;
+ readonly attribute unsigned long long oldVersion;
+ readonly attribute unsigned long long? newVersion;
};
dictionary IDBVersionChangeEventInit : EventInit {
Modified: trunk/Source/WebCore/Modules/mediastream/RTCTrackEvent.idl (207301 => 207302)
--- trunk/Source/WebCore/Modules/mediastream/RTCTrackEvent.idl 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/Modules/mediastream/RTCTrackEvent.idl 2016-10-13 19:26:19 UTC (rev 207302)
@@ -32,10 +32,10 @@
Conditional=WEB_RTC,
Constructor(DOMString type, optional RTCTrackEventInit eventInitDict),
] interface RTCTrackEvent : Event {
- [InitializedByEventConstructor] readonly attribute RTCRtpReceiver? receiver;
- [InitializedByEventConstructor] readonly attribute MediaStreamTrack? track;
- [InitializedByEventConstructor] readonly attribute sequence<MediaStream> streams;
- [InitializedByEventConstructor] readonly attribute RTCRtpTransceiver? transceiver;
+ readonly attribute RTCRtpReceiver? receiver;
+ readonly attribute MediaStreamTrack? track;
+ readonly attribute sequence<MediaStream> streams;
+ readonly attribute RTCRtpTransceiver? transceiver;
};
dictionary RTCTrackEventInit : EventInit {
Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (207301 => 207302)
--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2016-10-13 19:26:19 UTC (rev 207302)
@@ -385,7 +385,7 @@
my $interface = shift;
my $template = shift;
- return $interface->extendedAttributes->{"ConstructorTemplate"} && $interface->extendedAttributes->{"ConstructorTemplate"} eq $template;
+ return $interface->extendedAttributes->{"LegacyConstructorTemplate"} && $interface->extendedAttributes->{"LegacyConstructorTemplate"} eq $template;
}
sub IsNumericType
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (207301 => 207302)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-10-13 19:26:19 UTC (rev 207302)
@@ -5727,7 +5727,7 @@
for (my $index = 0; $index < @{$interface->attributes}; $index++) {
my $attribute = @{$interface->attributes}[$index];
- if ($attribute->signature->extendedAttributes->{InitializedByEventConstructor}) {
+ if ($attribute->signature->extendedAttributes->{LegacyInitializedByEventConstructor}) {
my $attributeName = $attribute->signature->name;
my $attributeImplName = $attribute->signature->extendedAttributes->{ImplementedAs} || $attributeName;
my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
@@ -5982,7 +5982,7 @@
return HasCustomConstructor($interface)
|| $interface->extendedAttributes->{Constructor}
|| $interface->extendedAttributes->{NamedConstructor}
- || $interface->extendedAttributes->{ConstructorTemplate}
+ || $interface->extendedAttributes->{LegacyConstructorTemplate}
|| $interface->extendedAttributes->{JSBuiltinConstructor};
}
Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (207301 => 207302)
--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2016-10-13 19:26:19 UTC (rev 207302)
@@ -34,7 +34,6 @@
ConstructorCallWith=Document|ScriptExecutionContext|ScriptState
ConstructorMayThrowException
ConstructorMayThrowLegacyException
-ConstructorTemplate=Event|TypedArray
Custom
CustomCall
CustomConstructor
@@ -77,7 +76,6 @@
ImplementationNamespace=*
ImplementationReturnType=*
ImplicitThis
-InitializedByEventConstructor
InterfaceName=*
IsWeakCallback
JSBuiltin
@@ -94,6 +92,8 @@
JSGenerateToJSObject
JSGenerateToNativeObject
JSLegacyParent=*
+LegacyConstructorTemplate=Event
+LegacyInitializedByEventConstructor
LenientThis
MasqueradesAsUndefined
MayThrowException
Modified: trunk/Source/WebCore/dom/Event.idl (207301 => 207302)
--- trunk/Source/WebCore/dom/Event.idl 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/dom/Event.idl 2016-10-13 19:26:19 UTC (rev 207302)
@@ -19,7 +19,7 @@
*/
[
- ConstructorTemplate=Event,
+ LegacyConstructorTemplate=Event,
CustomToJSObject,
ExportToWrappedFunction,
Exposed=(Window,Worker),
@@ -51,9 +51,9 @@
readonly attribute EventTarget target;
readonly attribute EventTarget currentTarget;
readonly attribute unsigned short eventPhase;
- [InitializedByEventConstructor] readonly attribute boolean bubbles;
- [InitializedByEventConstructor] readonly attribute boolean cancelable;
- [InitializedByEventConstructor, EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed;
+ [LegacyInitializedByEventConstructor] readonly attribute boolean bubbles;
+ [LegacyInitializedByEventConstructor] readonly attribute boolean cancelable;
+ [LegacyInitializedByEventConstructor, EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed;
readonly attribute DOMTimeStamp timeStamp;
[EnabledAtRuntime=ShadowDOM] sequence<Node> composedPath();
Modified: trunk/Source/WebCore/dom/ProgressEvent.idl (207301 => 207302)
--- trunk/Source/WebCore/dom/ProgressEvent.idl 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/dom/ProgressEvent.idl 2016-10-13 19:26:19 UTC (rev 207302)
@@ -27,9 +27,9 @@
Constructor(DOMString type, optional ProgressEventInit eventInitDict),
Exposed=(Window,Worker),
] interface ProgressEvent : Event {
- [InitializedByEventConstructor] readonly attribute boolean lengthComputable;
- [InitializedByEventConstructor] readonly attribute unsigned long long loaded;
- [InitializedByEventConstructor] readonly attribute unsigned long long total;
+ readonly attribute boolean lengthComputable;
+ readonly attribute unsigned long long loaded;
+ readonly attribute unsigned long long total;
};
dictionary ProgressEventInit : EventInit {
Modified: trunk/Source/WebCore/dom/UIEvent.idl (207301 => 207302)
--- trunk/Source/WebCore/dom/UIEvent.idl 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/dom/UIEvent.idl 2016-10-13 19:26:19 UTC (rev 207302)
@@ -18,10 +18,10 @@
*/
[
- ConstructorTemplate=Event,
+ LegacyConstructorTemplate=Event,
] interface UIEvent : Event {
- [InitializedByEventConstructor] readonly attribute DOMWindow view;
- [InitializedByEventConstructor] readonly attribute long detail;
+ [LegacyInitializedByEventConstructor] readonly attribute DOMWindow view;
+ [LegacyInitializedByEventConstructor] readonly attribute long detail;
// FIXME: Using "undefined" as default parameter value is wrong.
void initUIEvent(optional DOMString type = "undefined", optional boolean canBubble = false, optional boolean cancelable = false, optional DOMWindow? view = null, optional long detail = 0);
Modified: trunk/Source/WebCore/html/track/TrackEvent.idl (207301 => 207302)
--- trunk/Source/WebCore/html/track/TrackEvent.idl 2016-10-13 19:21:35 UTC (rev 207301)
+++ trunk/Source/WebCore/html/track/TrackEvent.idl 2016-10-13 19:26:19 UTC (rev 207302)
@@ -25,8 +25,8 @@
[
Conditional=VIDEO_TRACK,
- ConstructorTemplate=Event
+ LegacyConstructorTemplate=Event
] interface TrackEvent : Event {
- [InitializedByEventConstructor, CustomGetter] readonly attribute object track;
+ [LegacyInitializedByEventConstructor, CustomGetter] readonly attribute object track;
};