<!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>[203187] 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/203187">203187</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2016-07-13 13:52:21 -0700 (Wed, 13 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>REGRESSION(<a href="http://trac.webkit.org/projects/webkit/changeset/202953">r202953</a>): Clicking on input[type=file] doesn't open a file picker
https://bugs.webkit.org/show_bug.cgi?id=159686
Source/WebCore:


Reviewed by Chris Dumez.

The bug was caused by DOMActivate event not propagating out of the user-agent shadow tree
of a file input, and FileInputType not receiving the event to open the file picker.

Made DOMActivate &quot;composed&quot; event which cross shadow boundaries to fix the bug. The feedback
was given back to W3C on https://github.com/w3c/webcomponents/issues/513#issuecomment-231851617

Test: fast/forms/file/open-file-panel.html

* dom/Event.cpp:
(WebCore::Event::composed):

Tools:


Reviewed by Chris Dumez.

Added a code to print &quot;OPEN FILE PANEL&quot; in the text when runOpenPanel is called in the UI delegate.

* WebKitTestRunner/TestController.cpp:
(WTR::runOpenPanel):
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

LayoutTests:

&lt;rdar://problem/27263589&gt;

Reviewed by Chris Dumez.

Added a regression test for opening a file picker on a type=file input element.

The test currently only works on WebKit2 since the support for logging &quot;OPEN FILE PANEL&quot;
was only added to WebKitTestRunner.

Also added WebKit2 specific expected results for some tests that tries to open file panel.

* fast/forms/file/open-file-panel-expected.txt: Added.
* fast/forms/file/open-file-panel.html: Added.
* platform/ios-simulator-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
* platform/wk2/accessibility: Added.
* platform/wk2/accessibility/axpress-on-aria-button-expected.txt: Copied from LayoutTests/accessibility/axpress-on-aria-button-expected.txt.
* platform/wk2/accessibility/file-upload-button-with-axpress-expected.txt: Copied from LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt.
* platform/wk2/fast: Added.
* platform/wk2/fast/events: Added.
* platform/wk2/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt: Copied from LayoutTests/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomEventcpp">trunk/Source/WebCore/dom/Event.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastformsfileopenfilepanelexpectedtxt">trunk/LayoutTests/fast/forms/file/open-file-panel-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformsfileopenfilepanelhtml">trunk/LayoutTests/fast/forms/file/open-file-panel.html</a></li>
<li>trunk/LayoutTests/platform/wk2/accessibility/</li>
<li><a href="#trunkLayoutTestsplatformwk2accessibilityaxpressonariabuttonexpectedtxt">trunk/LayoutTests/platform/wk2/accessibility/axpress-on-aria-button-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2accessibilityfileuploadbuttonwithaxpressexpectedtxt">trunk/LayoutTests/platform/wk2/accessibility/file-upload-button-with-axpress-expected.txt</a></li>
<li>trunk/LayoutTests/platform/wk2/fast/</li>
<li>trunk/LayoutTests/platform/wk2/fast/events/</li>
<li><a href="#trunkLayoutTestsplatformwk2fasteventsdomactivatesetsunderlyingclickeventashandledexpectedtxt">trunk/LayoutTests/platform/wk2/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203186 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-13 20:51:01 UTC (rev 203186)
+++ trunk/LayoutTests/ChangeLog        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-07-12  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        REGRESSION(r202953): Clicking on input[type=file] doesn't open a file picker
+        https://bugs.webkit.org/show_bug.cgi?id=159686
+        &lt;rdar://problem/27263589&gt;
+
+        Reviewed by Chris Dumez.
+
+        Added a regression test for opening a file picker on a type=file input element.
+
+        The test currently only works on WebKit2 since the support for logging &quot;OPEN FILE PANEL&quot;
+        was only added to WebKitTestRunner.
+
+        Also added WebKit2 specific expected results for some tests that tries to open file panel.
+
+        * fast/forms/file/open-file-panel-expected.txt: Added.
+        * fast/forms/file/open-file-panel.html: Added.
+        * platform/ios-simulator-wk1/TestExpectations:
+        * platform/mac-wk1/TestExpectations:
+        * platform/win/TestExpectations:
+        * platform/wk2/accessibility: Added.
+        * platform/wk2/accessibility/axpress-on-aria-button-expected.txt: Copied from LayoutTests/accessibility/axpress-on-aria-button-expected.txt.
+        * platform/wk2/accessibility/file-upload-button-with-axpress-expected.txt: Copied from LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt.
+        * platform/wk2/fast: Added.
+        * platform/wk2/fast/events: Added.
+        * platform/wk2/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt: Copied from LayoutTests/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt.
+
</ins><span class="cx"> 2016-07-13  Frederic Wang  &lt;fwang@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove padding and margin around the &lt;math&gt; element
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsfileopenfilepanelexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/file/open-file-panel-expected.txt (0 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/file/open-file-panel-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/forms/file/open-file-panel-expected.txt        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+OPEN FILE PANEL
+This test checks that clicking on an file input field opens up a file picker.
+To manually test, click on the button below. WebKit should open a file picker.
+
+ Test passes if &quot;OPEN FILE PANEL&quot; is logged above.
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformsfileopenfilepanelhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/file/open-file-panel.html (0 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/file/open-file-panel.html                                (rev 0)
+++ trunk/LayoutTests/fast/forms/file/open-file-panel.html        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;p&gt;This test checks that clicking on an file input field opens up a file picker.&lt;br&gt;
+To manually test, click on the button below. WebKit should open a file picker.&lt;/p&gt;
+&lt;input type=file&gt;
+&lt;script&gt;
+
+if (window.internals &amp;&amp; window.eventSender) {
+    testRunner.dumpAsText();
+
+    document.write('Test passes if &quot;OPEN FILE PANEL&quot; is logged above.');
+
+    var input = document.querySelector('input');
+    var shadow = internals.shadowRoot(input);
+    var button = shadow.querySelector('input');
+
+    eventSender.mouseMoveTo(button.offsetLeft + 10, button.offsetTop + 10);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+}
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (203186 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-07-13 20:51:01 UTC (rev 203186)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -2984,6 +2984,9 @@
</span><span class="cx"> # iOS does not allow you to scroll by dragging the scrollbar thumb.
</span><span class="cx"> webkit.org/b/157201 fast/scrolling/rtl-drag-vertical-scroller.html [ Failure ]
</span><span class="cx"> 
</span><ins>+# DumpRenderTree doesn't support logging calls to runOpenPanel and iOS's WebKitTestRunner doesn't support eventSender.mouseDown.
+fast/forms/file/open-file-panel.html [ Skip ]
+
</ins><span class="cx"> # Tests that are failing after bug 157170 (WPT test sync). These tests may just need rebasing.
</span><span class="cx"> imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/readwrite-readonly.html [ Failure ]
</span><span class="cx"> [ Release ] imported/w3c/web-platform-tests/html/dom/interfaces.html [ Failure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (203186 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations        2016-07-13 20:51:01 UTC (rev 203186)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -80,6 +80,9 @@
</span><span class="cx"> webkit.org/b/119094 fast/forms/color/input-color-onchange-event.html [ Skip ]
</span><span class="cx"> webkit.org/b/119094 fast/forms/color/color-suggestion-picker-crash-on-set-value.html [ Skip ]
</span><span class="cx"> 
</span><ins>+# DumpRenderTree doesn't support logging calls to runOpenPanel.
+fast/forms/file/open-file-panel.html [ Skip ]
+
</ins><span class="cx"> # WK1 and WK2 mousemove events are subtly different in ways that break this test on WK1.
</span><span class="cx"> fast/events/ghostly-mousemoves-in-subframe.html [ Skip ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (203186 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations        2016-07-13 20:51:01 UTC (rev 203186)
+++ trunk/LayoutTests/platform/win/TestExpectations        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -317,6 +317,9 @@
</span><span class="cx"> webkit.org/b/29359 fast/forms/time [ Skip ]
</span><span class="cx"> webkit.org/b/29359 fast/forms/week [ Skip ]
</span><span class="cx"> 
</span><ins>+# DumpRenderTree doesn't support logging calls to runOpenPanel.
+fast/forms/file/open-file-panel.html [ Skip ]
+
</ins><span class="cx"> # ENABLE_GAMEPAD not enabled.
</span><span class="cx"> gamepad/ [ Skip ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwk2accessibilityaxpressonariabuttonexpectedtxtfromrev203076trunkLayoutTestsaccessibilityaxpressonariabuttonexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/accessibility/axpress-on-aria-button-expected.txt (from rev 203076, trunk/LayoutTests/accessibility/axpress-on-aria-button-expected.txt) (0 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/accessibility/axpress-on-aria-button-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/wk2/accessibility/axpress-on-aria-button-expected.txt        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+OPEN FILE PANEL
+Upload
+
+Upload
+
+Upload
+
+This tests that if a non-native action type is exposed as a control, then we will look for descendants to call press() on.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Press performed on fileupload
+Press performed on button
+Press performed on checkbox
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2accessibilityfileuploadbuttonwithaxpressexpectedtxtfromrev203076trunkLayoutTestsaccessibilityfileuploadbuttonwithaxpressexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/accessibility/file-upload-button-with-axpress-expected.txt (from rev 203076, trunk/LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt) (0 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/accessibility/file-upload-button-with-axpress-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/wk2/accessibility/file-upload-button-with-axpress-expected.txt        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+OPEN FILE PANEL
+
+This tests that when AXPress is used DOMActivate will be handled by the input file type.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+DOMActivate was called
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2fasteventsdomactivatesetsunderlyingclickeventashandledexpectedtxtfromrev203076trunkLayoutTestsfasteventsdomactivatesetsunderlyingclickeventashandledexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt (from rev 203076, trunk/LayoutTests/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt) (0 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/wk2/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+OPEN FILE PANEL
+OPEN FILE PANEL
+To test manually, click on all the form elements (except the textbox) and the details/summary element. The anchor shouldn't be activated (i.e. you shouldn't see any &quot;anchor activated&quot; messages).
+
+Focusing [object HTMLInputElement] type=text and pressing enter
+form submitted
+
+Activated [object HTMLInputElement] type=submit
+form submitted
+
+Focusing [object HTMLInputElement] type=submit and pressing enter
+Activated [object HTMLInputElement] type=submit
+form submitted
+
+Activated [object HTMLInputElement] type=image
+form submitted
+
+Focusing [object HTMLInputElement] type=image and pressing enter
+Activated [object HTMLInputElement] type=image
+form submitted
+
+Activated [object HTMLButtonElement] type=submit
+form submitted
+
+Focusing [object HTMLButtonElement] type=submit and pressing enter
+Activated [object HTMLButtonElement] type=submit
+form submitted
+
+Activated [object HTMLInputElement] type=reset
+Focusing [object HTMLInputElement] type=reset and pressing enter
+Activated [object HTMLInputElement] type=reset
+Activated [object HTMLButtonElement] type=reset
+Focusing [object HTMLButtonElement] type=reset and pressing enter
+Activated [object HTMLButtonElement] type=reset
+Activated [object HTMLInputElement] type=checkbox
+Activated [object HTMLInputElement] type=radio
+Activated [object HTMLInputElement] type=file
+Focusing [object HTMLInputElement] type=file and pressing enter
+Activated [object HTMLInputElement] type=file
+
+The details element was opened
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203186 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-13 20:51:01 UTC (rev 203186)
+++ trunk/Source/WebCore/ChangeLog        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-07-12  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        REGRESSION(r202953): Clicking on input[type=file] doesn't open a file picker
+        https://bugs.webkit.org/show_bug.cgi?id=159686
+
+        Reviewed by Chris Dumez.
+
+        The bug was caused by DOMActivate event not propagating out of the user-agent shadow tree
+        of a file input, and FileInputType not receiving the event to open the file picker.
+
+        Made DOMActivate &quot;composed&quot; event which cross shadow boundaries to fix the bug. The feedback
+        was given back to W3C on https://github.com/w3c/webcomponents/issues/513#issuecomment-231851617
+
+        Test: fast/forms/file/open-file-panel.html
+
+        * dom/Event.cpp:
+        (WebCore::Event::composed):
+
</ins><span class="cx"> 2016-07-13  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         v2: WebContent crash due to RELEASE_ASSERT(!m_inLoadPendingImages) in StyleResolver::~StyleResolver()
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Event.cpp (203186 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Event.cpp        2016-07-13 20:51:01 UTC (rev 203186)
+++ trunk/Source/WebCore/dom/Event.cpp        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -97,6 +97,7 @@
</span><span class="cx"> 
</span><span class="cx">     return m_type == eventNames().inputEvent
</span><span class="cx">         || m_type == eventNames().textInputEvent
</span><ins>+        || m_type == eventNames().DOMActivateEvent
</ins><span class="cx">         || isCompositionEvent()
</span><span class="cx">         || isClipboardEvent()
</span><span class="cx">         || isFocusEvent()
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (203186 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-07-13 20:51:01 UTC (rev 203186)
+++ trunk/Tools/ChangeLog        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-07-12  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        REGRESSION(r202953): Clicking on input[type=file] doesn't open a file picker
+        https://bugs.webkit.org/show_bug.cgi?id=159686
+
+        Reviewed by Chris Dumez.
+
+        Added a code to print &quot;OPEN FILE PANEL&quot; in the text when runOpenPanel is called in the UI delegate.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::runOpenPanel):
+        (WTR::TestController::createOtherPage):
+        (WTR::TestController::createWebViewWithOptions):
+
</ins><span class="cx"> 2016-07-13  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add more candidate tests
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (203186 => 203187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2016-07-13 20:51:01 UTC (rev 203186)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2016-07-13 20:52:21 UTC (rev 203187)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include &lt;WebKit/WKNotificationManager.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKNotificationPermissionRequest.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKNumber.h&gt;
</span><ins>+#include &lt;WebKit/WKOpenPanelResultListener.h&gt;
</ins><span class="cx"> #include &lt;WebKit/WKPageGroup.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKPageInjectedBundleClient.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKPagePrivate.h&gt;
</span><span class="lines">@@ -153,6 +154,12 @@
</span><span class="cx">     return TestController::singleton().beforeUnloadReturnValue();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void runOpenPanel(WKPageRef page, WKFrameRef frame, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef resultListenerRef, const void*)
+{
+    printf(&quot;OPEN FILE PANEL\n&quot;);
+    WKOpenPanelResultListenerCancel(resultListenerRef);
+}
+
</ins><span class="cx"> void TestController::runModal(WKPageRef page, const void* clientInfo)
</span><span class="cx"> {
</span><span class="cx">     PlatformWebView* view = static_cast&lt;PlatformWebView*&gt;(const_cast&lt;void*&gt;(clientInfo));
</span><span class="lines">@@ -235,7 +242,7 @@
</span><span class="cx">         0, // didDraw
</span><span class="cx">         0, // pageDidScroll
</span><span class="cx">         0, // exceededDatabaseQuota
</span><del>-        0, // runOpenPanel
</del><ins>+        runOpenPanel,
</ins><span class="cx">         decidePolicyForGeolocationPermissionRequest,
</span><span class="cx">         0, // headerHeight
</span><span class="cx">         0, // footerHeight
</span><span class="lines">@@ -500,7 +507,7 @@
</span><span class="cx">         0, // didDraw
</span><span class="cx">         0, // pageDidScroll
</span><span class="cx">         0, // exceededDatabaseQuota,
</span><del>-        0, // runOpenPanel
</del><ins>+        runOpenPanel,
</ins><span class="cx">         decidePolicyForGeolocationPermissionRequest,
</span><span class="cx">         0, // headerHeight
</span><span class="cx">         0, // footerHeight
</span></span></pre>
</div>
</div>

</body>
</html>