<!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>[206963] 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/206963">206963</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-10-08 17:03:14 -0700 (Sat, 08 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add support for ClipboardEvent
https://bugs.webkit.org/show_bug.cgi?id=163164

Reviewed by Darin Adler.

Source/WebCore:

Add support for ClipboardEvent:
- https://www.w3.org/TR/clipboard-apis/#clipboard-event-interfaces

Firefox and Chrome both already support this.

This gives us 5 more points on html5test.com.

Tests: editing/pasteboard/clipboard-event.html
       fast/events/clipboard-event-constructor.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSEventCustom.cpp:
(WebCore::toJSNewlyCreated): Deleted.

* bindings/scripts/CodeGeneratorJS.pm:
(WillConvertUndefinedToDefaultParameterValue):
We use [] as implicit default value for dictionary parameters. This change
is so we call convertDictionary&lt;&gt;() even if the parameter is undefined
because we want to pass a struct to the implementation initialized with
the default member values defined in the IDL.

* dom/ClipboardEvent.cpp:
(WebCore::ClipboardEvent::ClipboardEvent):
(WebCore::ClipboardEvent::eventInterface):
* dom/ClipboardEvent.h:
* dom/ClipboardEvent.idl: Added.
* dom/Event.cpp:
(WebCore::Event::Event):
* dom/Event.h:
* dom/Event.idl:
* dom/EventInit.h: Added.
* dom/EventInit.idl: Added.
* dom/EventNames.in:
* dom/MouseEvent.h:
(WebCore::MouseEvent::dataTransfer):
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent):

LayoutTests:

Extended layout test coverage.

* editing/pasteboard/clipboard-event-expected.txt: Added.
* editing/pasteboard/clipboard-event.html: Added.
* fast/events/clipboard-event-constructor-expected.txt: Added.
* fast/events/clipboard-event-constructor.html: Added.
* fast/xmlhttprequest/xmlhttprequest-get-expected.txt:
* http/tests/workers/worker-importScriptsOnError-expected.txt:
* inspector/model/remote-object-get-properties-expected.txt:
* js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastxmlhttprequestxmlhttprequestgetexpectedtxt">trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-get-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsworkersworkerimportScriptsOnErrorexpectedtxt">trunk/LayoutTests/http/tests/workers/worker-importScriptsOnError-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectormodelremoteobjectgetpropertiesexpectedtxt">trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1jsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacyosemitejsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwinjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSEventCustomcpp">trunk/Source/WebCore/bindings/js/JSEventCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCoredomClipboardEventcpp">trunk/Source/WebCore/dom/ClipboardEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoredomClipboardEventh">trunk/Source/WebCore/dom/ClipboardEvent.h</a></li>
<li><a href="#trunkSourceWebCoredomEventcpp">trunk/Source/WebCore/dom/Event.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventh">trunk/Source/WebCore/dom/Event.h</a></li>
<li><a href="#trunkSourceWebCoredomEventidl">trunk/Source/WebCore/dom/Event.idl</a></li>
<li><a href="#trunkSourceWebCoredomEventNamesin">trunk/Source/WebCore/dom/EventNames.in</a></li>
<li><a href="#trunkSourceWebCoredomMouseEventh">trunk/Source/WebCore/dom/MouseEvent.h</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestseditingpasteboardclipboardeventexpectedtxt">trunk/LayoutTests/editing/pasteboard/clipboard-event-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingpasteboardclipboardeventhtml">trunk/LayoutTests/editing/pasteboard/clipboard-event.html</a></li>
<li><a href="#trunkLayoutTestsfasteventsclipboardeventconstructorexpectedtxt">trunk/LayoutTests/fast/events/clipboard-event-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsclipboardeventconstructorhtml">trunk/LayoutTests/fast/events/clipboard-event-constructor.html</a></li>
<li><a href="#trunkSourceWebCoredomClipboardEventidl">trunk/Source/WebCore/dom/ClipboardEvent.idl</a></li>
<li><a href="#trunkSourceWebCoredomEventInith">trunk/Source/WebCore/dom/EventInit.h</a></li>
<li><a href="#trunkSourceWebCoredomEventInitidl">trunk/Source/WebCore/dom/EventInit.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/ChangeLog        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-10-08  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Add support for ClipboardEvent
+        https://bugs.webkit.org/show_bug.cgi?id=163164
+
+        Reviewed by Darin Adler.
+
+        Extended layout test coverage.
+
+        * editing/pasteboard/clipboard-event-expected.txt: Added.
+        * editing/pasteboard/clipboard-event.html: Added.
+        * fast/events/clipboard-event-constructor-expected.txt: Added.
+        * fast/events/clipboard-event-constructor.html: Added.
+        * fast/xmlhttprequest/xmlhttprequest-get-expected.txt:
+        * http/tests/workers/worker-importScriptsOnError-expected.txt:
+        * inspector/model/remote-object-get-properties-expected.txt:
+        * js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+        * platform/win/js/dom/global-constructors-attributes-expected.txt:
+
</ins><span class="cx"> 2016-10-08  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Marking js/regress-141098.html as flaky on mac.
</span></span></pre></div>
<a id="trunkLayoutTestseditingpasteboardclipboardeventexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/pasteboard/clipboard-event-expected.txt (0 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/pasteboard/clipboard-event-expected.txt                                (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/clipboard-event-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+Tests the ClipboardEvent.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS firedCopyEvent is false
+PASS firedPasteEvent is false
+PASS event.type is &quot;copy&quot;
+PASS event.__proto__ is ClipboardEvent.prototype
+PASS event.isTrusted is true
+PASS event.bubbles is true
+PASS event.cancelable is true
+PASS event.clipboardData.__proto__ is DataTransfer.prototype
+PASS firedCopyEvent is true
+PASS firedPasteEvent is false
+PASS event.type is &quot;paste&quot;
+PASS event.__proto__ is ClipboardEvent.prototype
+PASS event.isTrusted is true
+PASS event.bubbles is true
+PASS event.cancelable is true
+PASS event.clipboardData.__proto__ is DataTransfer.prototype
+PASS event.clipboardData.getData('text/plain') is &quot;Content&quot;
+PASS firedCopyEvent is false
+PASS firedPasteEvent is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestseditingpasteboardclipboardeventhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/pasteboard/clipboard-event.html (0 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/pasteboard/clipboard-event.html                                (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/clipboard-event.html        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -0,0 +1,55 @@
</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;textarea id=&quot;testArea&quot;&gt;Content&lt;/textarea&gt;
+&lt;script src=&quot;../editing.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Tests the ClipboardEvent.&quot;);
+
+function testClipboardEvent(e)
+{
+    event = e;
+    shouldBe(&quot;event.__proto__&quot;, &quot;ClipboardEvent.prototype&quot;);
+    shouldBeTrue(&quot;event.isTrusted&quot;)
+    shouldBeTrue(&quot;event.bubbles&quot;);
+    shouldBeTrue(&quot;event.cancelable&quot;);
+    shouldBe(&quot;event.clipboardData.__proto__&quot;, &quot;DataTransfer.prototype&quot;);
+}
+
+var firedCopyEvent = false;
+var firedPasteEvent = false;
+
+var testArea = document.getElementById(&quot;testArea&quot;);
+testArea.addEventListener(&quot;copy&quot;, function(e) {
+    event = e;
+    firedCopyEvent = true;
+    shouldBeEqualToString(&quot;event.type&quot;, &quot;copy&quot;);
+    testClipboardEvent(event);
+});
+
+testArea.addEventListener(&quot;paste&quot;, function(e) {
+    event = e;
+    firedPasteEvent = true;
+    shouldBeEqualToString(&quot;event.type&quot;, &quot;paste&quot;);
+    testClipboardEvent(event);
+    shouldBeEqualToString(&quot;event.clipboardData.getData('text/plain')&quot;, &quot;Content&quot;);
+});
+
+testArea.focus();
+execSelectAllCommand();
+shouldBeFalse(&quot;firedCopyEvent&quot;);
+shouldBeFalse(&quot;firedPasteEvent&quot;);
+
+execCopyCommand();
+shouldBeTrue(&quot;firedCopyEvent&quot;);
+shouldBeFalse(&quot;firedPasteEvent&quot;)
+firedCopyEvent = false;
+
+execPasteCommand();
+shouldBeFalse(&quot;firedCopyEvent&quot;);
+shouldBeTrue(&quot;firedPasteEvent&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="trunkLayoutTestsfasteventsclipboardeventconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/clipboard-event-constructor-expected.txt (0 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/clipboard-event-constructor-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/clipboard-event-constructor-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+
+PASS First parameter is mandatory 
+PASS Omit init dictionary 
+PASS bubbles member 
+PASS bubbles member 
+PASS bubbles member 
+PASS bubbles member 
+PASS Passing a bad type for clipboardData member should throw 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventsclipboardeventconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/clipboard-event-constructor.html (0 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/clipboard-event-constructor.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/clipboard-event-constructor.html        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;ClipboardEvent constructor&lt;/title&gt;
+&lt;script src=../../resources/testharness.js&gt;&lt;/script&gt;
+&lt;script src=../../resources/testharnessreport.js&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+test(function() {
+    assert_throws(new TypeError(), function() {
+        new ClipboardEvent();
+    });
+}, &quot;First parameter is mandatory&quot;);
+
+test(function() {
+    var event = new ClipboardEvent(&quot;foo&quot;);
+    assert_equals(event.type, &quot;foo&quot;);
+    assert_equals(event.isTrusted, false);
+    assert_equals(event.bubbles, false);
+    assert_equals(event.cancelable, false);
+    assert_equals(event.composed, false);
+    assert_equals(event.clipboardData, null);
+}, &quot;Omit init dictionary&quot;);
+
+test(function() {
+    var event = new ClipboardEvent(&quot;foo&quot;, {bubbles: true});
+    assert_equals(event.type, &quot;foo&quot;);
+    assert_equals(event.isTrusted, false);
+    assert_equals(event.bubbles, true);
+    assert_equals(event.cancelable, false);
+    assert_equals(event.composed, false);
+    assert_equals(event.clipboardData, null);
+}, &quot;bubbles member&quot;);
+
+test(function() {
+    var event = new ClipboardEvent(&quot;foo&quot;, {cancelable: true});
+    assert_equals(event.type, &quot;foo&quot;);
+    assert_equals(event.isTrusted, false);
+    assert_equals(event.bubbles, false);
+    assert_equals(event.cancelable, true);
+    assert_equals(event.composed, false);
+    assert_equals(event.clipboardData, null);
+}, &quot;bubbles member&quot;);
+
+test(function() {
+    var event = new ClipboardEvent(&quot;foo&quot;, {composed: true});
+    assert_equals(event.type, &quot;foo&quot;);
+    assert_equals(event.isTrusted, false);
+    assert_equals(event.bubbles, false);
+    assert_equals(event.cancelable, false);
+    assert_equals(event.composed, true);
+    assert_equals(event.clipboardData, null);
+}, &quot;bubbles member&quot;);
+
+test(function() {
+    var event = new ClipboardEvent(&quot;foo&quot;, {bubbles: true, cancelable: true, composed: true});
+    assert_equals(event.type, &quot;foo&quot;);
+    assert_equals(event.isTrusted, false);
+    assert_equals(event.bubbles, true);
+    assert_equals(event.cancelable, true);
+    assert_equals(event.composed, true);
+    assert_equals(event.clipboardData, null);
+}, &quot;bubbles member&quot;);
+
+test(function() {
+    assert_throws(new TypeError(), function() {
+        new ClipboardEvent(&quot;foo&quot;, {clipboardData: document});
+    });
+}, &quot;Passing a bad type for clipboardData member should throw&quot;);
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastxmlhttprequestxmlhttprequestgetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-get-expected.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-get-expected.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-get-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -46,7 +46,6 @@
</span><span class="cx"> bubbles : 'false'
</span><span class="cx"> cancelBubble : 'false'
</span><span class="cx"> cancelable : 'false'
</span><del>-clipboardData : 'undefined'
</del><span class="cx"> composed : 'false'
</span><span class="cx"> composedPath : 'function composedPath() {
</span><span class="cx">     [native code]
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsworkersworkerimportScriptsOnErrorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/workers/worker-importScriptsOnError-expected.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/workers/worker-importScriptsOnError-expected.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/http/tests/workers/worker-importScriptsOnError-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> bubbles: false,
</span><span class="cx"> cancelBubble: false,
</span><span class="cx"> cancelable: true,
</span><del>-clipboardData: undefined,
</del><span class="cx"> colno: 14,
</span><span class="cx"> composed: false,
</span><span class="cx"> composedPath: function composedPath() { [native code] },
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjectgetpropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -243,7 +243,6 @@
</span><span class="cx">     srcElement
</span><span class="cx">     returnValue
</span><span class="cx">     cancelBubble
</span><del>-    clipboardData
</del><span class="cx">     __proto__
</span><span class="cx"> 
</span><span class="cx"> ALL PROPERTIES:
</span><span class="lines">@@ -261,7 +260,6 @@
</span><span class="cx">     srcElement
</span><span class="cx">     returnValue
</span><span class="cx">     cancelBubble
</span><del>-    clipboardData
</del><span class="cx">     composedPath
</span><span class="cx">     stopPropagation
</span><span class="cx">     preventDefault
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -228,6 +228,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').value is ClipboardEvent
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -263,6 +263,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').value is ClipboardEvent
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1jsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -263,6 +263,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').value is ClipboardEvent
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacyosemitejsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -263,6 +263,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').value is ClipboardEvent
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -168,6 +168,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').value is ClipboardEvent
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'ClipboardEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -375,6 +375,7 @@
</span><span class="cx">     dom/ChildNode.idl
</span><span class="cx">     dom/ClientRect.idl
</span><span class="cx">     dom/ClientRectList.idl
</span><ins>+    dom/ClipboardEvent.idl
</ins><span class="cx">     dom/Comment.idl
</span><span class="cx">     dom/CompositionEvent.idl
</span><span class="cx">     dom/CustomElementRegistry.idl
</span><span class="lines">@@ -397,6 +398,7 @@
</span><span class="cx">     dom/Element.idl
</span><span class="cx">     dom/ErrorEvent.idl
</span><span class="cx">     dom/Event.idl
</span><ins>+    dom/EventInit.idl
</ins><span class="cx">     dom/EventTarget.idl
</span><span class="cx">     dom/FocusEvent.idl
</span><span class="cx">     dom/GlobalEventHandlers.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/ChangeLog        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2016-10-08  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Add support for ClipboardEvent
+        https://bugs.webkit.org/show_bug.cgi?id=163164
+
+        Reviewed by Darin Adler.
+
+        Add support for ClipboardEvent:
+        - https://www.w3.org/TR/clipboard-apis/#clipboard-event-interfaces
+
+        Firefox and Chrome both already support this.
+
+        This gives us 5 more points on html5test.com.
+
+        Tests: editing/pasteboard/clipboard-event.html
+               fast/events/clipboard-event-constructor.html
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSEventCustom.cpp:
+        (WebCore::toJSNewlyCreated): Deleted.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (WillConvertUndefinedToDefaultParameterValue):
+        We use [] as implicit default value for dictionary parameters. This change
+        is so we call convertDictionary&lt;&gt;() even if the parameter is undefined
+        because we want to pass a struct to the implementation initialized with
+        the default member values defined in the IDL.
+
+        * dom/ClipboardEvent.cpp:
+        (WebCore::ClipboardEvent::ClipboardEvent):
+        (WebCore::ClipboardEvent::eventInterface):
+        * dom/ClipboardEvent.h:
+        * dom/ClipboardEvent.idl: Added.
+        * dom/Event.cpp:
+        (WebCore::Event::Event):
+        * dom/Event.h:
+        * dom/Event.idl:
+        * dom/EventInit.h: Added.
+        * dom/EventInit.idl: Added.
+        * dom/EventNames.in:
+        * dom/MouseEvent.h:
+        (WebCore::MouseEvent::dataTransfer):
+        * editing/Editor.cpp:
+        (WebCore::Editor::dispatchCPPEvent):
+
</ins><span class="cx"> 2016-10-06  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Next step on moving to modern way to return DOM exceptions
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/DerivedSources.cpp        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -136,6 +136,7 @@
</span><span class="cx"> #include &quot;JSCSSUnknownRule.cpp&quot;
</span><span class="cx"> #include &quot;JSCSSValue.cpp&quot;
</span><span class="cx"> #include &quot;JSCSSValueList.cpp&quot;
</span><ins>+#include &quot;JSClipboardEvent.cpp&quot;
</ins><span class="cx"> #if ENABLE(CUSTOM_ELEMENTS)
</span><span class="cx"> #include &quot;JSCustomElementRegistry.cpp&quot;
</span><span class="cx"> #endif
</span><span class="lines">@@ -188,6 +189,7 @@
</span><span class="cx"> #include &quot;JSElement.cpp&quot;
</span><span class="cx"> #include &quot;JSErrorEvent.cpp&quot;
</span><span class="cx"> #include &quot;JSEvent.cpp&quot;
</span><ins>+#include &quot;JSEventInit.cpp&quot;
</ins><span class="cx"> #include &quot;JSEventSource.cpp&quot;
</span><span class="cx"> #include &quot;JSEventTarget.cpp&quot;
</span><span class="cx"> #include &quot;JSFetchBody.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/DerivedSources.make        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -286,6 +286,7 @@
</span><span class="cx">     $(WebCore)/dom/ClientRect.idl \
</span><span class="cx">     $(WebCore)/dom/ClientRectList.idl \
</span><span class="cx">     $(WebCore)/dom/Comment.idl \
</span><ins>+    $(WebCore)/dom/ClipboardEvent.idl \
</ins><span class="cx">     $(WebCore)/dom/CompositionEvent.idl \
</span><span class="cx">     $(WebCore)/dom/CustomElementRegistry.idl \
</span><span class="cx">     $(WebCore)/dom/CustomEvent.idl \
</span><span class="lines">@@ -307,6 +308,7 @@
</span><span class="cx">     $(WebCore)/dom/Element.idl \
</span><span class="cx">     $(WebCore)/dom/ErrorEvent.idl \
</span><span class="cx">     $(WebCore)/dom/Event.idl \
</span><ins>+    $(WebCore)/dom/EventInit.idl \
</ins><span class="cx">     $(WebCore)/dom/EventListener.idl \
</span><span class="cx">     $(WebCore)/dom/EventTarget.idl \
</span><span class="cx">     $(WebCore)/dom/FocusEvent.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -2885,6 +2885,11 @@
</span><span class="cx">                 8367587E1C56E99B008A1087 /* JSHTMLDataElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 834B86A91C56E93E00F3F0E3 /* JSHTMLDataElement.cpp */; };
</span><span class="cx">                 8367587F1C56E99B008A1087 /* JSHTMLDataElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 834B86A81C56E93E00F3F0E3 /* JSHTMLDataElement.h */; };
</span><span class="cx">                 836C14431CDEAFD80073493F /* JSXPathNSResolverCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836C14421CDEAFCA0073493F /* JSXPathNSResolverCustom.cpp */; };
</span><ins>+                836D032A1DA89B9200FFD96B /* EventInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 836D03281DA89B7300FFD96B /* EventInit.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                836D032F1DA8A13A00FFD96B /* JSEventInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836D032B1DA8A13200FFD96B /* JSEventInit.cpp */; };
+                836D03301DA8A13D00FFD96B /* JSEventInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 836D032C1DA8A13200FFD96B /* JSEventInit.h */; };
+                836D03311DA8A13F00FFD96B /* JSClipboardEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836D032D1DA8A13200FFD96B /* JSClipboardEvent.cpp */; };
+                836D03321DA8A14200FFD96B /* JSClipboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 836D032E1DA8A13200FFD96B /* JSClipboardEvent.h */; };
</ins><span class="cx">                 836DAA061CEAB80D00A2B707 /* RenderDescendantIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 836DAA051CEAB7CD00A2B707 /* RenderDescendantIterator.h */; };
</span><span class="cx">                 836FBCEA178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */; };
</span><span class="cx">                 836FBCEC178C117F00B21A15 /* SVGAnimatedProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */; };
</span><span class="lines">@@ -10014,6 +10019,13 @@
</span><span class="cx">                 835F8B261D2D90BA00E408EC /* Slotable.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Slotable.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8369E58F1AFDD0300087DF68 /* NonDocumentTypeChildNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = NonDocumentTypeChildNode.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 836C14421CDEAFCA0073493F /* JSXPathNSResolverCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXPathNSResolverCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                836D03271DA89B7300FFD96B /* ClipboardEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ClipboardEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                836D03281DA89B7300FFD96B /* EventInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventInit.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                836D03291DA89B7300FFD96B /* EventInit.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventInit.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                836D032B1DA8A13200FFD96B /* JSEventInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEventInit.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                836D032C1DA8A13200FFD96B /* JSEventInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventInit.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                836D032D1DA8A13200FFD96B /* JSClipboardEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSClipboardEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                836D032E1DA8A13200FFD96B /* JSClipboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClipboardEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 836DAA051CEAB7CD00A2B707 /* RenderDescendantIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderDescendantIterator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTypeAnimator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedProperty.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19675,6 +19687,8 @@
</span><span class="cx">                                 BC946347107A936600857193 /* JSBeforeLoadEvent.h */,
</span><span class="cx">                                 8225432CA9D4B4CF4628EC7F /* JSBeforeUnloadEvent.cpp */,
</span><span class="cx">                                 29E04A27BED2F81F98E9022B /* JSBeforeUnloadEvent.h */,
</span><ins>+                                836D032D1DA8A13200FFD96B /* JSClipboardEvent.cpp */,
+                                836D032E1DA8A13200FFD96B /* JSClipboardEvent.h */,
</ins><span class="cx">                                 79AC9216109945C80021266E /* JSCompositionEvent.cpp */,
</span><span class="cx">                                 79AC9217109945C80021266E /* JSCompositionEvent.h */,
</span><span class="cx">                                 E4778B7D115A581A00B5D372 /* JSCustomEvent.cpp */,
</span><span class="lines">@@ -19683,6 +19697,8 @@
</span><span class="cx">                                 2ECF7ADB10162B3800427DE7 /* JSErrorEvent.h */,
</span><span class="cx">                                 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */,
</span><span class="cx">                                 14E8378D09F85D4F00B85AE4 /* JSEvent.h */,
</span><ins>+                                836D032B1DA8A13200FFD96B /* JSEventInit.cpp */,
+                                836D032C1DA8A13200FFD96B /* JSEventInit.h */,
</ins><span class="cx">                                 C6A703325C9D0B6CDCBC4D78 /* JSEventTarget.cpp */,
</span><span class="cx">                                 5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */,
</span><span class="cx">                                 B6D9D27A14EAC0860090D75E /* JSFocusEvent.cpp */,
</span><span class="lines">@@ -22981,6 +22997,7 @@
</span><span class="cx">                                 BCC0657C0F3CE1B700CD2D87 /* ClientRectList.idl */,
</span><span class="cx">                                 85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */,
</span><span class="cx">                                 85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */,
</span><ins>+                                836D03271DA89B7300FFD96B /* ClipboardEvent.idl */,
</ins><span class="cx">                                 9BD8A95918BEFC7600987E9A /* CollectionIndexCache.cpp */,
</span><span class="cx">                                 E425A49918292B840020CFCF /* CollectionIndexCache.h */,
</span><span class="cx">                                 6550B697099DF0270090D781 /* Comment.cpp */,
</span><span class="lines">@@ -23101,6 +23118,8 @@
</span><span class="cx">                                 4138D3331244054800323D33 /* EventContext.h */,
</span><span class="cx">                                 418A06CF133C04D500CD379C /* EventDispatcher.cpp */,
</span><span class="cx">                                 418A06CE133C04D500CD379C /* EventDispatcher.h */,
</span><ins>+                                836D03281DA89B7300FFD96B /* EventInit.h */,
+                                836D03291DA89B7300FFD96B /* EventInit.idl */,
</ins><span class="cx">                                 935FBC4409BA00B900E230B1 /* EventListener.h */,
</span><span class="cx">                                 85AFA7410AAF298400E84305 /* EventListener.idl */,
</span><span class="cx">                                 AD4495F1141FC08900541EDF /* EventListenerMap.cpp */,
</span><span class="lines">@@ -25276,6 +25295,7 @@
</span><span class="cx">                                 8A9A588811E84F37008ACFD1 /* JSPerformanceTiming.h in Headers */,
</span><span class="cx">                                 FDEA6247152102FC00479DF0 /* JSPeriodicWave.h in Headers */,
</span><span class="cx">                                 93B70D6C09EB0C7C009D8468 /* JSPluginElementFunctions.h in Headers */,
</span><ins>+                                836D03301DA8A13D00FFD96B /* JSEventInit.h in Headers */,
</ins><span class="cx">                                 5189F01E10B37BD900F3C739 /* JSPopStateEvent.h in Headers */,
</span><span class="cx">                                 598365DD1355F557001B185D /* JSPositionCallback.h in Headers */,
</span><span class="cx">                                 FE80DA720E9C472F000D6F75 /* JSPositionError.h in Headers */,
</span><span class="lines">@@ -26158,6 +26178,7 @@
</span><span class="cx">                                 BCE32B9C1517C0B200F542EC /* RenderMultiColumnSet.h in Headers */,
</span><span class="cx">                                 94DE5C921D83011D00164F2A /* CSSSupportsParser.h in Headers */,
</span><span class="cx">                                 BC1A7D9818FCB5B000421879 /* RenderMultiColumnSpannerPlaceholder.h in Headers */,
</span><ins>+                                836D032A1DA89B9200FFD96B /* EventInit.h in Headers */,
</ins><span class="cx">                                 8AC822FD180FC03300FB64D5 /* RenderNamedFlowFragment.h in Headers */,
</span><span class="cx">                                 BC85F23D151915E000BC17BE /* RenderNamedFlowThread.h in Headers */,
</span><span class="cx">                                 BCEA4880097D93020094C9E4 /* RenderObject.h in Headers */,
</span><span class="lines">@@ -26956,6 +26977,7 @@
</span><span class="cx">                                 9B2D8A7914997CCF00ECEF3E /* UndoStep.h in Headers */,
</span><span class="cx">                                 A863E2011343412000274926 /* UnicodeBidi.h in Headers */,
</span><span class="cx">                                 518864E11BBAF57400E540C9 /* UniqueIDBDatabase.h in Headers */,
</span><ins>+                                836D03321DA8A14200FFD96B /* JSClipboardEvent.h in Headers */,
</ins><span class="cx">                                 5198F7A51BBDB79300E2CC5F /* UniqueIDBDatabaseConnection.h in Headers */,
</span><span class="cx">                                 5198F7A91BBDD38500E2CC5F /* UniqueIDBDatabaseTransaction.h in Headers */,
</span><span class="cx">                                 E4AFCFA50DAF29A300F5F55C /* UnitBezier.h in Headers */,
</span><span class="lines">@@ -28127,6 +28149,7 @@
</span><span class="cx">                                 9BAB6C6D12550631001626D4 /* EditingStyle.cpp in Sources */,
</span><span class="cx">                                 4B3043CC0AE0373B00A82647 /* Editor.cpp in Sources */,
</span><span class="cx">                                 9B55EEE91B3E8898005342BC /* EditorCocoa.mm in Sources */,
</span><ins>+                                836D032F1DA8A13A00FFD96B /* JSEventInit.cpp in Sources */,
</ins><span class="cx">                                 93A38B4B0D0E5808006872C2 /* EditorCommand.cpp in Sources */,
</span><span class="cx">                                 FED13D3A0CEA934600D89466 /* EditorIOS.mm in Sources */,
</span><span class="cx">                                 ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */,
</span><span class="lines">@@ -30492,6 +30515,7 @@
</span><span class="cx">                                 3140379C124BEA7F00AF40E4 /* WebCoreMotionManager.mm in Sources */,
</span><span class="cx">                                 CDC979F41C498C0900DB50D4 /* WebCoreNSErrorExtras.mm in Sources */,
</span><span class="cx">                                 934D9BA50B8C116B007B42A9 /* WebCoreNSStringExtras.mm in Sources */,
</span><ins>+                                836D03311DA8A13F00FFD96B /* JSClipboardEvent.cpp in Sources */,
</ins><span class="cx">                                 C5B4C24E1509236C00A6EF37 /* WebCoreNSURLExtras.mm in Sources */,
</span><span class="cx">                                 CD225C0B1C46FBF400140761 /* WebCoreNSURLSession.mm in Sources */,
</span><span class="cx">                                 B50F5B810E96CD9900AD71A6 /* WebCoreObjCExtras.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSEventCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSEventCustom.cpp (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSEventCustom.cpp        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/bindings/js/JSEventCustom.cpp        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -43,11 +43,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue JSEvent::clipboardData(ExecState&amp; state) const
-{
-    return wrapped().isClipboardEvent() ? toJS(&amp;state, globalObject(), wrapped().clipboardData()) : jsUndefined();
-}
-
</del><span class="cx"> #define TRY_TO_WRAP_WITH_INTERFACE(interfaceName) \
</span><span class="cx">     case interfaceName##InterfaceType: \
</span><span class="cx">         return createWrapper&lt;interfaceName&gt;(globalObject, WTFMove(event));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -3991,6 +3991,7 @@
</span><span class="cx">     return 1 if defined $automaticallyGeneratedDefaultValue &amp;&amp; $automaticallyGeneratedDefaultValue eq $defaultValue;
</span><span class="cx"> 
</span><span class="cx">     return 1 if $defaultValue eq &quot;null&quot; &amp;&amp; $codeGenerator-&gt;IsWrapperType($parameterType);
</span><ins>+    return 1 if $defaultValue eq &quot;[]&quot; &amp;&amp; $codeGenerator-&gt;IsDictionaryType($parameterType);
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomClipboardEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ClipboardEvent.cpp (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ClipboardEvent.cpp        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/dom/ClipboardEvent.cpp        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -28,8 +28,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ClipboardEvent::ClipboardEvent(const AtomicString&amp; eventType, bool canBubble, bool cancelable, DataTransfer* dataTransfer)
-    : Event(eventType, canBubble, cancelable), m_dataTransfer(dataTransfer)
</del><ins>+ClipboardEvent::ClipboardEvent(const AtomicString&amp; type, const Init&amp; init, IsTrusted isTrusted)
+    : Event(type, init, isTrusted)
+    , m_clipboardData(init.clipboardData)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -39,8 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> EventInterface ClipboardEvent::eventInterface() const
</span><span class="cx"> {
</span><del>-    // Notice that there is no ClipboardEvent.idl.
-    return EventInterfaceType;
</del><ins>+    return ClipboardEventInterfaceType;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ClipboardEvent::isClipboardEvent() const
</span></span></pre></div>
<a id="trunkSourceWebCoredomClipboardEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ClipboardEvent.h (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ClipboardEvent.h        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/dom/ClipboardEvent.h        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -28,28 +28,39 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-    class DataTransfer;
</del><ins>+class DataTransfer;
</ins><span class="cx"> 
</span><del>-    class ClipboardEvent final : public Event {
-    public:
-        virtual ~ClipboardEvent();
</del><ins>+class ClipboardEvent final : public Event {
+public:
+    virtual ~ClipboardEvent();
</ins><span class="cx"> 
</span><del>-        static Ref&lt;ClipboardEvent&gt; create(const AtomicString&amp; type, bool canBubbleArg, bool cancelableArg, DataTransfer* clipboardArg)
</del><ins>+    struct Init : public EventInit {
+        Init(bool bubbles, bool cancelable, bool composed, RefPtr&lt;DataTransfer&gt;&amp;&amp; clipboardData)
+            : EventInit(bubbles, cancelable, composed)
+            , clipboardData(WTFMove(clipboardData))
</ins><span class="cx">         {
</span><del>-            return adoptRef(*new ClipboardEvent(type, canBubbleArg, cancelableArg, clipboardArg));
</del><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DataTransfer* internalDataTransfer() const override { return m_dataTransfer.get(); }
</del><ins>+        RefPtr&lt;DataTransfer&gt; clipboardData;
+    };
</ins><span class="cx"> 
</span><del>-    private:
-        ClipboardEvent(const AtomicString&amp; type, bool canBubbleArg, bool cancelableArg, DataTransfer*);
</del><ins>+    static Ref&lt;ClipboardEvent&gt; create(const AtomicString&amp; type, const Init&amp; init, IsTrusted isTrusted = IsTrusted::No)
+    {
+        auto event = adoptRef(*new ClipboardEvent(type, init, isTrusted));
+        return event;
+    }
</ins><span class="cx"> 
</span><del>-        EventInterface eventInterface() const override;
-        bool isClipboardEvent() const override;
</del><ins>+    DataTransfer* clipboardData() const { return m_clipboardData.get(); }
</ins><span class="cx"> 
</span><del>-        RefPtr&lt;DataTransfer&gt; m_dataTransfer;
-    };
</del><ins>+private:
+    ClipboardEvent(const AtomicString&amp; type, const Init&amp;, IsTrusted);
</ins><span class="cx"> 
</span><ins>+    EventInterface eventInterface() const final;
+    bool isClipboardEvent() const final;
+
+    RefPtr&lt;DataTransfer&gt; m_clipboardData;
+};
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ClipboardEvent_h
</span></span></pre></div>
<a id="trunkSourceWebCoredomClipboardEventidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/ClipboardEvent.idl (0 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ClipboardEvent.idl                                (rev 0)
+++ trunk/Source/WebCore/dom/ClipboardEvent.idl        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+[
+    Constructor(DOMString type, optional ClipboardEventInit eventInitDict)
+] interface ClipboardEvent : Event {
+    readonly attribute DataTransfer? clipboardData;
+};
+
+dictionary ClipboardEventInit : EventInit {
+    DataTransfer? clipboardData = null;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoredomEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Event.cpp (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Event.cpp        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/dom/Event.cpp        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -56,12 +56,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Event::Event(const AtomicString&amp; eventType, const EventInit&amp; initializer)
</del><ins>+Event::Event(const AtomicString&amp; eventType, const EventInit&amp; initializer, IsTrusted isTrusted)
</ins><span class="cx">     : m_type(eventType)
</span><span class="cx">     , m_isInitialized(true)
</span><span class="cx">     , m_canBubble(initializer.bubbles)
</span><span class="cx">     , m_cancelable(initializer.cancelable)
</span><span class="cx">     , m_composed(initializer.composed)
</span><ins>+    , m_isTrusted(isTrusted == IsTrusted::Yes)
</ins><span class="cx">     , m_createTime(convertSecondsToDOMTimeStamp(currentTime()))
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Event.h (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Event.h        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/dom/Event.h        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> #define Event_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DOMTimeStamp.h&quot;
</span><ins>+#include &quot;EventInit.h&quot;
</ins><span class="cx"> #include &quot;EventInterfaces.h&quot;
</span><span class="cx"> #include &quot;ScriptWrappable.h&quot;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="lines">@@ -38,12 +39,6 @@
</span><span class="cx"> class EventTarget;
</span><span class="cx"> class HTMLIFrameElement;
</span><span class="cx"> 
</span><del>-struct EventInit {
-    bool bubbles { false };
-    bool cancelable { false };
-    bool composed { false };
-};
-
</del><span class="cx"> enum EventInterface {
</span><span class="cx"> 
</span><span class="cx"> #define DOM_EVENT_INTERFACE_DECLARE(name) name##InterfaceType,
</span><span class="lines">@@ -54,6 +49,8 @@
</span><span class="cx"> 
</span><span class="cx"> class Event : public ScriptWrappable, public RefCounted&lt;Event&gt; {
</span><span class="cx"> public:
</span><ins>+    enum class IsTrusted { No, Yes };
+
</ins><span class="cx">     enum PhaseType { 
</span><span class="cx">         NONE                = 0,
</span><span class="cx">         CAPTURING_PHASE     = 1, 
</span><span class="lines">@@ -134,8 +131,6 @@
</span><span class="cx">     bool legacyReturnValue() const { return !defaultPrevented(); }
</span><span class="cx">     void setLegacyReturnValue(bool returnValue) { setDefaultPrevented(!returnValue); }
</span><span class="cx"> 
</span><del>-    DataTransfer* clipboardData() const { return isClipboardEvent() ? internalDataTransfer() : nullptr; }
-
</del><span class="cx">     virtual EventInterface eventInterface() const;
</span><span class="cx"> 
</span><span class="cx">     // These events are general classes of events.
</span><span class="lines">@@ -188,8 +183,6 @@
</span><span class="cx">     Event* underlyingEvent() const { return m_underlyingEvent.get(); }
</span><span class="cx">     void setUnderlyingEvent(Event*);
</span><span class="cx"> 
</span><del>-    virtual DataTransfer* internalDataTransfer() const { return 0; }
-
</del><span class="cx">     bool isBeingDispatched() const { return eventPhase(); }
</span><span class="cx"> 
</span><span class="cx">     virtual Ref&lt;Event&gt; cloneFor(HTMLIFrameElement*) const;
</span><span class="lines">@@ -200,7 +193,7 @@
</span><span class="cx">     Event();
</span><span class="cx">     WEBCORE_EXPORT Event(const AtomicString&amp; type, bool canBubble, bool cancelable);
</span><span class="cx">     Event(const AtomicString&amp; type, bool canBubble, bool cancelable, double timestamp);
</span><del>-    Event(const AtomicString&amp; type, const EventInit&amp;);
</del><ins>+    Event(const AtomicString&amp; type, const EventInit&amp;, IsTrusted = IsTrusted::No);
</ins><span class="cx"> 
</span><span class="cx">     virtual void receivedTarget();
</span><span class="cx">     bool dispatched() const { return m_target; }
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Event.idl (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Event.idl        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/dom/Event.idl        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -71,6 +71,4 @@
</span><span class="cx">     readonly attribute EventTarget srcElement;
</span><span class="cx">     [ImplementedAs=legacyReturnValue] attribute boolean returnValue;
</span><span class="cx">     attribute boolean cancelBubble;
</span><del>-
-    [Custom] readonly attribute DataTransfer clipboardData;
</del><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventInith"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/EventInit.h (0 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventInit.h                                (rev 0)
+++ trunk/Source/WebCore/dom/EventInit.h        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+struct EventInit {
+    EventInit() = default;
+    EventInit(bool bubbles, bool cancelable, bool composed)
+        : bubbles(bubbles)
+        , cancelable(cancelable)
+        , composed(composed)
+    { }
+
+    bool bubbles { false };
+    bool cancelable { false };
+    bool composed { false };
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoredomEventInitidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/EventInit.idl (0 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventInit.idl                                (rev 0)
+++ trunk/Source/WebCore/dom/EventInit.idl        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+dictionary EventInit {
+    boolean bubbles = false;
+    boolean cancelable = false;
+    boolean composed = false;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoredomEventNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventNames.in (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventNames.in        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/dom/EventNames.in        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -6,6 +6,7 @@
</span><span class="cx"> AnimationEvent
</span><span class="cx"> BeforeLoadEvent
</span><span class="cx"> BeforeUnloadEvent
</span><ins>+ClipboardEvent
</ins><span class="cx"> CloseEvent
</span><span class="cx"> CompositionEvent
</span><span class="cx"> CustomEvent
</span></span></pre></div>
<a id="trunkSourceWebCoredomMouseEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MouseEvent.h (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MouseEvent.h        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/dom/MouseEvent.h        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -89,9 +89,7 @@
</span><span class="cx">     WEBCORE_EXPORT Node* toElement() const;
</span><span class="cx">     WEBCORE_EXPORT Node* fromElement() const;
</span><span class="cx"> 
</span><del>-    // FIXME: These functions can be merged if m_dataTransfer is only initialized for drag events.
</del><span class="cx">     DataTransfer* dataTransfer() const { return isDragEvent() ? m_dataTransfer.get() : nullptr; }
</span><del>-    DataTransfer* internalDataTransfer() const override { return m_dataTransfer.get(); }
</del><span class="cx"> 
</span><span class="cx">     EventInterface eventInterface() const override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (206962 => 206963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2016-10-08 23:17:05 UTC (rev 206962)
+++ trunk/Source/WebCore/editing/Editor.cpp        2016-10-09 00:03:14 UTC (rev 206963)
</span><span class="lines">@@ -883,7 +883,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;DataTransfer&gt; dataTransfer = DataTransfer::createForCopyAndPaste(policy);
</span><span class="cx"> 
</span><del>-    Ref&lt;Event&gt; event = ClipboardEvent::create(eventType, true, true, dataTransfer.get());
</del><ins>+    auto event = ClipboardEvent::create(eventType, { true, true, false, dataTransfer.get() }, Event::IsTrusted::Yes);
</ins><span class="cx">     target-&gt;dispatchEvent(event);
</span><span class="cx">     bool noDefaultProcessing = event-&gt;defaultPrevented();
</span><span class="cx">     if (noDefaultProcessing &amp;&amp; policy == DataTransferAccessPolicy::Writable) {
</span></span></pre>
</div>
</div>

</body>
</html>