<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[207302] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207302">207302</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-10-13 12:26:19 -0700 (Thu, 13 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>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:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePayValidateMerchantEventidl">trunk/Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventidl">trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCTrackEventidl">trunk/Source/WebCore/Modules/mediastream/RTCTrackEvent.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorpm">trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributestxt">trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt</a></li>
<li><a href="#trunkSourceWebCoredomEventidl">trunk/Source/WebCore/dom/Event.idl</a></li>
<li><a href="#trunkSourceWebCoredomProgressEventidl">trunk/Source/WebCore/dom/ProgressEvent.idl</a></li>
<li><a href="#trunkSourceWebCoredomUIEventidl">trunk/Source/WebCore/dom/UIEvent.idl</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTrackEventidl">trunk/Source/WebCore/html/track/TrackEvent.idl</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2016-10-13 Chris Dumez <cdumez@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:
+
</ins><span class="cx"> 2016-10-13 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r207297.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePayValidateMerchantEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.idl (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -27,5 +27,5 @@
</span><span class="cx"> Conditional=APPLE_PAY,
</span><span class="cx"> NoInterfaceObject,
</span><span class="cx"> ] interface ApplePayValidateMerchantEvent : Event {
</span><del>- [InitializedByEventConstructor] readonly attribute DOMString validationURL;
</del><ins>+ readonly attribute DOMString validationURL;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx"> EnabledAtRuntime=IndexedDB,
</span><span class="cx"> Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict),
</span><span class="cx"> ] interface IDBVersionChangeEvent : Event {
</span><del>- [InitializedByEventConstructor] readonly attribute unsigned long long oldVersion;
- [InitializedByEventConstructor] readonly attribute unsigned long long? newVersion;
</del><ins>+ readonly attribute unsigned long long oldVersion;
+ readonly attribute unsigned long long? newVersion;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> dictionary IDBVersionChangeEventInit : EventInit {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCTrackEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCTrackEvent.idl (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -32,10 +32,10 @@
</span><span class="cx"> Conditional=WEB_RTC,
</span><span class="cx"> Constructor(DOMString type, optional RTCTrackEventInit eventInitDict),
</span><span class="cx"> ] interface RTCTrackEvent : Event {
</span><del>- [InitializedByEventConstructor] readonly attribute RTCRtpReceiver? receiver;
- [InitializedByEventConstructor] readonly attribute MediaStreamTrack? track;
- [InitializedByEventConstructor] readonly attribute sequence<MediaStream> streams;
- [InitializedByEventConstructor] readonly attribute RTCRtpTransceiver? transceiver;
</del><ins>+ readonly attribute RTCRtpReceiver? receiver;
+ readonly attribute MediaStreamTrack? track;
+ readonly attribute sequence<MediaStream> streams;
+ readonly attribute RTCRtpTransceiver? transceiver;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> dictionary RTCTrackEventInit : EventInit {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -385,7 +385,7 @@
</span><span class="cx"> my $interface = shift;
</span><span class="cx"> my $template = shift;
</span><span class="cx">
</span><del>- return $interface->extendedAttributes->{"ConstructorTemplate"} && $interface->extendedAttributes->{"ConstructorTemplate"} eq $template;
</del><ins>+ return $interface->extendedAttributes->{"LegacyConstructorTemplate"} && $interface->extendedAttributes->{"LegacyConstructorTemplate"} eq $template;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub IsNumericType
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -5727,7 +5727,7 @@
</span><span class="cx">
</span><span class="cx"> for (my $index = 0; $index < @{$interface->attributes}; $index++) {
</span><span class="cx"> my $attribute = @{$interface->attributes}[$index];
</span><del>- if ($attribute->signature->extendedAttributes->{InitializedByEventConstructor}) {
</del><ins>+ if ($attribute->signature->extendedAttributes->{LegacyInitializedByEventConstructor}) {
</ins><span class="cx"> my $attributeName = $attribute->signature->name;
</span><span class="cx"> my $attributeImplName = $attribute->signature->extendedAttributes->{ImplementedAs} || $attributeName;
</span><span class="cx"> my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
</span><span class="lines">@@ -5982,7 +5982,7 @@
</span><span class="cx"> return HasCustomConstructor($interface)
</span><span class="cx"> || $interface->extendedAttributes->{Constructor}
</span><span class="cx"> || $interface->extendedAttributes->{NamedConstructor}
</span><del>- || $interface->extendedAttributes->{ConstructorTemplate}
</del><ins>+ || $interface->extendedAttributes->{LegacyConstructorTemplate}
</ins><span class="cx"> || $interface->extendedAttributes->{JSBuiltinConstructor};
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> ConstructorCallWith=Document|ScriptExecutionContext|ScriptState
</span><span class="cx"> ConstructorMayThrowException
</span><span class="cx"> ConstructorMayThrowLegacyException
</span><del>-ConstructorTemplate=Event|TypedArray
</del><span class="cx"> Custom
</span><span class="cx"> CustomCall
</span><span class="cx"> CustomConstructor
</span><span class="lines">@@ -77,7 +76,6 @@
</span><span class="cx"> ImplementationNamespace=*
</span><span class="cx"> ImplementationReturnType=*
</span><span class="cx"> ImplicitThis
</span><del>-InitializedByEventConstructor
</del><span class="cx"> InterfaceName=*
</span><span class="cx"> IsWeakCallback
</span><span class="cx"> JSBuiltin
</span><span class="lines">@@ -94,6 +92,8 @@
</span><span class="cx"> JSGenerateToJSObject
</span><span class="cx"> JSGenerateToNativeObject
</span><span class="cx"> JSLegacyParent=*
</span><ins>+LegacyConstructorTemplate=Event
+LegacyInitializedByEventConstructor
</ins><span class="cx"> LenientThis
</span><span class="cx"> MasqueradesAsUndefined
</span><span class="cx"> MayThrowException
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Event.idl (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><del>- ConstructorTemplate=Event,
</del><ins>+ LegacyConstructorTemplate=Event,
</ins><span class="cx"> CustomToJSObject,
</span><span class="cx"> ExportToWrappedFunction,
</span><span class="cx"> Exposed=(Window,Worker),
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx"> readonly attribute EventTarget target;
</span><span class="cx"> readonly attribute EventTarget currentTarget;
</span><span class="cx"> readonly attribute unsigned short eventPhase;
</span><del>- [InitializedByEventConstructor] readonly attribute boolean bubbles;
- [InitializedByEventConstructor] readonly attribute boolean cancelable;
- [InitializedByEventConstructor, EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed;
</del><ins>+ [LegacyInitializedByEventConstructor] readonly attribute boolean bubbles;
+ [LegacyInitializedByEventConstructor] readonly attribute boolean cancelable;
+ [LegacyInitializedByEventConstructor, EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed;
</ins><span class="cx"> readonly attribute DOMTimeStamp timeStamp;
</span><span class="cx">
</span><span class="cx"> [EnabledAtRuntime=ShadowDOM] sequence<Node> composedPath();
</span></span></pre></div>
<a id="trunkSourceWebCoredomProgressEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ProgressEvent.idl (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -27,9 +27,9 @@
</span><span class="cx"> Constructor(DOMString type, optional ProgressEventInit eventInitDict),
</span><span class="cx"> Exposed=(Window,Worker),
</span><span class="cx"> ] interface ProgressEvent : Event {
</span><del>- [InitializedByEventConstructor] readonly attribute boolean lengthComputable;
- [InitializedByEventConstructor] readonly attribute unsigned long long loaded;
- [InitializedByEventConstructor] readonly attribute unsigned long long total;
</del><ins>+ readonly attribute boolean lengthComputable;
+ readonly attribute unsigned long long loaded;
+ readonly attribute unsigned long long total;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> dictionary ProgressEventInit : EventInit {
</span></span></pre></div>
<a id="trunkSourceWebCoredomUIEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/UIEvent.idl (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -18,10 +18,10 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><del>- ConstructorTemplate=Event,
</del><ins>+ LegacyConstructorTemplate=Event,
</ins><span class="cx"> ] interface UIEvent : Event {
</span><del>- [InitializedByEventConstructor] readonly attribute DOMWindow view;
- [InitializedByEventConstructor] readonly attribute long detail;
</del><ins>+ [LegacyInitializedByEventConstructor] readonly attribute DOMWindow view;
+ [LegacyInitializedByEventConstructor] readonly attribute long detail;
</ins><span class="cx">
</span><span class="cx"> // FIXME: Using "undefined" as default parameter value is wrong.
</span><span class="cx"> void initUIEvent(optional DOMString type = "undefined", optional boolean canBubble = false, optional boolean cancelable = false, optional DOMWindow? view = null, optional long detail = 0);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTrackEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TrackEvent.idl (207301 => 207302)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -25,8 +25,8 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> Conditional=VIDEO_TRACK,
</span><del>- ConstructorTemplate=Event
</del><ins>+ LegacyConstructorTemplate=Event
</ins><span class="cx"> ] interface TrackEvent : Event {
</span><del>- [InitializedByEventConstructor, CustomGetter] readonly attribute object track;
</del><ins>+ [LegacyInitializedByEventConstructor, CustomGetter] readonly attribute object track;
</ins><span class="cx"> };
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>