<!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>[206843] 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/206843">206843</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2016-10-05 21:05:35 -0700 (Wed, 05 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Introduce InputEvent bindings in preparation for the input events spec
https://bugs.webkit.org/show_bug.cgi?id=162954

Reviewed by Ryosuke Niwa.

Source/WebCore:

Creates new bindings for InputEvent. Also introduces a runtime switch that allows Node to dispatch InputEvents
rather than generic events of type 'input'. Adds a new test verifying that when the switch is enabled, inputs
and contenteditable divs fire these new InputEvents on input. So far, only inputType is a part of the object
prototype, since we will be implementing this first. getTargetRanges() will follow once the finer details of
StaticRange are hashed out. See https://bugs.webkit.org/show_bug.cgi?id=162947 for more details.

Tests: fast/events/input-events-fired-when-typing.html
       fast/events/ios/input-events-fired-when-typing-in-contenteditable.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/Event.cpp:
(WebCore::Event::composed):
(WebCore::Event::isInputEvent):
* dom/Event.h:
* dom/EventNames.in:
* dom/InputEvent.cpp: Added.
(WebCore::InputEvent::InputEvent):
* dom/InputEvent.h: Added.
* dom/InputEvent.idl: Added.
* dom/Node.cpp:
(WebCore::Node::dispatchInputEvent):
(WebCore::Node::defaultEventHandler):
* dom/Node.h:
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setEditingValue):
(WebCore::HTMLInputElement::setValueFromRenderer):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::dispatchChangeEventForMenuList):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::defaultEventHandler):
* page/Settings.in:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit2:

Adds a new runtime switch for enabling InputEvents.

* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests:

Adds a new test verifying that InputEvents are fired when the runtime switch for input events is enabled.

* fast/events/input-events-fired-when-typing-expected.txt: Added.
* fast/events/input-events-fired-when-typing.html: Added.
* fast/events/ios/input-events-fired-when-typing-in-contenteditable-expected.txt: Added.
* fast/events/ios/input-events-fired-when-typing-in-contenteditable.html: Added.
* js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/ios-simulator/TestExpectations:
* 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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</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="#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="#trunkSourceWebCoredomDOMAllInOnecpp">trunk/Source/WebCore/dom/DOMAllInOne.cpp</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="#trunkSourceWebCoredomEventNamesin">trunk/Source/WebCore/dom/EventNames.in</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementcpp">trunk/Source/WebCore/html/HTMLFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementcpp">trunk/Source/WebCore/html/HTMLSelectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowMediaControlElementscpp">trunk/Source/WebCore/html/shadow/MediaControlElements.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingsin">trunk/Source/WebCore/page/Settings.in</a></li>
<li><a href="#trunkSourceWebCoretestingInternalSettingscpp">trunk/Source/WebCore/testing/InternalSettings.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalSettingsh">trunk/Source/WebCore/testing/InternalSettings.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalSettingsidl">trunk/Source/WebCore/testing/InternalSettings.idl</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesDefinitionsh">trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasteventsinputeventsfiredwhentypingexpectedtxt">trunk/LayoutTests/fast/events/input-events-fired-when-typing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsinputeventsfiredwhentypinghtml">trunk/LayoutTests/fast/events/input-events-fired-when-typing.html</a></li>
<li><a href="#trunkLayoutTestsfasteventsiosinputeventsfiredwhentypingincontenteditableexpectedtxt">trunk/LayoutTests/fast/events/ios/input-events-fired-when-typing-in-contenteditable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsiosinputeventsfiredwhentypingincontenteditablehtml">trunk/LayoutTests/fast/events/ios/input-events-fired-when-typing-in-contenteditable.html</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>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/LayoutTests/ChangeLog        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-10-05  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Introduce InputEvent bindings in preparation for the input events spec
+        https://bugs.webkit.org/show_bug.cgi?id=162954
+
+        Reviewed by Ryosuke Niwa.
+
+        Adds a new test verifying that InputEvents are fired when the runtime switch for input events is enabled.
+
+        * fast/events/input-events-fired-when-typing-expected.txt: Added.
+        * fast/events/input-events-fired-when-typing.html: Added.
+        * fast/events/ios/input-events-fired-when-typing-in-contenteditable-expected.txt: Added.
+        * fast/events/ios/input-events-fired-when-typing-in-contenteditable.html: Added.
+        * js/dom/global-constructors-attributes-expected.txt:
+        * platform/gtk/js/dom/global-constructors-attributes-expected.txt:
+        * platform/ios-simulator/TestExpectations:
+        * 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:
+
</ins><span class="cx"> 2016-10-05  Gyuyoung Kim  &lt;gyuyoung.kim@navercorp.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Mark timeout tests to *Timeout*
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsinputeventsfiredwhentypingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/input-events-fired-when-typing-expected.txt (0 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/input-events-fired-when-typing-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/input-events-fired-when-typing-expected.txt        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS event.__lookupGetter__('inputType') is defined.
+PASS Object.getPrototypeOf(event) is InputEvent.prototype
+PASS event.target.id is expectedTargetID
+PASS event.bubbles is true
+PASS event.cancelable is false
+PASS event.composed is true
+PASS event.__lookupGetter__('inputType') is defined.
+PASS Object.getPrototypeOf(event) is InputEvent.prototype
+PASS event.target.id is expectedTargetID
+PASS event.bubbles is true
+PASS event.cancelable is false
+PASS event.composed is true
+a
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventsinputeventsfiredwhentypinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/input-events-fired-when-typing.html (0 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/input-events-fired-when-typing.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/input-events-fired-when-typing.html        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+
+&lt;head&gt;
+    &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        var expectedTargetID = &quot;foo&quot;;
+
+        function contentEditable()
+        {
+            return document.querySelector(&quot;#foo&quot;);
+        }
+
+        function plainText()
+        {
+            return document.querySelector(&quot;#bar&quot;);
+        }
+
+        function beginTest()
+        {
+            if (!window.eventSender || !window.internals || !window.testRunner)
+                return;
+
+            internals.settings.setInputEventsEnabled(true);
+            testRunner.dumpAsText();
+            contentEditable().focus();
+            eventSender.keyDown(&quot;a&quot;, []);
+
+            expectedTargetID = &quot;bar&quot;;
+            plainText().focus();
+            eventSender.keyDown(&quot;b&quot;, []);
+        }
+
+        function checkInputEvent(event)
+        {
+            shouldBeDefined(&quot;event.__lookupGetter__('inputType')&quot;);
+            shouldBe(&quot;Object.getPrototypeOf(event)&quot;, &quot;InputEvent.prototype&quot;);
+            shouldBe(&quot;event.target.id&quot;, &quot;expectedTargetID&quot;);
+            shouldBe(&quot;event.bubbles&quot;, &quot;true&quot;);
+            shouldBe(&quot;event.cancelable&quot;, &quot;false&quot;);
+            shouldBe(&quot;event.composed&quot;, &quot;true&quot;);
+        }
+    &lt;/script&gt;
+&lt;/head&gt;
+
+&lt;body onload=beginTest()&gt;
+    &lt;div id=&quot;foo&quot; contenteditable oninput=checkInputEvent(event)&gt;&lt;/div&gt;
+    &lt;input id=&quot;bar&quot; oninput=checkInputEvent(event)&gt;&lt;/input&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="trunkLayoutTestsfasteventsiosinputeventsfiredwhentypingincontenteditableexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/ios/input-events-fired-when-typing-in-contenteditable-expected.txt (0 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/ios/input-events-fired-when-typing-in-contenteditable-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/ios/input-events-fired-when-typing-in-contenteditable-expected.txt        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE 
+Does the event have an inputType method? YES
+Does the event have InputEvent's prototype? YES
+What is the event's id? editable
+Does the event bubble? YES
+Is the event cancelable? NO
+Is the event composed? YES
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventsiosinputeventsfiredwhentypingincontenteditablehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/ios/input-events-fired-when-typing-in-contenteditable.html (0 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/ios/input-events-fired-when-typing-in-contenteditable.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/ios/input-events-fired-when-typing-in-contenteditable.html        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+&lt;!DOCTYPE html&gt; &lt;!-- webkit-test-runner [ useFlexibleViewport=true ] --&gt;
+
+&lt;html&gt;
+
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+    &lt;meta name=&quot;viewport&quot; content=&quot;initial-scale=1.0, user-scalable=no&quot;&gt;
+    &lt;script id=&quot;ui-script&quot; type=&quot;text/plain&quot;&gt;
+        (function() {
+            uiController.didShowKeyboardCallback = function() {
+                uiController.typeCharacterUsingHardwareKeyboard(&quot; &quot;, function() {
+                    uiController.uiScriptComplete();
+                });
+            }
+            uiController.singleTapAtPoint(100, 100, function() {});
+        })();
+    &lt;/script&gt;
+
+    &lt;script&gt;
+        var progress = 0;
+
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+            internals.settings.setInputEventsEnabled(true);
+        }
+
+        function incrementProgress()
+        {
+            progress++;
+            if (progress == 2)
+                testRunner.notifyDone();
+        }
+
+        function getUIScript()
+        {
+            return document.getElementById(&quot;ui-script&quot;).text;
+        }
+
+        function runTest()
+        {
+            if (!window.testRunner || !testRunner.runUIScript)
+                return;
+
+            testRunner.runUIScript(getUIScript(), function(result) {
+                incrementProgress();
+            });
+        }
+
+        function yesno(b) { return b ? &quot;YES&quot; : &quot;NO&quot;; }
+
+        function handleInput(event)
+        {
+            debug(&quot;Does the event have an inputType method? &quot; + yesno(event.__lookupGetter__(&quot;inputType&quot;)));
+            debug(&quot;Does the event have InputEvent's prototype? &quot; + yesno(Object.getPrototypeOf(event) === InputEvent.prototype));
+            debug(&quot;What is the event's id? &quot; + event.target.id);
+            debug(&quot;Does the event bubble? &quot; + yesno(event.bubbles));
+            debug(&quot;Is the event cancelable? &quot; + yesno(event.cancelable));
+            debug(&quot;Is the event composed? &quot; + yesno(event.composed));
+            incrementProgress();
+        }
+    &lt;/script&gt;
+    &lt;style&gt;
+    #editable {
+        width: 100vw;
+        height: 100vh;
+    }
+    &lt;/style&gt;
+&lt;/head&gt;
+
+&lt;body style=&quot;margin: 0;&quot; onload=runTest()&gt;
+    &lt;div contenteditable id=&quot;editable&quot; oninput=handleInput(event)&gt;
+    &lt;div id=&quot;console&quot;&gt;&lt;/div&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="trunkLayoutTestsjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -798,6 +798,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').value is InputEvent
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'KeyboardEvent').value is KeyboardEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'KeyboardEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'KeyboardEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -893,6 +893,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').value is InputEvent
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').value is Int16Array
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -1197,6 +1197,7 @@
</span><span class="cx"> fast/events/frame-tab-focus.html [ Failure ]
</span><span class="cx"> fast/events/ime-composition-events-001.html [ Failure ]
</span><span class="cx"> fast/events/inputText-never-fired-on-keydown-cancel.html [ Failure ]
</span><ins>+fast/events/input-events-fired-when-typing.html [ Failure ]
</ins><span class="cx"> fast/events/key-events-in-input-button.html [ Failure ]
</span><span class="cx"> fast/events/keydown-1.html [ Failure ]
</span><span class="cx"> fast/events/keydown-leftright-keys.html [ Failure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -913,6 +913,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').value is InputEvent
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').value is Int16Array
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').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 (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -898,6 +898,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').value is InputEvent
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').value is Int16Array
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').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 (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -913,6 +913,11 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ImageData').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').value is InputEvent
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'InputEvent').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').value is Int16Array
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Int16Array').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -400,6 +400,7 @@
</span><span class="cx">     dom/FocusEvent.idl
</span><span class="cx">     dom/GlobalEventHandlers.idl
</span><span class="cx">     dom/HashChangeEvent.idl
</span><ins>+    dom/InputEvent.idl
</ins><span class="cx">     dom/KeyboardEvent.idl
</span><span class="cx">     dom/MessageChannel.idl
</span><span class="cx">     dom/MessageEvent.idl
</span><span class="lines">@@ -1445,6 +1446,7 @@
</span><span class="cx">     dom/IdTargetObserver.cpp
</span><span class="cx">     dom/IdTargetObserverRegistry.cpp
</span><span class="cx">     dom/InlineStyleSheetOwner.cpp
</span><ins>+    dom/InputEvent.cpp
</ins><span class="cx">     dom/KeyboardEvent.cpp
</span><span class="cx">     dom/LiveNodeList.cpp
</span><span class="cx">     dom/LoadableClassicScript.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/ChangeLog        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2016-10-05  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Introduce InputEvent bindings in preparation for the input events spec
+        https://bugs.webkit.org/show_bug.cgi?id=162954
+
+        Reviewed by Ryosuke Niwa.
+
+        Creates new bindings for InputEvent. Also introduces a runtime switch that allows Node to dispatch InputEvents
+        rather than generic events of type 'input'. Adds a new test verifying that when the switch is enabled, inputs
+        and contenteditable divs fire these new InputEvents on input. So far, only inputType is a part of the object
+        prototype, since we will be implementing this first. getTargetRanges() will follow once the finer details of
+        StaticRange are hashed out. See https://bugs.webkit.org/show_bug.cgi?id=162947 for more details.
+
+        Tests: fast/events/input-events-fired-when-typing.html
+               fast/events/ios/input-events-fired-when-typing-in-contenteditable.html
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/DOMAllInOne.cpp:
+        * dom/Event.cpp:
+        (WebCore::Event::composed):
+        (WebCore::Event::isInputEvent):
+        * dom/Event.h:
+        * dom/EventNames.in:
+        * dom/InputEvent.cpp: Added.
+        (WebCore::InputEvent::InputEvent):
+        * dom/InputEvent.h: Added.
+        * dom/InputEvent.idl: Added.
+        * dom/Node.cpp:
+        (WebCore::Node::dispatchInputEvent):
+        (WebCore::Node::defaultEventHandler):
+        * dom/Node.h:
+        * editing/Editor.cpp:
+        (WebCore::Editor::setBaseWritingDirection):
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::setEditingValue):
+        (WebCore::HTMLInputElement::setValueFromRenderer):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::listBoxOnChange):
+        (WebCore::HTMLSelectElement::dispatchChangeEventForMenuList):
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlTimelineElement::defaultEventHandler):
+        * page/Settings.in:
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+
</ins><span class="cx"> 2016-10-05  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         URLParser should parse IPv4 addresses as the last two pieces of an IPv6 address
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/DerivedSources.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -309,6 +309,7 @@
</span><span class="cx"> #include &quot;JSIDBVersionChangeEvent.cpp&quot;
</span><span class="cx"> #endif
</span><span class="cx"> #include &quot;JSImageData.cpp&quot;
</span><ins>+#include &quot;JSInputEvent.cpp&quot;
</ins><span class="cx"> #include &quot;JSInspectorFrontendHost.cpp&quot;
</span><span class="cx"> #include &quot;JSKeyboardEvent.cpp&quot;
</span><span class="cx"> #include &quot;JSLocation.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/DerivedSources.make        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -311,6 +311,7 @@
</span><span class="cx">     $(WebCore)/dom/FocusEvent.idl \
</span><span class="cx">     $(WebCore)/dom/GlobalEventHandlers.idl \
</span><span class="cx">     $(WebCore)/dom/HashChangeEvent.idl \
</span><ins>+    $(WebCore)/dom/InputEvent.idl \
</ins><span class="cx">     $(WebCore)/dom/KeyboardEvent.idl \
</span><span class="cx">     $(WebCore)/dom/MessageChannel.idl \
</span><span class="cx">     $(WebCore)/dom/MessageEvent.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -1267,6 +1267,8 @@
</span><span class="cx">                 2EA768040FE7126400AB9C8A /* WorkerScriptLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EA768030FE7126400AB9C8A /* WorkerScriptLoaderClient.h */; };
</span><span class="cx">                 2EB4BCD2121F03E300EC4885 /* BlobResourceHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EB4BCD0121F03E300EC4885 /* BlobResourceHandle.cpp */; };
</span><span class="cx">                 2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */; };
</span><ins>+                2EB767561DA19B99003E23B5 /* InputEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EB767551DA19B99003E23B5 /* InputEvent.cpp */; };
+                2EB767571DA19BDF003E23B5 /* InputEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EB767541DA19B67003E23B5 /* InputEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 2EBBC3D81B65988300F5253D /* WheelEventDeltaFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EBBC3D71B65988300F5253D /* WheelEventDeltaFilter.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2EC41DE41C0410A300D294FE /* RealtimeMediaSourceSupportedConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EC41DE21C0410A300D294FE /* RealtimeMediaSourceSupportedConstraints.cpp */; };
</span><span class="cx">                 2ECF7ADC10162B3800427DE7 /* JSErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2ECF7ADA10162B3800427DE7 /* JSErrorEvent.cpp */; };
</span><span class="lines">@@ -4067,7 +4069,9 @@
</span><span class="cx">                 A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629CB09DA2B47009633A5 /* JSMouseEvent.h */; };
</span><span class="cx">                 A86629D209DA2B48009633A5 /* JSMouseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A86629CC09DA2B47009633A5 /* JSMouseEvent.cpp */; };
</span><span class="cx">                 A86629D309DA2B48009633A5 /* JSKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629CD09DA2B47009633A5 /* JSKeyboardEvent.h */; };
</span><ins>+                A86629D309DA2B48009633A6 /* JSInputEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629CD09DA2B47009633A6 /* JSInputEvent.h */; };
</ins><span class="cx">                 A86629D409DA2B48009633A5 /* JSKeyboardEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A86629CE09DA2B47009633A5 /* JSKeyboardEvent.cpp */; };
</span><ins>+                A86629D409DA2B48009633A6 /* JSInputEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A86629CE09DA2B47009633A6 /* JSInputEvent.cpp */; };
</ins><span class="cx">                 A871D4560A127CBC00B12A68 /* HTMLPlugInElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A871D44C0A127CBC00B12A68 /* HTMLPlugInElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A871D4570A127CBC00B12A68 /* HTMLPlugInElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A871D44D0A127CBC00B12A68 /* HTMLPlugInElement.cpp */; };
</span><span class="cx">                 A871D4580A127CBC00B12A68 /* HTMLParamElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A871D44E0A127CBC00B12A68 /* HTMLParamElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8200,6 +8204,9 @@
</span><span class="cx">                 2EA768030FE7126400AB9C8A /* WorkerScriptLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerScriptLoaderClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2EB4BCD0121F03E300EC4885 /* BlobResourceHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobResourceHandle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobResourceHandle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2EB767531DA19313003E23B5 /* InputEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = InputEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2EB767541DA19B67003E23B5 /* InputEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputEvent.h; path = dom/InputEvent.h; sourceTree = SOURCE_ROOT; };
+                2EB767551DA19B99003E23B5 /* InputEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InputEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2EBBC3D71B65988300F5253D /* WheelEventDeltaFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WheelEventDeltaFilter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2EC41DE21C0410A300D294FE /* RealtimeMediaSourceSupportedConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RealtimeMediaSourceSupportedConstraints.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2ECF7ADA10162B3800427DE7 /* JSErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -11354,7 +11361,9 @@
</span><span class="cx">                 A86629CB09DA2B47009633A5 /* JSMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSMouseEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A86629CC09DA2B47009633A5 /* JSMouseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSMouseEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A86629CD09DA2B47009633A5 /* JSKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSKeyboardEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A86629CD09DA2B47009633A6 /* JSInputEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSInputEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A86629CE09DA2B47009633A5 /* JSKeyboardEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSKeyboardEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A86629CE09DA2B47009633A6 /* JSInputEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSInputEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A871D44C0A127CBC00B12A68 /* HTMLPlugInElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLPlugInElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A871D44D0A127CBC00B12A68 /* HTMLPlugInElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPlugInElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A871D44E0A127CBC00B12A68 /* HTMLParamElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLParamElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19664,6 +19673,8 @@
</span><span class="cx">                                 0FDA7C1D188322FC00C954B5 /* JSGestureEvent.h */,
</span><span class="cx">                                 8482B74F1198CB6B00BFB005 /* JSHashChangeEvent.cpp */,
</span><span class="cx">                                 8482B7501198CB6B00BFB005 /* JSHashChangeEvent.h */,
</span><ins>+                                A86629CE09DA2B47009633A6 /* JSInputEvent.cpp */,
+                                A86629CD09DA2B47009633A6 /* JSInputEvent.h */,
</ins><span class="cx">                                 A86629CE09DA2B47009633A5 /* JSKeyboardEvent.cpp */,
</span><span class="cx">                                 A86629CD09DA2B47009633A5 /* JSKeyboardEvent.h */,
</span><span class="cx">                                 E107400B0E77BDC00033AF24 /* JSMessageChannel.cpp */,
</span><span class="lines">@@ -23110,6 +23121,9 @@
</span><span class="cx">                                 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */,
</span><span class="cx">                                 AA4C3A740B2B1679002334A2 /* InlineStyleSheetOwner.cpp */,
</span><span class="cx">                                 AA4C3A750B2B1679002334A2 /* InlineStyleSheetOwner.h */,
</span><ins>+                                2EB767551DA19B99003E23B5 /* InputEvent.cpp */,
+                                2EB767541DA19B67003E23B5 /* InputEvent.h */,
+                                2EB767531DA19313003E23B5 /* InputEvent.idl */,
</ins><span class="cx">                                 85031B2D0A44EFC700F992E0 /* KeyboardEvent.cpp */,
</span><span class="cx">                                 85031B2E0A44EFC700F992E0 /* KeyboardEvent.h */,
</span><span class="cx">                                 14CF7C2009F7110600EB3665 /* KeyboardEvent.idl */,
</span><span class="lines">@@ -25168,6 +25182,7 @@
</span><span class="cx">                                 BC6C49F40D7DBA0500FFA558 /* JSImageConstructor.h in Headers */,
</span><span class="cx">                                 A77979290D6B9E64003851B9 /* JSImageData.h in Headers */,
</span><span class="cx">                                 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */,
</span><ins>+                                A86629D309DA2B48009633A6 /* JSInputEvent.h in Headers */,
</ins><span class="cx">                                 A86629D309DA2B48009633A5 /* JSKeyboardEvent.h in Headers */,
</span><span class="cx">                                 12A253E11C8FFF6600C22295 /* JSKeyframeEffect.h in Headers */,
</span><span class="cx">                                 935F45430F7C3B5F00D7C1FB /* JSLazyEventListener.h in Headers */,
</span><span class="lines">@@ -25793,6 +25808,7 @@
</span><span class="cx">                                 854FE7310A2297BE0058D7AD /* NodeFilter.h in Headers */,
</span><span class="cx">                                 854FE7330A2297BE0058D7AD /* NodeFilterCondition.h in Headers */,
</span><span class="cx">                                 854FE7350A2297BE0058D7AD /* NodeIterator.h in Headers */,
</span><ins>+                                2EB767571DA19BDF003E23B5 /* InputEvent.h in Headers */,
</ins><span class="cx">                                 A818721B0977D3C0005826D9 /* NodeList.h in Headers */,
</span><span class="cx">                                 63189AE30E83A33300012E41 /* NodeRareData.h in Headers */,
</span><span class="cx">                                 63D7B32D0E78CD3F00F7617C /* NodeRenderStyle.h in Headers */,
</span><span class="lines">@@ -27968,6 +27984,7 @@
</span><span class="cx">                                 0FDA7C2118832BCC00C954B5 /* DateTimeFormat.cpp in Sources */,
</span><span class="cx">                                 F55B3DB71251F12D003EF269 /* DateTimeInputType.cpp in Sources */,
</span><span class="cx">                                 F55B3DB91251F12D003EF269 /* DateTimeLocalInputType.cpp in Sources */,
</span><ins>+                                2EB767561DA19B99003E23B5 /* InputEvent.cpp in Sources */,
</ins><span class="cx">                                 0F6A12BD1A00923700C6DE72 /* DebugPageOverlays.cpp in Sources */,
</span><span class="cx">                                 45FEA5CF156DDE8C00654101 /* Decimal.cpp in Sources */,
</span><span class="cx">                                 A8C228A211D5722E00D5A7D3 /* DecodedDataDocumentParser.cpp in Sources */,
</span><span class="lines">@@ -28865,6 +28882,7 @@
</span><span class="cx">                                 A7D0318E0E93540300E24ACD /* JSImageDataCustom.cpp in Sources */,
</span><span class="cx">                                 7A0E771E10C00DB100A0276E /* JSInspectorFrontendHost.cpp in Sources */,
</span><span class="cx">                                 7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */,
</span><ins>+                                A86629D409DA2B48009633A6 /* JSInputEvent.cpp in Sources */,
</ins><span class="cx">                                 A86629D409DA2B48009633A5 /* JSKeyboardEvent.cpp in Sources */,
</span><span class="cx">                                 12A253E01C8FFF6600C22295 /* JSKeyframeEffect.cpp in Sources */,
</span><span class="cx">                                 935F45420F7C3B5F00D7C1FB /* JSLazyEventListener.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMAllInOne.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMAllInOne.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/dom/DOMAllInOne.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -91,6 +91,7 @@
</span><span class="cx"> #include &quot;IdTargetObserver.cpp&quot;
</span><span class="cx"> #include &quot;IdTargetObserverRegistry.cpp&quot;
</span><span class="cx"> #include &quot;InlineStyleSheetOwner.cpp&quot;
</span><ins>+#include &quot;InputEvent.cpp&quot;
</ins><span class="cx"> #include &quot;KeyboardEvent.cpp&quot;
</span><span class="cx"> #include &quot;CustomElementReactionQueue.cpp&quot;
</span><span class="cx"> #include &quot;LiveNodeList.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Event.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Event.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/dom/Event.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -104,7 +104,8 @@
</span><span class="cx">         || isFocusEvent()
</span><span class="cx">         || isKeyboardEvent()
</span><span class="cx">         || isMouseEvent()
</span><del>-        || isTouchEvent();
</del><ins>+        || isTouchEvent()
+        || isInputEvent();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EventInterface Event::eventInterface() const
</span><span class="lines">@@ -132,6 +133,11 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool Event::isInputEvent() const
+{
+    return false;
+}
+
</ins><span class="cx"> bool Event::isCompositionEvent() const
</span><span class="cx"> {
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Event.h (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Event.h        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/dom/Event.h        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -143,6 +143,7 @@
</span><span class="cx">     virtual bool isMouseEvent() const;
</span><span class="cx">     virtual bool isFocusEvent() const;
</span><span class="cx">     virtual bool isKeyboardEvent() const;
</span><ins>+    virtual bool isInputEvent() const;
</ins><span class="cx">     virtual bool isCompositionEvent() const;
</span><span class="cx">     virtual bool isTouchEvent() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventNames.in (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventNames.in        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/dom/EventNames.in        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -12,6 +12,8 @@
</span><span class="cx"> ErrorEvent
</span><span class="cx"> FocusEvent
</span><span class="cx"> HashChangeEvent
</span><ins>+InputEvent
+InputEvents interfaceName=InputEvent
</ins><span class="cx"> KeyboardEvent
</span><span class="cx"> KeyboardEvents interfaceName=KeyboardEvent
</span><span class="cx"> MessageEvent
</span></span></pre></div>
<a id="trunkSourceWebCoredomInputEventcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/InputEvent.cpp (0 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InputEvent.cpp                                (rev 0)
+++ trunk/Source/WebCore/dom/InputEvent.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -0,0 +1,49 @@
</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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;InputEvent.h&quot;
+
+#include &quot;DOMWindow.h&quot;
+#include &quot;EventNames.h&quot;
+#include &quot;NotImplemented.h&quot;
+#include &lt;wtf/NeverDestroyed.h&gt;
+#include &lt;wtf/Vector.h&gt;
+
+namespace WebCore {
+
+InputEvent::InputEvent(const AtomicString&amp; eventType, const String&amp; inputType, bool canBubble, bool cancelable, DOMWindow* view, int detail)
+    : UIEvent(eventType, canBubble, cancelable, view, detail)
+    , m_inputType(inputType)
+{
+}
+
+InputEvent::InputEvent(const AtomicString&amp; eventType, const InputEventInit&amp; initializer)
+    : UIEvent(eventType, initializer)
+    , m_inputType(initializer.inputType)
+{
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoredomInputEventh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/InputEvent.h (0 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InputEvent.h                                (rev 0)
+++ trunk/Source/WebCore/dom/InputEvent.h        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -0,0 +1,64 @@
</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
+
+#include &quot;UIEvent.h&quot;
+
+namespace WebCore {
+
+class DOMWindow;
+class DataTransfer;
+
+struct InputEventInit : public UIEventInit {
+    String inputType;
+};
+
+class InputEvent final : public UIEvent {
+public:
+    static Ref&lt;InputEvent&gt; create(const AtomicString&amp; eventType, const String&amp; inputType, bool canBubble, bool cancelable, DOMWindow* view, int detail)
+    {
+        return adoptRef(*new InputEvent(eventType, inputType, canBubble, cancelable, view, detail));
+    }
+
+    static Ref&lt;InputEvent&gt; createForBindings(const AtomicString&amp; type, const InputEventInit&amp; initializer)
+    {
+        return adoptRef(*new InputEvent(type, initializer));
+    }
+
+    InputEvent(const AtomicString&amp; eventType, const String&amp; inputType, bool canBubble, bool cancelable, DOMWindow*, int detail);
+    InputEvent(const AtomicString&amp; eventType, const InputEventInit&amp;);
+
+    virtual ~InputEvent() { }
+
+    bool isInputEvent() const override { return true; }
+    EventInterface eventInterface() const final { return InputEventInterfaceType; }
+    String inputType() const { return m_inputType.string(); }
+
+private:
+    AtomicString m_inputType;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoredomInputEventidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/InputEvent.idl (0 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InputEvent.idl                                (rev 0)
+++ trunk/Source/WebCore/dom/InputEvent.idl        2016-10-06 04:05:35 UTC (rev 206843)
</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. ``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.
+*/
+
+[
+    ConstructorTemplate=Event
+] interface InputEvent : UIEvent {
+    [InitializedByEventConstructor] readonly attribute DOMString inputType;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/dom/Node.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include &quot;HTMLImageElement.h&quot;
</span><span class="cx"> #include &quot;HTMLSlotElement.h&quot;
</span><span class="cx"> #include &quot;HTMLStyleElement.h&quot;
</span><ins>+#include &quot;InputEvent.h&quot;
</ins><span class="cx"> #include &quot;InspectorController.h&quot;
</span><span class="cx"> #include &quot;KeyboardEvent.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="lines">@@ -61,6 +62,7 @@
</span><span class="cx"> #include &quot;RenderTextControl.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="cx"> #include &quot;ScopedEventQueue.h&quot;
</span><ins>+#include &quot;Settings.h&quot;
</ins><span class="cx"> #include &quot;StorageEvent.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> #include &quot;StyleSheetContents.h&quot;
</span><span class="lines">@@ -2200,9 +2202,12 @@
</span><span class="cx">     return !beforeLoadEvent-&gt;defaultPrevented();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Node::dispatchInputEvent()
</del><ins>+void Node::dispatchInputEvent(const AtomicString&amp; inputType)
</ins><span class="cx"> {
</span><del>-    dispatchScopedEvent(Event::create(eventNames().inputEvent, true, false));
</del><ins>+    if (document().settings()-&gt;inputEventsEnabled())
+        dispatchScopedEvent(InputEvent::create(eventNames().inputEvent, inputType, true, false, document().defaultView(), 0));
+    else
+        dispatchScopedEvent(Event::create(eventNames().inputEvent, true, false));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Node::defaultEventHandler(Event&amp; event)
</span><span class="lines">@@ -2268,7 +2273,7 @@
</span><span class="cx">         }
</span><span class="cx"> #endif
</span><span class="cx">     } else if (event.type() == eventNames().webkitEditableContentChangedEvent) {
</span><del>-        dispatchInputEvent();
</del><ins>+        dispatchInputEvent(emptyString());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/dom/Node.h        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -525,7 +525,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool dispatchBeforeLoadEvent(const String&amp; sourceURL);
</span><span class="cx"> 
</span><del>-    virtual void dispatchInputEvent();
</del><ins>+    virtual void dispatchInputEvent(const AtomicString&amp; inputType);
</ins><span class="cx"> 
</span><span class="cx">     // Perform the default action for an event.
</span><span class="cx">     virtual void defaultEventHandler(Event&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/editing/Editor.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -1660,7 +1660,7 @@
</span><span class="cx">         if (direction == NaturalWritingDirection)
</span><span class="cx">             return;
</span><span class="cx">         downcast&lt;HTMLTextFormControlElement&gt;(*focusedElement).setAttributeWithoutSynchronization(dirAttr, direction == LeftToRightWritingDirection ? &quot;ltr&quot; : &quot;rtl&quot;);
</span><del>-        focusedElement-&gt;dispatchInputEvent();
</del><ins>+        focusedElement-&gt;dispatchInputEvent(emptyString());
</ins><span class="cx">         document().updateStyleIfNeeded();
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -326,7 +326,7 @@
</span><span class="cx"> void HTMLFormControlElement::dispatchFormControlInputEvent()
</span><span class="cx"> {
</span><span class="cx">     setChangedSinceLastFormControlChangeEvent(true);
</span><del>-    HTMLElement::dispatchInputEvent();
</del><ins>+    HTMLElement::dispatchInputEvent(emptyString());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool HTMLFormControlElement::isDisabledFormControl() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -1015,7 +1015,7 @@
</span><span class="cx">     else
</span><span class="cx">         cacheSelectionInResponseToSetValue(max);
</span><span class="cx"> 
</span><del>-    dispatchInputEvent();
</del><ins>+    dispatchInputEvent(emptyString());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLInputElement::setValue(const String&amp; value, ExceptionCode&amp; ec, TextFieldEventBehavior eventBehavior)
</span><span class="lines">@@ -1095,7 +1095,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Input event is fired by the Node::defaultEventHandler for editable controls.
</span><span class="cx">     if (!isTextField())
</span><del>-        dispatchInputEvent();
</del><ins>+        dispatchInputEvent(emptyString());
</ins><span class="cx"> 
</span><span class="cx">     updateValidity();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -669,7 +669,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (fireOnChange) {
</span><del>-        dispatchInputEvent();
</del><ins>+        dispatchInputEvent(emptyString());
</ins><span class="cx">         dispatchFormControlChangeEvent();
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -682,7 +682,7 @@
</span><span class="cx">     if (m_lastOnChangeIndex != selected &amp;&amp; m_isProcessingUserDrivenChange) {
</span><span class="cx">         m_lastOnChangeIndex = selected;
</span><span class="cx">         m_isProcessingUserDrivenChange = false;
</span><del>-        dispatchInputEvent();
</del><ins>+        dispatchInputEvent(emptyString());
</ins><span class="cx">         dispatchFormControlChangeEvent();
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowMediaControlElementscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -863,7 +863,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     double time = value().toDouble();
</span><del>-    if (event.type() == eventNames().inputEvent &amp;&amp; time != mediaController()-&gt;currentTime())
</del><ins>+    if ((event.isInputEvent() || event.type() == eventNames().inputEvent) &amp;&amp; time != mediaController()-&gt;currentTime())
</ins><span class="cx">         mediaController()-&gt;setCurrentTime(time);
</span><span class="cx"> 
</span><span class="cx">     RenderSlider&amp; slider = downcast&lt;RenderSlider&gt;(*renderer());
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.in (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.in        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/page/Settings.in        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -278,5 +278,7 @@
</span><span class="cx"> # Runtime-enabled features
</span><span class="cx"> visualViewportEnabled initial=false
</span><span class="cx"> 
</span><ins>+inputEventsEnabled initial=false
+
</ins><span class="cx"> quickTimePluginReplacementEnabled initial=defaultQuickTimePluginReplacementEnabled
</span><span class="cx"> youTubeFlashPluginReplacementEnabled initial=defaultYouTubeFlashPluginReplacementEnabled
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/InternalSettings.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -111,6 +111,7 @@
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="cx">     , m_variationFontsEnabled(settings.variationFontsEnabled())
</span><span class="cx"> #endif
</span><ins>+    , m_inputEventsEnabled(settings.inputEventsEnabled())
</ins><span class="cx">     , m_userInterfaceDirectionPolicy(settings.userInterfaceDirectionPolicy())
</span><span class="cx">     , m_systemLayoutDirection(settings.systemLayoutDirection())
</span><span class="cx">     , m_pdfImageCachingPolicy(settings.pdfImageCachingPolicy())
</span><span class="lines">@@ -189,6 +190,7 @@
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="cx">     settings.setVariationFontsEnabled(m_variationFontsEnabled);
</span><span class="cx"> #endif
</span><ins>+    settings.setInputEventsEnabled(m_inputEventsEnabled);
</ins><span class="cx">     settings.setUserInterfaceDirectionPolicy(m_userInterfaceDirectionPolicy);
</span><span class="cx">     settings.setSystemLayoutDirection(m_systemLayoutDirection);
</span><span class="cx">     settings.setPdfImageCachingPolicy(m_pdfImageCachingPolicy);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/InternalSettings.h (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/InternalSettings.h        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/testing/InternalSettings.h        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -110,6 +110,7 @@
</span><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="cx">         bool m_variationFontsEnabled;
</span><span class="cx"> #endif
</span><ins>+        bool m_inputEventsEnabled;
</ins><span class="cx"> 
</span><span class="cx">         UserInterfaceDirectionPolicy m_userInterfaceDirectionPolicy;
</span><span class="cx">         TextDirection m_systemLayoutDirection;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalSettingsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/InternalSettings.idl (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/InternalSettings.idl        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebCore/testing/InternalSettings.idl        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -88,5 +88,7 @@
</span><span class="cx"> 
</span><span class="cx">     [MayThrowLegacyException] boolean variationFontsEnabled();
</span><span class="cx">     [MayThrowLegacyException] void setVariationFontsEnabled(boolean enabled);
</span><ins>+
+    void setInputEventsEnabled(boolean enabled);
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebKit2/ChangeLog        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-10-05  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Introduce InputEvent bindings in preparation for the input events spec
+        https://bugs.webkit.org/show_bug.cgi?id=162954
+
+        Reviewed by Ryosuke Niwa.
+
+        Adds a new runtime switch for enabling InputEvents.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
</ins><span class="cx"> 2016-10-05  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Put variation fonts work behind a compile-time flag
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -292,6 +292,7 @@
</span><span class="cx">     macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, false, &quot;Gamepads&quot;, &quot;Web Gamepad API support&quot;) \
</span><span class="cx">     macro(ModernMediaControlsEnabled, modernMediaControlsEnabled, Bool, bool, false, &quot;Modern Media Controls&quot;, &quot;Use modern media controls look&quot;) \
</span><span class="cx">     macro(VariationFontsEnabled, variationFontsEnabled, Bool, bool, true, &quot;Variation Fonts&quot;, &quot;Enable variation fonts&quot;) \
</span><ins>+    macro(InputEventsEnabled, inputEventsEnabled, Bool, bool, true, &quot;Input Events&quot;, &quot;Enable InputEvents support&quot;) \
</ins><span class="cx">     macro(VisualViewportEnabled, visualViewportEnabled, Bool, bool, false, &quot;Visual Viewport&quot;, &quot;Use Visual Viewport for fixed elements when zooming&quot;) \
</span><span class="cx">     macro(WebGL2Enabled, webGL2Enabled, Bool, bool, true, &quot;WebGL 2.0&quot;, &quot;WebGL 2 prototype&quot;) \
</span><span class="cx">     \
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (206842 => 206843)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-10-06 02:35:12 UTC (rev 206842)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-10-06 04:05:35 UTC (rev 206843)
</span><span class="lines">@@ -3228,6 +3228,8 @@
</span><span class="cx">     settings.setVariationFontsEnabled(store.getBoolValueForKey(WebPreferencesKey::variationFontsEnabledKey()));
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    settings.setInputEventsEnabled(store.getBoolValueForKey(WebPreferencesKey::inputEventsEnabledKey()));
+
</ins><span class="cx">     RuntimeEnabledFeatures::sharedFeatures().setModernMediaControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::modernMediaControlsEnabledKey()));
</span><span class="cx"> 
</span><span class="cx">     bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
</span></span></pre>
</div>
</div>

</body>
</html>