<!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>[207277] 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/207277">207277</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-10-12 22:18:59 -0700 (Wed, 12 Oct 2016)</dd>
</dl>

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

Reviewed by Ryosuke Niwa.

Source/WebCore:

Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop
using legacy [ConstructorTemplate=Event] and use regular constructors
instead.

This also adds support for having dictionary members that are typed
arrays because this was needed.

Test: fast/events/webkit-media-key-events-constructor.html

* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
(WebCore::WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent):
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
(WebCore::WebKitMediaKeyMessageEvent::create):
(WebCore::WebKitMediaKeyMessageEvent::createForBindings): Deleted.
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl:
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
(WebCore::WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent):
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
(WebCore::WebKitMediaKeyNeededEvent::create):
(WebCore::WebKitMediaKeyNeededEvent::createForBindings): Deleted.
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl:
* bindings/js/JSDOMConvert.h:
(WebCore::Converter&lt;IDLInterface&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;&gt;::convert):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDefaultValue):
* dom/InputEvent.cpp:
(WebCore::InputEvent::InputEvent):
* dom/InputEvent.h:
* dom/InputEvent.idl:

LayoutTests:

Add layout test coverage.

* fast/events/webkit-media-key-events-constructor-expected.txt: Added.
* fast/events/webkit-media-key-events-constructor.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyMessageEventcpp">trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyMessageEventh">trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyMessageEventidl">trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyNeededEventcpp">trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyNeededEventh">trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyNeededEventidl">trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConverth">trunk/Source/WebCore/bindings/js/JSDOMConvert.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCoredomInputEventcpp">trunk/Source/WebCore/dom/InputEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoredomInputEventh">trunk/Source/WebCore/dom/InputEvent.h</a></li>
<li><a href="#trunkSourceWebCoredomInputEventidl">trunk/Source/WebCore/dom/InputEvent.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasteventswebkitmediakeyeventsconstructorexpectedtxt">trunk/LayoutTests/fast/events/webkit-media-key-events-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventswebkitmediakeyeventsconstructorhtml">trunk/LayoutTests/fast/events/webkit-media-key-events-constructor.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/LayoutTests/ChangeLog        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2016-10-12  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop using legacy [ConstructorTemplate=Event]
+        https://bugs.webkit.org/show_bug.cgi?id=163369
+
+        Reviewed by Ryosuke Niwa.
+
+        Add layout test coverage.
+
+        * fast/events/webkit-media-key-events-constructor-expected.txt: Added.
+        * fast/events/webkit-media-key-events-constructor.html: Added.
+
+2016-10-12  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=163358
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventswebkitmediakeyeventsconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/webkit-media-key-events-constructor-expected.txt (0 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/webkit-media-key-events-constructor-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/webkit-media-key-events-constructor-expected.txt        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+Test the WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent constructors.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+event = new WebKitMediaKeyMessageEvent(&quot;foo&quot;)
+PASS event.type is &quot;foo&quot;
+PASS event.bubbles is false
+PASS event.cancelable is false
+PASS event.message is null
+PASS event.destinationURL is &quot;&quot;
+
+event = new WebKitMediaKeyMessageEvent(&quot;foo&quot;, { bubbles: true, cancelable: true, message: testMessage, destinationURL: &quot;testURL&quot; })
+PASS event.type is &quot;foo&quot;
+PASS event.bubbles is true
+PASS event.cancelable is true
+PASS event.message is testMessage
+PASS event.destinationURL is &quot;testURL&quot;
+
+event = new WebKitMediaKeyNeededEvent(&quot;foo&quot;)
+PASS event.type is &quot;foo&quot;
+PASS event.bubbles is false
+PASS event.cancelable is false
+PASS event.initData is null
+
+event = new WebKitMediaKeyNeededEvent(&quot;foo&quot;, { bubbles: true, cancelable: true, initData: testMessage })
+PASS event.type is &quot;foo&quot;
+PASS event.bubbles is true
+PASS event.cancelable is true
+PASS event.initData is testMessage
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventswebkitmediakeyeventsconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/webkit-media-key-events-constructor.html (0 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/webkit-media-key-events-constructor.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/webkit-media-key-events-constructor.html        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Test the WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent constructors.&quot;);
+
+evalAndLog('event = new WebKitMediaKeyMessageEvent(&quot;foo&quot;)');
+shouldBeEqualToString(&quot;event.type&quot;, &quot;foo&quot;);
+shouldBeFalse(&quot;event.bubbles&quot;);
+shouldBeFalse(&quot;event.cancelable&quot;);
+shouldBeNull(&quot;event.message&quot;);
+shouldBeEqualToString(&quot;event.destinationURL&quot;, &quot;&quot;);
+debug(&quot;&quot;);
+
+var testMessage = new Uint8Array(8);
+evalAndLog('event = new WebKitMediaKeyMessageEvent(&quot;foo&quot;, { bubbles: true, cancelable: true, message: testMessage, destinationURL: &quot;testURL&quot; })');
+shouldBeEqualToString(&quot;event.type&quot;, &quot;foo&quot;);
+shouldBeTrue(&quot;event.bubbles&quot;);
+shouldBeTrue(&quot;event.cancelable&quot;);
+shouldBe(&quot;event.message&quot;, &quot;testMessage&quot;);
+shouldBeEqualToString(&quot;event.destinationURL&quot;, &quot;testURL&quot;);
+debug(&quot;&quot;);
+
+evalAndLog('event = new WebKitMediaKeyNeededEvent(&quot;foo&quot;)');
+shouldBeEqualToString(&quot;event.type&quot;, &quot;foo&quot;);
+shouldBeFalse(&quot;event.bubbles&quot;);
+shouldBeFalse(&quot;event.cancelable&quot;);
+shouldBeNull(&quot;event.initData&quot;);
+debug(&quot;&quot;);
+
+evalAndLog('event = new WebKitMediaKeyNeededEvent(&quot;foo&quot;, { bubbles: true, cancelable: true, initData: testMessage })');
+shouldBeEqualToString(&quot;event.type&quot;, &quot;foo&quot;);
+shouldBeTrue(&quot;event.bubbles&quot;);
+shouldBeTrue(&quot;event.cancelable&quot;);
+shouldBe(&quot;event.initData&quot;, &quot;testMessage&quot;);
+debug(&quot;&quot;);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -2656,6 +2656,9 @@
</span><span class="cx"> 
</span><span class="cx"> fast/events/page-visibility-iframe-move-test.html [ Skip ]
</span><span class="cx"> 
</span><ins>+# LEGACY_ENCRYPTED_MEDIA is disabled on iOS.
+fast/events/webkit-media-key-events-constructor.html [ Failure ]
+
</ins><span class="cx"> webkit.org/b/161143 imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/161395 svg/animations/reinserting-svg-into-document.html [ Pass Failure ]
</span><span class="lines">@@ -2705,4 +2708,4 @@
</span><span class="cx"> webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size-iframe.html [ Skip ]
</span><span class="cx"> webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size.html [ Skip ]
</span><span class="cx"> webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size-iframe.html [ Skip ]
</span><del>-webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size.html [ Skip ]
</del><span class="cx">\ No newline at end of file
</span><ins>+webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size.html [ Skip ]
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/ChangeLog        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -1,5 +1,42 @@
</span><span class="cx"> 2016-10-12  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop using legacy [ConstructorTemplate=Event]
+        https://bugs.webkit.org/show_bug.cgi?id=163369
+
+        Reviewed by Ryosuke Niwa.
+
+        Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop
+        using legacy [ConstructorTemplate=Event] and use regular constructors
+        instead.
+
+        This also adds support for having dictionary members that are typed
+        arrays because this was needed.
+
+        Test: fast/events/webkit-media-key-events-constructor.html
+
+        * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
+        (WebCore::WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent):
+        * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
+        (WebCore::WebKitMediaKeyMessageEvent::create):
+        (WebCore::WebKitMediaKeyMessageEvent::createForBindings): Deleted.
+        * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl:
+        * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
+        (WebCore::WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent):
+        * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
+        (WebCore::WebKitMediaKeyNeededEvent::create):
+        (WebCore::WebKitMediaKeyNeededEvent::createForBindings): Deleted.
+        * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl:
+        * bindings/js/JSDOMConvert.h:
+        (WebCore::Converter&lt;IDLInterface&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;&gt;::convert):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateDefaultValue):
+        * dom/InputEvent.cpp:
+        (WebCore::InputEvent::InputEvent):
+        * dom/InputEvent.h:
+        * dom/InputEvent.idl:
+
+2016-10-12  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=163358
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyMessageEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -41,8 +41,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent(const AtomicString&amp; type, const WebKitMediaKeyMessageEventInit&amp; initializer)
-    : Event(type, initializer)
</del><ins>+WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted)
+    : Event(type, initializer, isTrusted)
</ins><span class="cx">     , m_message(initializer.message)
</span><span class="cx">     , m_destinationURL(initializer.destinationURL)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyMessageEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -34,11 +34,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-struct WebKitMediaKeyMessageEventInit : public EventInit {
-    RefPtr&lt;Uint8Array&gt; message;
-    String destinationURL;
-};
-
</del><span class="cx"> class WebKitMediaKeyMessageEvent : public Event {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~WebKitMediaKeyMessageEvent();
</span><span class="lines">@@ -48,9 +43,14 @@
</span><span class="cx">         return adoptRef(*new WebKitMediaKeyMessageEvent(type, message, destinationURL));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static Ref&lt;WebKitMediaKeyMessageEvent&gt; createForBindings(const AtomicString&amp; type, const WebKitMediaKeyMessageEventInit&amp; initializer)
</del><ins>+    struct Init : EventInit {
+        RefPtr&lt;Uint8Array&gt; message;
+        String destinationURL;
+    };
+
+    static Ref&lt;WebKitMediaKeyMessageEvent&gt; create(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted = IsTrusted::No)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new WebKitMediaKeyMessageEvent(type, initializer));
</del><ins>+        return adoptRef(*new WebKitMediaKeyMessageEvent(type, initializer, isTrusted));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     EventInterface eventInterface() const override;
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WebKitMediaKeyMessageEvent(const AtomicString&amp; type, Uint8Array* message, const String&amp; destinationURL);
</span><del>-    WebKitMediaKeyMessageEvent(const AtomicString&amp; type, const WebKitMediaKeyMessageEventInit&amp; initializer);
</del><ins>+    WebKitMediaKeyMessageEvent(const AtomicString&amp; type, const Init&amp;, IsTrusted);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Uint8Array&gt; m_message;
</span><span class="cx">     String m_destinationURL;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyMessageEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -25,9 +25,13 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=LEGACY_ENCRYPTED_MEDIA,
</span><del>-    ConstructorTemplate=Event,
</del><ins>+    Constructor(DOMString type, optional WebKitMediaKeyMessageEventInit eventInitDict),
</ins><span class="cx"> ] interface WebKitMediaKeyMessageEvent : Event {
</span><span class="cx">     readonly attribute Uint8Array message;
</span><del>-    [InitializedByEventConstructor] readonly attribute DOMString destinationURL;
</del><ins>+    readonly attribute DOMString destinationURL;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><ins>+dictionary WebKitMediaKeyMessageEventInit : EventInit {
+    Uint8Array? message = null;
+    DOMString destinationURL = &quot;&quot;;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyNeededEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -39,8 +39,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent(const AtomicString&amp; type, const WebKitMediaKeyNeededEventInit&amp; initializer)
-    : Event(type, initializer)
</del><ins>+WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted)
+    : Event(type, initializer, isTrusted)
</ins><span class="cx">     , m_initData(initializer.initData)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyNeededEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -33,10 +33,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-struct WebKitMediaKeyNeededEventInit : public EventInit {
-    RefPtr&lt;Uint8Array&gt; initData;
-};
-
</del><span class="cx"> class WebKitMediaKeyNeededEvent : public Event {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~WebKitMediaKeyNeededEvent();
</span><span class="lines">@@ -46,9 +42,13 @@
</span><span class="cx">         return adoptRef(*new WebKitMediaKeyNeededEvent(type, initData));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static Ref&lt;WebKitMediaKeyNeededEvent&gt; createForBindings(const AtomicString&amp; type, const WebKitMediaKeyNeededEventInit&amp; initializer)
</del><ins>+    struct Init : EventInit {
+        RefPtr&lt;Uint8Array&gt; initData;
+    };
+
+    static Ref&lt;WebKitMediaKeyNeededEvent&gt; create(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted = IsTrusted::No)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new WebKitMediaKeyNeededEvent(type, initializer));
</del><ins>+        return adoptRef(*new WebKitMediaKeyNeededEvent(type, initializer, isTrusted));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     EventInterface eventInterface() const override;
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WebKitMediaKeyNeededEvent(const AtomicString&amp; type, Uint8Array* initData);
</span><del>-    WebKitMediaKeyNeededEvent(const AtomicString&amp; type, const WebKitMediaKeyNeededEventInit&amp; initializer);
</del><ins>+    WebKitMediaKeyNeededEvent(const AtomicString&amp; type, const Init&amp;, IsTrusted);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Uint8Array&gt; m_initData;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmedialegacyWebKitMediaKeyNeededEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -25,8 +25,11 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=LEGACY_ENCRYPTED_MEDIA,
</span><del>-    ConstructorTemplate=Event 
</del><ins>+    Constructor(DOMString type, optional WebKitMediaKeyNeededEventInit eventInitDict),
</ins><span class="cx"> ] interface WebKitMediaKeyNeededEvent : Event {
</span><span class="cx">     readonly attribute Uint8Array initData;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+dictionary WebKitMediaKeyNeededEventInit : EventInit {
+    Uint8Array? initData = null;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -121,6 +121,28 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+
+// Typed arrays support.
+
+template&lt;typename Adaptor&gt; struct IDLInterface&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt; : IDLType&lt;Ref&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;&gt; {
+    using RawType = JSC::GenericTypedArrayView&lt;Adaptor&gt;;
+    using NullableType = RefPtr&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;;
+};
+
+template&lt;typename Adaptor&gt; struct Converter&lt;IDLInterface&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;&gt; : DefaultConverter&lt;IDLInterface&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;&gt; {
+    using ReturnType = RefPtr&lt;JSC::GenericTypedArrayView&lt;Adaptor&gt;&gt;;
+
+    static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+    {
+        JSC::VM&amp; vm = state.vm();
+        auto scope = DECLARE_THROW_SCOPE(vm);
+        ReturnType object = JSC::toNativeTypedView&lt;Adaptor&gt;(value);
+        if (!object)
+            throwTypeError(&amp;state, scope);
+        return object;
+    }
+};
+
</ins><span class="cx"> // MARK: -
</span><span class="cx"> // MARK: Any type
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -995,7 +995,7 @@
</span><span class="cx">     }
</span><span class="cx">     if ($defaultValue eq &quot;null&quot;) {
</span><span class="cx">         return &quot;jsNull()&quot; if $member-&gt;type eq &quot;any&quot;;
</span><del>-        return &quot;nullptr&quot; if $codeGenerator-&gt;IsWrapperType($member-&gt;type);
</del><ins>+        return &quot;nullptr&quot; if $codeGenerator-&gt;IsWrapperType($member-&gt;type) || $codeGenerator-&gt;IsTypedArrayType($member-&gt;type);
</ins><span class="cx">         return &quot;String()&quot; if $codeGenerator-&gt;IsStringType($member-&gt;type);
</span><span class="cx">         return &quot;Nullopt&quot;;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoredomInputEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/InputEvent.cpp (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InputEvent.cpp        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/dom/InputEvent.cpp        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -41,8 +41,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InputEvent::InputEvent(const AtomicString&amp; eventType, const InputEventInit&amp; initializer)
-    : UIEvent(eventType, initializer)
</del><ins>+InputEvent::InputEvent(const AtomicString&amp; eventType, const Init&amp; initializer, IsTrusted isTrusted)
+    : UIEvent(eventType, initializer, isTrusted)
</ins><span class="cx">     , m_inputType(emptyString())
</span><span class="cx">     , m_data(initializer.data)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoredomInputEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/InputEvent.h (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InputEvent.h        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/dom/InputEvent.h        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -32,11 +32,6 @@
</span><span class="cx"> class DOMWindow;
</span><span class="cx"> class DataTransfer;
</span><span class="cx"> 
</span><del>-struct InputEventInit : UIEventInit {
-    String data;
-    bool isComposing;
-};
-
</del><span class="cx"> class InputEvent final : public UIEvent {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;InputEvent&gt; create(const AtomicString&amp; eventType, const String&amp; inputType, bool canBubble, bool cancelable, DOMWindow* view, const String&amp; data, int detail)
</span><span class="lines">@@ -44,13 +39,17 @@
</span><span class="cx">         return adoptRef(*new InputEvent(eventType, inputType, canBubble, cancelable, view, data, detail));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static Ref&lt;InputEvent&gt; createForBindings(const AtomicString&amp; type, const InputEventInit&amp; initializer)
</del><ins>+    struct Init : UIEventInit {
+        String data;
+    };
+
+    static Ref&lt;InputEvent&gt; create(const AtomicString&amp; type, const Init&amp; initializer, IsTrusted isTrusted = IsTrusted::No)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new InputEvent(type, initializer));
</del><ins>+        return adoptRef(*new InputEvent(type, initializer, isTrusted));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     InputEvent(const AtomicString&amp; eventType, const String&amp; inputType, bool canBubble, bool cancelable, DOMWindow*, const String&amp; data, int detail);
</span><del>-    InputEvent(const AtomicString&amp; eventType, const InputEventInit&amp;);
</del><ins>+    InputEvent(const AtomicString&amp; eventType, const Init&amp;, IsTrusted);
</ins><span class="cx"> 
</span><span class="cx">     virtual ~InputEvent() { }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomInputEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/InputEvent.idl (207276 => 207277)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InputEvent.idl        2016-10-13 04:13:49 UTC (rev 207276)
+++ trunk/Source/WebCore/dom/InputEvent.idl        2016-10-13 05:18:59 UTC (rev 207277)
</span><span class="lines">@@ -24,8 +24,12 @@
</span><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    ConstructorTemplate=Event
</del><ins>+    Constructor(DOMString type, optional InputEventInit eventInitDict),
</ins><span class="cx"> ] interface InputEvent : UIEvent {
</span><span class="cx">     readonly attribute DOMString inputType;
</span><del>-    [InitializedByEventConstructor] readonly attribute DOMString? data;
</del><ins>+    readonly attribute DOMString? data;
</ins><span class="cx"> };
</span><ins>+
+dictionary InputEventInit : UIEventInit {
+    DOMString? data = null;
+};
</ins></span></pre>
</div>
</div>

</body>
</html>