<!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>[207238] trunk</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/207238">207238</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-10-12 13:41:49 -0700 (Wed, 12 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update more events to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163339

Reviewed by Ryosuke Niwa.

Source/WebCore:

Update more events to stop using legacy [ConstructorTemplate=Event]
and use regular constructors instead.

No new tests, updated existing tests.

* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::convertDictionary&lt;TestEventConstructor::Init&gt;):
(WebCore::JSTestEventConstructorConstructor::construct):
(WebCore::JSTestEventConstructorConstructor::prototypeForStructure):
(WebCore::JSTestEventConstructor::JSTestEventConstructor):
(WebCore::JSTestEventConstructor::createPrototype):
(WebCore::JSTestEventConstructorPrototype::create): Deleted.
(WebCore::JSTestEventConstructorPrototype::createStructure): Deleted.
(WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype): Deleted.
(WebCore::setJSTestEventConstructorConstructor): Deleted.
(WebCore::JSTestEventConstructor::getConstructor): Deleted.
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::wrapped):
(WebCore::JSTestEventConstructor::create): Deleted.
(WebCore::toJS): Deleted.
(WebCore::toJSNewlyCreated): Deleted.
* bindings/scripts/test/TestEventConstructor.idl:
* css/CSSFontFaceLoadEvent.cpp:
(WebCore::CSSFontFaceLoadEvent::CSSFontFaceLoadEvent):
* css/CSSFontFaceLoadEvent.h:
* css/CSSFontFaceLoadEvent.idl:
* html/canvas/WebGLContextEvent.cpp:
(WebCore::WebGLContextEvent::WebGLContextEvent):
* html/canvas/WebGLContextEvent.h:
* html/canvas/WebGLContextEvent.idl:
* storage/StorageEvent.cpp:
(WebCore::StorageEvent::create):
(WebCore::StorageEvent::StorageEvent):
* storage/StorageEvent.h:
* storage/StorageEvent.idl:

LayoutTests:

Update existing tests to reflect minor behavior changes.

* fast/events/constructors/storage-event-constructor-expected.txt:
* fast/events/constructors/storage-event-constructor.html:
* fast/events/constructors/webgl-context-event-constructor-expected.txt:
* fast/events/constructors/webgl-context-event-constructor.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasteventsconstructorsstorageeventconstructorexpectedtxt">trunk/LayoutTests/fast/events/constructors/storage-event-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsconstructorsstorageeventconstructorhtml">trunk/LayoutTests/fast/events/constructors/storage-event-constructor.html</a></li>
<li><a href="#trunkLayoutTestsfasteventsconstructorswebglcontexteventconstructorexpectedtxt">trunk/LayoutTests/fast/events/constructors/webgl-context-event-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsconstructorswebglcontexteventconstructorhtml">trunk/LayoutTests/fast/events/constructors/webgl-context-event-constructor.html</a></li>
<li><a href="#trunkLayoutTestsstoragedomstorageeventsbasicexpectedtxt">trunk/LayoutTests/storage/domstorage/events/basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstoragedomstorageeventsbasicsetattributeexpectedtxt">trunk/LayoutTests/storage/domstorage/events/basic-setattribute-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstoragedomstorageeventsscripttestsbasicsetattributejs">trunk/LayoutTests/storage/domstorage/events/script-tests/basic-setattribute.js</a></li>
<li><a href="#trunkLayoutTestsstoragedomstorageeventsscripttestsbasicjs">trunk/LayoutTests/storage/domstorage/events/script-tests/basic.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestEventConstructoridl">trunk/Source/WebCore/bindings/scripts/test/TestEventConstructor.idl</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceLoadEventcpp">trunk/Source/WebCore/css/CSSFontFaceLoadEvent.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceLoadEventh">trunk/Source/WebCore/css/CSSFontFaceLoadEvent.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceLoadEventidl">trunk/Source/WebCore/css/CSSFontFaceLoadEvent.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLContextEventcpp">trunk/Source/WebCore/html/canvas/WebGLContextEvent.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLContextEventh">trunk/Source/WebCore/html/canvas/WebGLContextEvent.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLContextEventidl">trunk/Source/WebCore/html/canvas/WebGLContextEvent.idl</a></li>
<li><a href="#trunkSourceWebCorestorageStorageEventcpp">trunk/Source/WebCore/storage/StorageEvent.cpp</a></li>
<li><a href="#trunkSourceWebCorestorageStorageEventh">trunk/Source/WebCore/storage/StorageEvent.h</a></li>
<li><a href="#trunkSourceWebCorestorageStorageEventidl">trunk/Source/WebCore/storage/StorageEvent.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/ChangeLog        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-10-12  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Update more events to stop using legacy [ConstructorTemplate=Event]
+        https://bugs.webkit.org/show_bug.cgi?id=163339
+
+        Reviewed by Ryosuke Niwa.
+
+        Update existing tests to reflect minor behavior changes.
+
+        * fast/events/constructors/storage-event-constructor-expected.txt:
+        * fast/events/constructors/storage-event-constructor.html:
+        * fast/events/constructors/webgl-context-event-constructor-expected.txt:
+        * fast/events/constructors/webgl-context-event-constructor.html:
+
</ins><span class="cx"> 2016-10-12  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Improve support for logging Proxy objects in console
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsconstructorsstorageeventconstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/constructors/storage-event-constructor-expected.txt (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/constructors/storage-event-constructor-expected.txt        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/fast/events/constructors/storage-event-constructor-expected.txt        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> 
</span><span class="cx"> PASS new StorageEvent('eventType').bubbles is false
</span><span class="cx"> PASS new StorageEvent('eventType').cancelable is false
</span><del>-PASS new StorageEvent('eventType').key is &quot;&quot;
</del><ins>+PASS new StorageEvent('eventType').key is null
</ins><span class="cx"> PASS new StorageEvent('eventType').oldValue is null
</span><span class="cx"> PASS new StorageEvent('eventType').newValue is null
</span><span class="cx"> PASS new StorageEvent('eventType').url is &quot;&quot;
</span><span class="lines">@@ -16,8 +16,8 @@
</span><span class="cx"> PASS new StorageEvent('eventType', { cancelable: true }).cancelable is true
</span><span class="cx"> PASS new StorageEvent('eventType', { key: 'abcde' }).key is &quot;abcde&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { key: '' }).key is &quot;&quot;
</span><del>-PASS new StorageEvent('eventType', { key: undefined }).key is &quot;undefined&quot;
-PASS new StorageEvent('eventType', { key: null }).key is &quot;null&quot;
</del><ins>+PASS new StorageEvent('eventType', { key: undefined }).key is null
+PASS new StorageEvent('eventType', { key: null }).key is null
</ins><span class="cx"> PASS new StorageEvent('eventType', { key: false }).key is &quot;false&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { key: true }).key is &quot;true&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { key: 12345 }).key is &quot;12345&quot;
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx"> PASS new StorageEvent('eventType', { key: {valueOf: function () { return 'abcde'; } } }).key is &quot;[object Object]&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { oldValue: 'abcde' }).oldValue is &quot;abcde&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { oldValue: '' }).oldValue is &quot;&quot;
</span><del>-PASS new StorageEvent('eventType', { oldValue: undefined }).oldValue is &quot;undefined&quot;
-PASS new StorageEvent('eventType', { oldValue: null }).oldValue is &quot;null&quot;
</del><ins>+PASS new StorageEvent('eventType', { oldValue: undefined }).oldValue is null
+PASS new StorageEvent('eventType', { oldValue: null }).oldValue is null
</ins><span class="cx"> PASS new StorageEvent('eventType', { oldValue: false }).oldValue is &quot;false&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { oldValue: true }).oldValue is &quot;true&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { oldValue: 12345 }).oldValue is &quot;12345&quot;
</span><span class="lines">@@ -42,8 +42,8 @@
</span><span class="cx"> PASS new StorageEvent('eventType', { oldValue: {valueOf: function () { return 'abcde'; } } }).oldValue is &quot;[object Object]&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { newValue: 'abcde' }).newValue is &quot;abcde&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { newValue: '' }).newValue is &quot;&quot;
</span><del>-PASS new StorageEvent('eventType', { newValue: undefined }).newValue is &quot;undefined&quot;
-PASS new StorageEvent('eventType', { newValue: null }).newValue is &quot;null&quot;
</del><ins>+PASS new StorageEvent('eventType', { newValue: undefined }).newValue is null
+PASS new StorageEvent('eventType', { newValue: null }).newValue is null
</ins><span class="cx"> PASS new StorageEvent('eventType', { newValue: false }).newValue is &quot;false&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { newValue: true }).newValue is &quot;true&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { newValue: 12345 }).newValue is &quot;12345&quot;
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> PASS new StorageEvent('eventType', { newValue: {valueOf: function () { return 'abcde'; } } }).newValue is &quot;[object Object]&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { url: 'abcde' }).url is &quot;abcde&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { url: '' }).url is &quot;&quot;
</span><del>-PASS new StorageEvent('eventType', { url: undefined }).url is &quot;undefined&quot;
</del><ins>+PASS new StorageEvent('eventType', { url: undefined }).url is &quot;&quot;
</ins><span class="cx"> PASS new StorageEvent('eventType', { url: null }).url is &quot;null&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { url: false }).url is &quot;false&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { url: true }).url is &quot;true&quot;
</span><span class="lines">@@ -68,20 +68,20 @@
</span><span class="cx"> PASS new StorageEvent('eventType', { url: {valueOf: function () { return 'abcde'; } } }).url is &quot;[object Object]&quot;
</span><span class="cx"> PASS new StorageEvent('eventType', { storageArea: localStorage }).storageArea is localStorage
</span><span class="cx"> PASS new StorageEvent('eventType', { storageArea: sessionStorage }).storageArea is sessionStorage
</span><del>-PASS new StorageEvent('eventType', { storageArea: test_object }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: window }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: document }).storageArea is null
</del><ins>+PASS new StorageEvent('eventType', { storageArea: test_object }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: window }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: document }) threw exception TypeError: Type error.
</ins><span class="cx"> PASS new StorageEvent('eventType', { storageArea: undefined }).storageArea is null
</span><span class="cx"> PASS new StorageEvent('eventType', { storageArea: null }).storageArea is null
</span><del>-PASS new StorageEvent('eventType', { storageArea: false }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: true }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: '' }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: 'chocolate' }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: 12345 }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: 18446744073709551615 }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: NaN }).storageArea is null
-PASS new StorageEvent('eventType', { storageArea: {valueOf: function () { return window; } } }).storageArea == window is false
-PASS new StorageEvent('eventType', { get storageArea() { return 123; } }).storageArea is null
</del><ins>+PASS new StorageEvent('eventType', { storageArea: false }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: true }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: '' }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: 'chocolate' }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: 12345 }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: 18446744073709551615 }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: NaN }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { storageArea: {valueOf: function () { return window; } } }) threw exception TypeError: Type error.
+PASS new StorageEvent('eventType', { get storageArea() { return 123; } }).storageArea threw exception TypeError: Type error.
</ins><span class="cx"> PASS new StorageEvent('eventType', { get storageArea() { throw 'StorageEvent Error'; } }) threw exception StorageEvent Error.
</span><span class="cx"> PASS new StorageEvent('eventType', { bubbles: true, cancelable: false, key: 'abc', oldValue: 'def', newValue: 'ghi', url: 'jkl', storageArea: localStorage }).bubbles is true
</span><span class="cx"> PASS new StorageEvent('eventType', { bubbles: false, cancelable: true, key: 'abc', oldValue: 'def', newValue: 'ghi', url: 'jkl', storageArea: localStorage }).cancelable is true
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsconstructorsstorageeventconstructorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/constructors/storage-event-constructor.html (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/constructors/storage-event-constructor.html        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/fast/events/constructors/storage-event-constructor.html        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> // No initializer is passed.
</span><span class="cx"> shouldBe(&quot;new StorageEvent('eventType').bubbles&quot;, &quot;false&quot;);
</span><span class="cx"> shouldBe(&quot;new StorageEvent('eventType').cancelable&quot;, &quot;false&quot;);
</span><del>-shouldBeEqualToString(&quot;new StorageEvent('eventType').key&quot;, &quot;&quot;);
</del><ins>+shouldBe(&quot;new StorageEvent('eventType').key&quot;, &quot;null&quot;);
</ins><span class="cx"> // Note: oldValue is nullable.
</span><span class="cx"> shouldBe(&quot;new StorageEvent('eventType').oldValue&quot;, &quot;null&quot;);
</span><span class="cx"> // Note: newValue is nullable.
</span><span class="lines">@@ -36,8 +36,14 @@
</span><span class="cx">     shouldBeEqualToString(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: '' }).&quot; + attr, &quot;&quot;);
</span><span class="cx"> 
</span><span class="cx">     // Non-strings.
</span><del>-    shouldBeEqualToString(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: undefined }).&quot; + attr, &quot;undefined&quot;);
-    shouldBeEqualToString(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: null }).&quot; + attr, &quot;null&quot;);
</del><ins>+    if (attr == &quot;key&quot; || attr == &quot;oldValue&quot; || attr == &quot;newValue&quot;) {
+        // Those members are nullable.
+        shouldBe(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: undefined }).&quot; + attr, &quot;null&quot;);
+        shouldBe(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: null }).&quot; + attr, &quot;null&quot;);
+    } else {
+        shouldBeEqualToString(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: undefined }).&quot; + attr, &quot;&quot;);
+        shouldBeEqualToString(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: null }).&quot; + attr, &quot;null&quot;);
+    }
</ins><span class="cx">     shouldBeEqualToString(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: false }).&quot; + attr, &quot;false&quot;);
</span><span class="cx">     shouldBeEqualToString(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: true }).&quot; + attr, &quot;true&quot;);
</span><span class="cx">     shouldBeEqualToString(&quot;new StorageEvent('eventType', { &quot; + attr + &quot;: 12345 }).&quot; + attr, &quot;12345&quot;);
</span><span class="lines">@@ -56,21 +62,21 @@
</span><span class="cx"> 
</span><span class="cx"> // Non-Storage objects.
</span><span class="cx"> var test_object = {abc: 123};
</span><del>-shouldBe(&quot;new StorageEvent('eventType', { storageArea: test_object }).storageArea&quot;, &quot;null&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { storageArea: window }).storageArea&quot;, &quot;null&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { storageArea: document }).storageArea&quot;, &quot;null&quot;);
</del><ins>+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: test_object })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: window })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: document })&quot;, &quot;TypeError&quot;);
</ins><span class="cx"> shouldBe(&quot;new StorageEvent('eventType', { storageArea: undefined }).storageArea&quot;, &quot;null&quot;);
</span><span class="cx"> shouldBe(&quot;new StorageEvent('eventType', { storageArea: null }).storageArea&quot;, &quot;null&quot;);
</span><del>-shouldBe(&quot;new StorageEvent('eventType', { storageArea: false }).storageArea&quot;, &quot;null&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { storageArea: true }).storageArea&quot;, &quot;null&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { storageArea: '' }).storageArea&quot;, &quot;null&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { storageArea: 'chocolate' }).storageArea&quot;, &quot;null&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { storageArea: 12345 }).storageArea&quot;, &quot;null&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { storageArea: 18446744073709551615 }).storageArea&quot;, &quot;null&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { storageArea: NaN }).storageArea&quot;, &quot;null&quot;);
</del><ins>+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: false })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: true })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: '' })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: 'chocolate' })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: 12345 })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: 18446744073709551615 })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: NaN })&quot;, &quot;TypeError&quot;);
</ins><span class="cx"> // Note that valueOf() is not called, when the left hand side is evaluated.
</span><del>-shouldBeFalse(&quot;new StorageEvent('eventType', { storageArea: {valueOf: function () { return window; } } }).storageArea == window&quot;);
-shouldBe(&quot;new StorageEvent('eventType', { get storageArea() { return 123; } }).storageArea&quot;, &quot;null&quot;);
</del><ins>+shouldThrowErrorName(&quot;new StorageEvent('eventType', { storageArea: {valueOf: function () { return window; } } })&quot;, &quot;TypeError&quot;);
+shouldThrowErrorName(&quot;new StorageEvent('eventType', { get storageArea() { return 123; } }).storageArea&quot;, &quot;TypeError&quot;);
</ins><span class="cx"> shouldThrow(&quot;new StorageEvent('eventType', { get storageArea() { throw 'StorageEvent Error'; } })&quot;);
</span><span class="cx"> 
</span><span class="cx"> // All initializers are passed.
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsconstructorswebglcontexteventconstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/constructors/webgl-context-event-constructor-expected.txt (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/constructors/webgl-context-event-constructor-expected.txt        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/fast/events/constructors/webgl-context-event-constructor-expected.txt        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> PASS new WebGLContextEvent('eventType', { cancelable: true }).cancelable is true
</span><span class="cx"> PASS new WebGLContextEvent('eventType', { statusMessage: 'abcde' }).statusMessage is &quot;abcde&quot;
</span><span class="cx"> PASS new WebGLContextEvent('eventType', { statusMessage: '' }).statusMessage is &quot;&quot;
</span><del>-PASS new WebGLContextEvent('eventType', { statusMessage: undefined }).statusMessage is &quot;undefined&quot;
</del><ins>+PASS new WebGLContextEvent('eventType', { statusMessage: undefined }).statusMessage is &quot;&quot;
</ins><span class="cx"> PASS new WebGLContextEvent('eventType', { statusMessage: null }).statusMessage is &quot;null&quot;
</span><span class="cx"> PASS new WebGLContextEvent('eventType', { statusMessage: false }).statusMessage is &quot;false&quot;
</span><span class="cx"> PASS new WebGLContextEvent('eventType', { statusMessage: true }).statusMessage is &quot;true&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsconstructorswebglcontexteventconstructorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/constructors/webgl-context-event-constructor.html (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/constructors/webgl-context-event-constructor.html        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/fast/events/constructors/webgl-context-event-constructor.html        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> shouldBeEqualToString(&quot;new WebGLContextEvent('eventType', { statusMessage: '' }).statusMessage&quot;, &quot;&quot;);
</span><span class="cx"> 
</span><span class="cx"> // Non-strings.
</span><del>-shouldBeEqualToString(&quot;new WebGLContextEvent('eventType', { statusMessage: undefined }).statusMessage&quot;, &quot;undefined&quot;);
</del><ins>+shouldBeEqualToString(&quot;new WebGLContextEvent('eventType', { statusMessage: undefined }).statusMessage&quot;, &quot;&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;new WebGLContextEvent('eventType', { statusMessage: null }).statusMessage&quot;, &quot;null&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;new WebGLContextEvent('eventType', { statusMessage: false }).statusMessage&quot;, &quot;false&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;new WebGLContextEvent('eventType', { statusMessage: true }).statusMessage&quot;, &quot;true&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsstoragedomstorageeventsbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/domstorage/events/basic-expected.txt (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/domstorage/events/basic-expected.txt        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/storage/domstorage/events/basic-expected.txt        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> PASS storageEventList[6].newValue is null
</span><span class="cx"> storage.clear()
</span><span class="cx"> PASS storageEventList.length is 8
</span><del>-PASS storageEventList[7].key is &quot;&quot;
</del><ins>+PASS storageEventList[7].key is null
</ins><span class="cx"> PASS storageEventList[7].oldValue is null
</span><span class="cx"> PASS storageEventList[7].newValue is null
</span><span class="cx"> 
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> PASS storageEventList[6].newValue is null
</span><span class="cx"> storage.clear()
</span><span class="cx"> PASS storageEventList.length is 8
</span><del>-PASS storageEventList[7].key is &quot;&quot;
</del><ins>+PASS storageEventList[7].key is null
</ins><span class="cx"> PASS storageEventList[7].oldValue is null
</span><span class="cx"> PASS storageEventList[7].newValue is null
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstoragedomstorageeventsbasicsetattributeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/domstorage/events/basic-setattribute-expected.txt (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/domstorage/events/basic-setattribute-expected.txt        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/storage/domstorage/events/basic-setattribute-expected.txt        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> PASS storageEventList[6].newValue is null
</span><span class="cx"> storage.clear()
</span><span class="cx"> PASS storageEventList.length is 8
</span><del>-PASS storageEventList[7].key is &quot;&quot;
</del><ins>+PASS storageEventList[7].key is null
</ins><span class="cx"> PASS storageEventList[7].oldValue is null
</span><span class="cx"> PASS storageEventList[7].newValue is null
</span><span class="cx"> 
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> PASS storageEventList[6].newValue is null
</span><span class="cx"> storage.clear()
</span><span class="cx"> PASS storageEventList.length is 8
</span><del>-PASS storageEventList[7].key is &quot;&quot;
</del><ins>+PASS storageEventList[7].key is null
</ins><span class="cx"> PASS storageEventList[7].oldValue is null
</span><span class="cx"> PASS storageEventList[7].newValue is null
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstoragedomstorageeventsscripttestsbasicsetattributejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/domstorage/events/script-tests/basic-setattribute.js (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/domstorage/events/script-tests/basic-setattribute.js        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/storage/domstorage/events/script-tests/basic-setattribute.js        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> function step6()
</span><span class="cx"> {
</span><span class="cx">     shouldBe(&quot;storageEventList.length&quot;, &quot;8&quot;);
</span><del>-    shouldBeEqualToString(&quot;storageEventList[7].key&quot;, &quot;&quot;);
</del><ins>+    shouldBeNull(&quot;storageEventList[7].key&quot;);
</ins><span class="cx">     shouldBeNull(&quot;storageEventList[7].oldValue&quot;);
</span><span class="cx">     shouldBeNull(&quot;storageEventList[7].newValue&quot;);
</span><span class="cx">  
</span></span></pre></div>
<a id="trunkLayoutTestsstoragedomstorageeventsscripttestsbasicjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/domstorage/events/script-tests/basic.js (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/domstorage/events/script-tests/basic.js        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/LayoutTests/storage/domstorage/events/script-tests/basic.js        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> function step6()
</span><span class="cx"> {
</span><span class="cx">     shouldBe(&quot;storageEventList.length&quot;, &quot;8&quot;);
</span><del>-    shouldBeEqualToString(&quot;storageEventList[7].key&quot;, &quot;&quot;);
</del><ins>+    shouldBeNull(&quot;storageEventList[7].key&quot;);
</ins><span class="cx">     shouldBeNull(&quot;storageEventList[7].oldValue&quot;);
</span><span class="cx">     shouldBeNull(&quot;storageEventList[7].newValue&quot;);
</span><span class="cx">  
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/ChangeLog        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2016-10-12  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Update more events to stop using legacy [ConstructorTemplate=Event]
+        https://bugs.webkit.org/show_bug.cgi?id=163339
+
+        Reviewed by Ryosuke Niwa.
+
+        Update more events to stop using legacy [ConstructorTemplate=Event]
+        and use regular constructors instead.
+
+        No new tests, updated existing tests.
+
+        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+        (WebCore::convertDictionary&lt;TestEventConstructor::Init&gt;):
+        (WebCore::JSTestEventConstructorConstructor::construct):
+        (WebCore::JSTestEventConstructorConstructor::prototypeForStructure):
+        (WebCore::JSTestEventConstructor::JSTestEventConstructor):
+        (WebCore::JSTestEventConstructor::createPrototype):
+        (WebCore::JSTestEventConstructorPrototype::create): Deleted.
+        (WebCore::JSTestEventConstructorPrototype::createStructure): Deleted.
+        (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype): Deleted.
+        (WebCore::setJSTestEventConstructorConstructor): Deleted.
+        (WebCore::JSTestEventConstructor::getConstructor): Deleted.
+        * bindings/scripts/test/JS/JSTestEventConstructor.h:
+        (WebCore::JSTestEventConstructor::wrapped):
+        (WebCore::JSTestEventConstructor::create): Deleted.
+        (WebCore::toJS): Deleted.
+        (WebCore::toJSNewlyCreated): Deleted.
+        * bindings/scripts/test/TestEventConstructor.idl:
+        * css/CSSFontFaceLoadEvent.cpp:
+        (WebCore::CSSFontFaceLoadEvent::CSSFontFaceLoadEvent):
+        * css/CSSFontFaceLoadEvent.h:
+        * css/CSSFontFaceLoadEvent.idl:
+        * html/canvas/WebGLContextEvent.cpp:
+        (WebCore::WebGLContextEvent::WebGLContextEvent):
+        * html/canvas/WebGLContextEvent.h:
+        * html/canvas/WebGLContextEvent.idl:
+        * storage/StorageEvent.cpp:
+        (WebCore::StorageEvent::create):
+        (WebCore::StorageEvent::StorageEvent):
+        * storage/StorageEvent.h:
+        * storage/StorageEvent.idl:
+
</ins><span class="cx"> 2016-10-12  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make Document::existingAXObjectCache() fast with accessibility disabled.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -21,12 +21,11 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;JSTestEventConstructor.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;ExceptionCode.h&quot;
</ins><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="cx"> #include &quot;JSDOMConstructor.h&quot;
</span><del>-#include &quot;JSDictionary.h&quot;
</del><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &lt;runtime/Error.h&gt;
</span><del>-#include &lt;runtime/FunctionPrototype.h&gt;
</del><span class="cx"> #include &lt;runtime/JSString.h&gt;
</span><span class="cx"> #include &lt;wtf/GetPtr.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -34,6 +33,54 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+template&lt;&gt; Optional&lt;TestEventConstructor::Init&gt; convertDictionary&lt;TestEventConstructor::Init&gt;(ExecState&amp; state, JSValue value)
+{
+    VM&amp; vm = state.vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    bool isNullOrUndefined = value.isUndefinedOrNull();
+    auto* object = isNullOrUndefined ? nullptr : value.getObject();
+    if (UNLIKELY(!isNullOrUndefined &amp;&amp; !object)) {
+        throwTypeError(&amp;state, throwScope);
+        return Nullopt;
+    }
+    if (UNLIKELY(object &amp;&amp; object-&gt;type() == RegExpObjectType)) {
+        throwTypeError(&amp;state, throwScope);
+        return Nullopt;
+    }
+    TestEventConstructor::Init result;
+    JSValue bubblesValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;bubbles&quot;));
+    if (!bubblesValue.isUndefined()) {
+        result.bubbles = convert&lt;IDLBoolean&gt;(state, bubblesValue);
+        RETURN_IF_EXCEPTION(throwScope, Nullopt);
+    } else
+        result.bubbles = false;
+    JSValue cancelableValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;cancelable&quot;));
+    if (!cancelableValue.isUndefined()) {
+        result.cancelable = convert&lt;IDLBoolean&gt;(state, cancelableValue);
+        RETURN_IF_EXCEPTION(throwScope, Nullopt);
+    } else
+        result.cancelable = false;
+    JSValue composedValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;composed&quot;));
+    if (!composedValue.isUndefined()) {
+        result.composed = convert&lt;IDLBoolean&gt;(state, composedValue);
+        RETURN_IF_EXCEPTION(throwScope, Nullopt);
+    } else
+        result.composed = false;
+    JSValue attr2Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;attr2&quot;));
+    if (!attr2Value.isUndefined()) {
+        result.attr2 = convert&lt;IDLDOMString&gt;(state, attr2Value);
+        RETURN_IF_EXCEPTION(throwScope, Nullopt);
+    } else
+        result.attr2 = &quot;&quot;;
+    JSValue attr3Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;attr3&quot;));
+    if (!attr3Value.isUndefined()) {
+        result.attr3 = convert&lt;IDLDOMString&gt;(state, attr3Value);
+        RETURN_IF_EXCEPTION(throwScope, Nullopt);
+    } else
+        result.attr3 = &quot;&quot;;
+    return WTFMove(result);
+}
+
</ins><span class="cx"> // Attributes
</span><span class="cx"> 
</span><span class="cx"> JSC::EncodedJSValue jsTestEventConstructorAttr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="lines">@@ -75,53 +122,22 @@
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state-&gt;vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><del>-    auto* jsConstructor = jsCast&lt;JSTestEventConstructorConstructor*&gt;(state-&gt;callee());
-    ASSERT(jsConstructor);
-
-    if (!jsConstructor-&gt;scriptExecutionContext())
-        return throwConstructorScriptExecutionContextUnavailableError(*state, throwScope, &quot;TestEventConstructor&quot;);
-
</del><ins>+    UNUSED_PARAM(throwScope);
+    auto* castedThis = jsCast&lt;JSTestEventConstructorConstructor*&gt;(state-&gt;callee());
+    ASSERT(castedThis);
</ins><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><del>-
-    AtomicString eventType = state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</del><ins>+    auto type = state-&gt;uncheckedArgument(0).toWTFString(state);
</ins><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><del>-
-    TestEventConstructorInit eventInit;
-
-    JSValue initializerValue = state-&gt;argument(1);
-    if (!initializerValue.isUndefinedOrNull()) {
-        // Given the above test, this will always yield an object.
-        JSObject* initializerObject = initializerValue.toObject(state);
-        ASSERT(!throwScope.exception());
-
-        // Create the dictionary wrapper from the initializer object.
-        JSDictionary dictionary(state, initializerObject);
-
-        // Attempt to fill in the EventInit.
-        if (!fillTestEventConstructorInit(eventInit, dictionary))
-            return JSValue::encode(jsUndefined());
-    }
-
-    Ref&lt;TestEventConstructor&gt; event = TestEventConstructor::createForBindings(eventType, eventInit);
-    return JSValue::encode(createWrapper&lt;TestEventConstructor&gt;(jsConstructor-&gt;globalObject(), WTFMove(event)));
</del><ins>+    auto eventInitDict = convert&lt;IDLDictionary&lt;TestEventConstructor::Init&gt;&gt;(*state, state-&gt;argument(1));
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    auto object = TestEventConstructor::create(WTFMove(type), eventInitDict.value());
+    return JSValue::encode(toJSNewlyCreated(state, castedThis-&gt;globalObject(), WTFMove(object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool fillTestEventConstructorInit(TestEventConstructorInit&amp; eventInit, JSDictionary&amp; dictionary)
-{
-    if (!dictionary.tryGetProperty(&quot;attr2&quot;, eventInit.attr2))
-        return false;
-#if ENABLE(SPECIAL_EVENT)
-    if (!dictionary.tryGetProperty(&quot;attr3&quot;, eventInit.attr3))
-        return false;
-#endif
-    return true;
-}
-
</del><span class="cx"> template&lt;&gt; JSValue JSTestEventConstructorConstructor::prototypeForStructure(JSC::VM&amp; vm, const JSDOMGlobalObject&amp; globalObject)
</span><span class="cx"> {
</span><del>-    UNUSED_PARAM(vm);
-    return globalObject.functionPrototype();
</del><ins>+    return JSEvent::getConstructor(vm, &amp;globalObject);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; void JSTestEventConstructorConstructor::initializeProperties(VM&amp; vm, JSDOMGlobalObject&amp; globalObject)
</span><span class="lines">@@ -158,13 +174,13 @@
</span><span class="cx"> const ClassInfo JSTestEventConstructor::s_info = { &quot;TestEventConstructor&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(JSTestEventConstructor) };
</span><span class="cx"> 
</span><span class="cx"> JSTestEventConstructor::JSTestEventConstructor(Structure* structure, JSDOMGlobalObject&amp; globalObject, Ref&lt;TestEventConstructor&gt;&amp;&amp; impl)
</span><del>-    : JSDOMWrapper&lt;TestEventConstructor&gt;(structure, globalObject, WTFMove(impl))
</del><ins>+    : JSEvent(structure, globalObject, WTFMove(impl))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSObject* JSTestEventConstructor::createPrototype(VM&amp; vm, JSGlobalObject* globalObject)
</span><span class="cx"> {
</span><del>-    return JSTestEventConstructorPrototype::create(vm, globalObject, JSTestEventConstructorPrototype::createStructure(vm, globalObject, globalObject-&gt;objectPrototype()));
</del><ins>+    return JSTestEventConstructorPrototype::create(vm, globalObject, JSTestEventConstructorPrototype::createStructure(vm, globalObject, JSEvent::prototype(vm, globalObject)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSObject* JSTestEventConstructor::prototype(VM&amp; vm, JSGlobalObject* globalObject)
</span><span class="lines">@@ -172,12 +188,6 @@
</span><span class="cx">     return getDOMPrototype&lt;JSTestEventConstructor&gt;(vm, globalObject);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JSTestEventConstructor::destroy(JSC::JSCell* cell)
-{
-    JSTestEventConstructor* thisObject = static_cast&lt;JSTestEventConstructor*&gt;(cell);
-    thisObject-&gt;JSTestEventConstructor::~JSTestEventConstructor();
-}
-
</del><span class="cx"> template&lt;&gt; inline JSTestEventConstructor* BindingCaller&lt;JSTestEventConstructor&gt;::castForAttribute(ExecState&amp;, EncodedJSValue thisValue)
</span><span class="cx"> {
</span><span class="cx">     return jsDynamicCast&lt;JSTestEventConstructor*&gt;(JSValue::decode(thisValue));
</span><span class="lines">@@ -263,20 +273,6 @@
</span><span class="cx">     return getDOMConstructor&lt;JSTestEventConstructorConstructor&gt;(vm, *jsCast&lt;const JSDOMGlobalObject*&gt;(globalObject));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool JSTestEventConstructorOwner::isReachableFromOpaqueRoots(JSC::Handle&lt;JSC::Unknown&gt; handle, void*, SlotVisitor&amp; visitor)
-{
-    UNUSED_PARAM(handle);
-    UNUSED_PARAM(visitor);
-    return false;
-}
-
-void JSTestEventConstructorOwner::finalize(JSC::Handle&lt;JSC::Unknown&gt; handle, void* context)
-{
-    auto* jsTestEventConstructor = jsCast&lt;JSTestEventConstructor*&gt;(handle.slot()-&gt;asCell());
-    auto&amp; world = *static_cast&lt;DOMWrapperWorld*&gt;(context);
-    uncacheWrapper(world, &amp;jsTestEventConstructor-&gt;wrapped(), jsTestEventConstructor);
-}
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx"> #pragma warning(disable: 4483)
</span><span class="lines">@@ -315,11 +311,5 @@
</span><span class="cx">     return wrap(state, globalObject, impl);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-TestEventConstructor* JSTestEventConstructor::toWrapped(JSC::JSValue value)
-{
-    if (auto* wrapper = jsDynamicCast&lt;JSTestEventConstructor*&gt;(value))
-        return &amp;wrapper-&gt;wrapped();
-    return nullptr;
-}
</del><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -20,17 +20,16 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include &quot;JSDOMWrapper.h&quot;
</del><ins>+#include &quot;JSDOMConvert.h&quot;
+#include &quot;JSEvent.h&quot;
</ins><span class="cx"> #include &quot;TestEventConstructor.h&quot;
</span><del>-#include &lt;wtf/NeverDestroyed.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class JSDictionary;
-
-class JSTestEventConstructor : public JSDOMWrapper&lt;TestEventConstructor&gt; {
</del><ins>+class JSTestEventConstructor : public JSEvent {
</ins><span class="cx"> public:
</span><del>-    using Base = JSDOMWrapper&lt;TestEventConstructor&gt;;
</del><ins>+    using Base = JSEvent;
+    using DOMWrapped = TestEventConstructor;
</ins><span class="cx">     static JSTestEventConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref&lt;TestEventConstructor&gt;&amp;&amp; impl)
</span><span class="cx">     {
</span><span class="cx">         JSTestEventConstructor* ptr = new (NotNull, JSC::allocateCell&lt;JSTestEventConstructor&gt;(globalObject-&gt;vm().heap)) JSTestEventConstructor(structure, *globalObject, WTFMove(impl));
</span><span class="lines">@@ -40,8 +39,6 @@
</span><span class="cx"> 
</span><span class="cx">     static JSC::JSObject* createPrototype(JSC::VM&amp;, JSC::JSGlobalObject*);
</span><span class="cx">     static JSC::JSObject* prototype(JSC::VM&amp;, JSC::JSGlobalObject*);
</span><del>-    static TestEventConstructor* toWrapped(JSC::JSValue);
-    static void destroy(JSC::JSCell*);
</del><span class="cx"> 
</span><span class="cx">     DECLARE_INFO;
</span><span class="cx"> 
</span><span class="lines">@@ -51,6 +48,10 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     static JSC::JSValue getConstructor(JSC::VM&amp;, const JSC::JSGlobalObject*);
</span><ins>+    TestEventConstructor&amp; wrapped() const
+    {
+        return static_cast&lt;TestEventConstructor&amp;&gt;(Base::wrapped());
+    }
</ins><span class="cx"> protected:
</span><span class="cx">     JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject&amp;, Ref&lt;TestEventConstructor&gt;&amp;&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -62,32 +63,15 @@
</span><span class="cx"> 
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class JSTestEventConstructorOwner : public JSC::WeakHandleOwner {
-public:
-    virtual bool isReachableFromOpaqueRoots(JSC::Handle&lt;JSC::Unknown&gt;, void* context, JSC::SlotVisitor&amp;);
-    virtual void finalize(JSC::Handle&lt;JSC::Unknown&gt;, void* context);
-};
-
-inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&amp;, TestEventConstructor*)
-{
-    static NeverDestroyed&lt;JSTestEventConstructorOwner&gt; owner;
-    return &amp;owner.get();
-}
-
-inline void* wrapperKey(TestEventConstructor* wrappableObject)
-{
-    return wrappableObject;
-}
-
</del><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor&amp;);
</span><span class="cx"> inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventConstructor* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref&lt;TestEventConstructor&gt;&amp;&amp;);
</span><span class="cx"> inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr&lt;TestEventConstructor&gt;&amp;&amp; impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); }
</span><span class="cx"> 
</span><del>-bool fillTestEventConstructorInit(TestEventConstructorInit&amp;, JSDictionary&amp;);
-
</del><span class="cx"> template&lt;&gt; struct JSDOMWrapperConverterTraits&lt;TestEventConstructor&gt; {
</span><span class="cx">     using WrapperClass = JSTestEventConstructor;
</span><span class="cx"> };
</span><ins>+template&lt;&gt; Optional&lt;TestEventConstructor::Init&gt; convertDictionary&lt;TestEventConstructor::Init&gt;(JSC::ExecState&amp;, JSC::JSValue);
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestEventConstructoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestEventConstructor.idl (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestEventConstructor.idl        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/bindings/scripts/test/TestEventConstructor.idl        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -29,10 +29,15 @@
</span><span class="cx"> // This IDL file is for testing the bindings code generator and for tracking
</span><span class="cx"> // changes in its ouput.
</span><span class="cx"> [
</span><del>-    ConstructorTemplate=Event
-] interface TestEventConstructor {
</del><ins>+    Constructor(DOMString type, optional TestEventConstructorInit eventInitDict),
+] interface TestEventConstructor : Event {
</ins><span class="cx">     // Attributes
</span><span class="cx">     readonly attribute DOMString attr1;
</span><del>-    [InitializedByEventConstructor] readonly attribute DOMString attr2;
-    [InitializedByEventConstructor, Conditional=SPECIAL_EVENT] readonly attribute DOMString attr3;
</del><ins>+    readonly attribute DOMString attr2;
+    [Conditional=SPECIAL_EVENT] readonly attribute DOMString attr3;
</ins><span class="cx"> };
</span><ins>+
+dictionary TestEventConstructorInit : EventInit {
+    DOMString attr2 = &quot;&quot;;
+    [Conditional=SPECIAL_EVENT]  DOMString attr3 = &quot;&quot;;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceLoadEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceLoadEvent.cpp (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceLoadEvent.cpp        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/css/CSSFontFaceLoadEvent.cpp        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -46,8 +46,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString&amp; type, const CSSFontFaceLoadEventInit&amp; initializer)
-    : Event(type, initializer)
</del><ins>+CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted)
+    : Event(type, initializer, isTrusted)
</ins><span class="cx">     , m_fontface(initializer.fontface)
</span><span class="cx">     , m_error(initializer.error)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceLoadEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceLoadEvent.h (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceLoadEvent.h        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/css/CSSFontFaceLoadEvent.h        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -42,11 +42,6 @@
</span><span class="cx"> 
</span><span class="cx"> class DOMError;
</span><span class="cx"> 
</span><del>-struct CSSFontFaceLoadEventInit : public EventInit {
-    RefPtr&lt;CSSFontFaceRule&gt; fontface;
-    RefPtr&lt;DOMError&gt; error;
-};
-
</del><span class="cx"> class CSSFontFaceLoadEvent final : public Event {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;CSSFontFaceLoadEvent&gt; create()
</span><span class="lines">@@ -54,9 +49,14 @@
</span><span class="cx">         return adoptRef&lt;CSSFontFaceLoadEvent&gt;(*new CSSFontFaceLoadEvent);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static Ref&lt;CSSFontFaceLoadEvent&gt; create(const AtomicString&amp; type, const CSSFontFaceLoadEventInit&amp; initializer)
</del><ins>+    struct Init : EventInit {
+        RefPtr&lt;CSSFontFaceRule&gt; fontface;
+        RefPtr&lt;DOMError&gt; error;
+    };
+
+    static Ref&lt;CSSFontFaceLoadEvent&gt; create(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted = IsTrusted::No)
</ins><span class="cx">     {
</span><del>-        return adoptRef&lt;CSSFontFaceLoadEvent&gt;(*new CSSFontFaceLoadEvent(type, initializer));
</del><ins>+        return adoptRef&lt;CSSFontFaceLoadEvent&gt;(*new CSSFontFaceLoadEvent(type, initializer, isTrusted));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     static Ref&lt;CSSFontFaceLoadEvent&gt; createForFontFaceRule(const AtomicString&amp; type, RefPtr&lt;CSSFontFaceRule&gt;&amp;&amp; rule)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> private:
</span><span class="cx">     CSSFontFaceLoadEvent();
</span><span class="cx">     CSSFontFaceLoadEvent(const AtomicString&amp;, RefPtr&lt;CSSFontFaceRule&gt;&amp;&amp;, RefPtr&lt;DOMError&gt;&amp;&amp;);
</span><del>-    CSSFontFaceLoadEvent(const AtomicString&amp;, const CSSFontFaceLoadEventInit&amp;);
</del><ins>+    CSSFontFaceLoadEvent(const AtomicString&amp;, const Init&amp;, IsTrusted);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CSSFontFaceRule&gt; m_fontface;
</span><span class="cx">     RefPtr&lt;DOMError&gt; m_error;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceLoadEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceLoadEvent.idl (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceLoadEvent.idl        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/css/CSSFontFaceLoadEvent.idl        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -29,10 +29,14 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
</del><span class="cx">     Conditional=FONT_LOAD_EVENTS,
</span><del>-    ConstructorTemplate=Event
</del><ins>+    Constructor(DOMString type, optional CSSFontFaceLoadEventInit eventInit),
</ins><span class="cx"> ] interface CSSFontFaceLoadEvent : Event {
</span><del>-    [InitializedByEventConstructor] readonly attribute CSSFontFaceRule fontface;
-    [InitializedByEventConstructor] readonly attribute DOMError error;
</del><ins>+    readonly attribute CSSFontFaceRule? fontface;
+    readonly attribute DOMError? error;
</ins><span class="cx"> };
</span><ins>+
+dictionary CSSFontFaceLoadEventInit : EventInit {
+    CSSFontFaceRule? fontface = null;
+    DOMError? error = null;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLContextEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLContextEvent.cpp (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLContextEvent.cpp        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/html/canvas/WebGLContextEvent.cpp        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -38,8 +38,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebGLContextEvent::WebGLContextEvent(const AtomicString&amp; type, const WebGLContextEventInit&amp; initializer)
-    : Event(type, initializer)
</del><ins>+WebGLContextEvent::WebGLContextEvent(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted)
+    : Event(type, initializer, isTrusted)
</ins><span class="cx">     , m_statusMessage(initializer.statusMessage)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLContextEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLContextEvent.h (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLContextEvent.h        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/html/canvas/WebGLContextEvent.h        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -30,10 +30,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-struct WebGLContextEventInit : public EventInit {
-    String statusMessage;
-};
-
</del><span class="cx"> class WebGLContextEvent final : public Event {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;WebGLContextEvent&gt; create(const AtomicString&amp; type, bool canBubble, bool cancelable, const String&amp; statusMessage)
</span><span class="lines">@@ -40,9 +36,14 @@
</span><span class="cx">     {
</span><span class="cx">         return adoptRef(*new WebGLContextEvent(type, canBubble, cancelable, statusMessage));
</span><span class="cx">     }
</span><del>-    static Ref&lt;WebGLContextEvent&gt; createForBindings(const AtomicString&amp; type, const WebGLContextEventInit&amp; initializer)
</del><ins>+
+    struct Init : EventInit {
+        String statusMessage;
+    };
+
+    static Ref&lt;WebGLContextEvent&gt; create(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted = IsTrusted::No)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new WebGLContextEvent(type, initializer));
</del><ins>+        return adoptRef(*new WebGLContextEvent(type, initializer, isTrusted));
</ins><span class="cx">     }
</span><span class="cx">     virtual ~WebGLContextEvent();
</span><span class="cx"> 
</span><span class="lines">@@ -52,7 +53,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WebGLContextEvent(const AtomicString&amp; type, bool canBubble, bool cancelable, const String&amp; statusMessage);
</span><del>-    WebGLContextEvent(const AtomicString&amp;, const WebGLContextEventInit&amp;);
</del><ins>+    WebGLContextEvent(const AtomicString&amp;, const Init&amp;, IsTrusted);
</ins><span class="cx"> 
</span><span class="cx">     String m_statusMessage;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLContextEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLContextEvent.idl (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLContextEvent.idl        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/html/canvas/WebGLContextEvent.idl        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -25,8 +25,11 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=WEBGL,
</span><del>-    ConstructorTemplate=Event
</del><ins>+    Constructor(DOMString type, optional WebGLContextEventInit eventInit),
</ins><span class="cx"> ] interface WebGLContextEvent : Event {
</span><del>-    [InitializedByEventConstructor] readonly attribute DOMString statusMessage;
</del><ins>+    readonly attribute DOMString statusMessage;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><ins>+dictionary WebGLContextEventInit : EventInit {
+    DOMString statusMessage = &quot;&quot;;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorestorageStorageEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/StorageEvent.cpp (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/StorageEvent.cpp        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/storage/StorageEvent.cpp        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx">     return adoptRef(*new StorageEvent(type, key, oldValue, newValue, url, storageArea));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;StorageEvent&gt; StorageEvent::createForBindings(const AtomicString&amp; type, const StorageEventInit&amp; initializer)
</del><ins>+Ref&lt;StorageEvent&gt; StorageEvent::create(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted)
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new StorageEvent(type, initializer));
</del><ins>+    return adoptRef(*new StorageEvent(type, initializer, isTrusted));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> StorageEvent::StorageEvent(const AtomicString&amp; type, const String&amp; key, const String&amp; oldValue, const String&amp; newValue, const String&amp; url, Storage* storageArea)
</span><span class="lines">@@ -64,8 +64,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-StorageEvent::StorageEvent(const AtomicString&amp; type, const StorageEventInit&amp; initializer)
-    : Event(type, initializer)
</del><ins>+StorageEvent::StorageEvent(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted)
+    : Event(type, initializer, isTrusted)
</ins><span class="cx">     , m_key(initializer.key)
</span><span class="cx">     , m_oldValue(initializer.oldValue)
</span><span class="cx">     , m_newValue(initializer.newValue)
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStorageEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/StorageEvent.h (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/StorageEvent.h        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/storage/StorageEvent.h        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -33,19 +33,20 @@
</span><span class="cx"> 
</span><span class="cx"> class Storage;
</span><span class="cx"> 
</span><del>-struct StorageEventInit : public EventInit {
-    String key;
-    String oldValue;
-    String newValue;
-    String url;
-    RefPtr&lt;Storage&gt; storageArea;
-};
-
</del><span class="cx"> class StorageEvent : public Event {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;StorageEvent&gt; create(const AtomicString&amp; type, const String&amp; key, const String&amp; oldValue, const String&amp; newValue, const String&amp; url, Storage* storageArea);
</span><span class="cx">     static Ref&lt;StorageEvent&gt; createForBindings();
</span><del>-    static Ref&lt;StorageEvent&gt; createForBindings(const AtomicString&amp;, const StorageEventInit&amp;);
</del><ins>+
+    struct Init : EventInit {
+        String key;
+        String oldValue;
+        String newValue;
+        String url;
+        RefPtr&lt;Storage&gt; storageArea;
+    };
+
+    static Ref&lt;StorageEvent&gt; create(const AtomicString&amp;, const Init&amp;, IsTrusted = IsTrusted::No);
</ins><span class="cx">     virtual ~StorageEvent();
</span><span class="cx"> 
</span><span class="cx">     const String&amp; key() const { return m_key; }
</span><span class="lines">@@ -64,7 +65,7 @@
</span><span class="cx"> private:
</span><span class="cx">     StorageEvent();
</span><span class="cx">     StorageEvent(const AtomicString&amp; type, const String&amp; key, const String&amp; oldValue, const String&amp; newValue, const String&amp; url, Storage* storageArea);
</span><del>-    StorageEvent(const AtomicString&amp;, const StorageEventInit&amp;);
</del><ins>+    StorageEvent(const AtomicString&amp;, const Init&amp;, IsTrusted);
</ins><span class="cx"> 
</span><span class="cx">     String m_key;
</span><span class="cx">     String m_oldValue;
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStorageEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/StorageEvent.idl (207237 => 207238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/StorageEvent.idl        2016-10-12 20:38:37 UTC (rev 207237)
+++ trunk/Source/WebCore/storage/StorageEvent.idl        2016-10-12 20:41:49 UTC (rev 207238)
</span><span class="lines">@@ -24,13 +24,13 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    ConstructorTemplate=Event,
</del><ins>+    Constructor(DOMString type, optional StorageEventInit eventInitDict)
</ins><span class="cx"> ] interface StorageEvent : Event {
</span><del>-    [InitializedByEventConstructor] readonly attribute DOMString key;
-    [InitializedByEventConstructor] readonly attribute DOMString? oldValue;
-    [InitializedByEventConstructor] readonly attribute DOMString? newValue;
-    [InitializedByEventConstructor] readonly attribute USVString url;
-    [InitializedByEventConstructor] readonly attribute Storage storageArea;
</del><ins>+    readonly attribute DOMString? key;
+    readonly attribute DOMString? oldValue;
+    readonly attribute DOMString? newValue;
+    readonly attribute USVString url;
+    readonly attribute Storage? storageArea;
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Using &quot;undefined&quot; as default parameter value is wrong.
</span><span class="cx">     void initStorageEvent(optional DOMString typeArg = &quot;undefined&quot;,
</span><span class="lines">@@ -46,3 +46,10 @@
</span><span class="cx">     // void initStorageEventNS(DOMString namespaceURI, DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString keyArg, DOMString oldValueArg, DOMString newValueArg, USVString urlArg, Storage? storageAreaArg);
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+dictionary StorageEventInit : EventInit {
+    DOMString? key = null;
+    DOMString? oldValue = null;
+    DOMString? newValue = null;
+    USVString url = &quot;&quot;;
+    Storage? storageArea = null;
+};
</ins></span></pre>
</div>
</div>

</body>
</html>