<!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>[191480] 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/191480">191480</a></dd>
<dt>Author</dt> <dd>dbates@webkit.org</dd>
<dt>Date</dt> <dd>2015-10-22 15:14:08 -0700 (Thu, 22 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/191113">r191113</a>.

Rollout <a href="http://trac.webkit.org/projects/webkit/changeset/144451">r144451</a> since it regressed the visibility of the
search cancel button when a search field is empty or showing
placeholder text. Further investigation is needed.

Reverted changeset:

&quot;[iOS] DOM click event may not be dispatched when page has
:active style and &lt;input type=&quot;search&quot;&gt;&quot;
https://bugs.webkit.org/show_bug.cgi?id=144451
http://trac.webkit.org/changeset/191113</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderSearchFieldcpp">trunk/Source/WebCore/rendering/RenderSearchField.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderSearchFieldh">trunk/Source/WebCore/rendering/RenderSearchField.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasteventscanclickelementonpagewithactivepseudoclassandsearchfieldexpectedtxt">trunk/LayoutTests/fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventscanclickelementonpagewithactivepseudoclassandsearchfieldhtml">trunk/LayoutTests/fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcancelbuttonvisiblewheninputbecomesdisabledexpectedhtml">trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcancelbuttonvisiblewheninputbecomesdisabledhtml">trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcancelbuttonvisiblewheninputbecomesreadonlyexpectedhtml">trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcancelbuttonvisiblewheninputbecomesreadonlyhtml">trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcancelinformerlyinvisibleelementexpectedhtml">trunk/LayoutTests/fast/forms/search/search-cancel-in-formerly-invisible-element-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcancelinformerlyinvisibleelementhtml">trunk/LayoutTests/fast/forms/search/search-cancel-in-formerly-invisible-element.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcanceltogglevisibilityinitiallyhiddenexpectedhtml">trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-hidden-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcanceltogglevisibilityinitiallyhiddenhtml">trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcanceltogglevisibilityinitiallyvisibleexpectedhtml">trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-visible-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastformssearchsearchcanceltogglevisibilityinitiallyvisiblehtml">trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-visible.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/ChangeLog        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-10-22  Daniel Bates  &lt;dabates@apple.com&gt;
+
+        Unreviewed, rolling out r191113.
+
+        Rollout r144451 since it regressed the visibility of the
+        search cancel button when a search field is empty or showing
+        placeholder text. Further investigation is needed.
+
+        Reverted changeset:
+
+        &quot;[iOS] DOM click event may not be dispatched when page has
+        :active style and &lt;input type=&quot;search&quot;&gt;&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=144451
+        http://trac.webkit.org/changeset/191113
+
</ins><span class="cx"> 2015-10-22  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Skip a racey test until it can be made proper.
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventscanclickelementonpagewithactivepseudoclassandsearchfieldexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field-expected.txt (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field-expected.txt        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field-expected.txt        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-Test that an element, with an onclick handler and an empty ontouchstart attribute, in an &lt;iframe&gt; on a page with a search field and specifies an :active pseudo-class for &lt;body&gt; receives a DOM click event when tapped. To run this test by hand, click the blue square below.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-PASS clicked blue square
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfasteventscanclickelementonpagewithactivepseudoclassandsearchfieldhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,72 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;style&gt;
-body:active {
-    /* Must be non-empty. */
-    -webkit-tap-highlight-color: yellow;
-}
-&lt;/style&gt;
-&lt;script&gt;
-window.jsTestIsAsync = true;
-
-function notifyPass()
-{
-    testPassed(&quot;clicked blue square&quot;);
-
-    var testContainer = document.getElementById(&quot;test-container&quot;);
-    testContainer.parentNode.removeChild(testContainer);
-    finishJSTest();
-}
-
-function runTest()
-{
-    if (!window.testRunner)
-        return;
-    var iframe = document.getElementById(&quot;iframe&quot;);
-    var square = iframe.contentDocument.getElementById(&quot;square&quot;);
-    var x = iframe.offsetLeft + square.offsetLeft + Math.floor(square.offsetWidth / 2);
-    var y = iframe.offsetTop + square.offsetTop + Math.floor(square.offsetHeight / 2);
-    if (testRunner.runUIScript &amp;&amp; window.TouchEvent)
-        testRunner.runUIScript(&quot;(function() { uiController.singleTapAtPoint(&quot; + x + &quot;, &quot; + y + &quot;); })()&quot;);
-    else if (window.eventSender) {
-        eventSender.mouseMoveTo(x, y);
-        eventSender.mouseDown();
-        eventSender.mouseUp();
-    }
-}
-&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;div id=&quot;description&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;test-container&quot;&gt;
-    &lt;p&gt;&lt;input type=&quot;search&quot; placeholder=&quot;Do not click me&quot;&gt;&lt;/p&gt;
-    &lt;iframe id=&quot;iframe&quot; width=&quot;128&quot; height=&quot;128&quot; onload=&quot;runTest()&quot; srcdoc='
-        &lt;style&gt;
-            body {
-                margin: 0;
-                padding 0;
-            }
-            #square {
-                -webkit-box-align: center;
-                -webkit-box-pack: center;
-                -webkit-user-select: none;
-                background-color: blue;
-                color: white;
-                cursor: pointer;
-                display: -webkit-box;
-                height: 128px;
-                width: 128px;
-            }
-        &lt;/style&gt;
-        &lt;div id=&quot;square&quot; ontouchstart=&quot;&quot; onclick=&quot;window.parent.notifyPass()&quot;&gt;Click me&lt;/div&gt;&lt;!-- Intentionally empty attribute ontouchstart. --&gt;
-    '&gt;&lt;/iframe&gt;
-&lt;/div&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
-description(&quot;Test that an element, with an onclick handler and an empty ontouchstart attribute, in an &amp;lt;iframe&amp;gt; on a page with a search field and specifies an &lt;code&gt;:active&lt;/code&gt; pseudo-class for &amp;lt;body&amp;gt; receives a DOM click event when tapped. To run this test by hand, click the blue square below.&quot;);
-&lt;/script&gt;
-&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcancelbuttonvisiblewheninputbecomesdisabledexpectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled-expected.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled-expected.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled-expected.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;body&gt;
-&lt;p&gt;This tests that the search cancel button renders when the field becomes disabled (no change).&lt;/p&gt;
-&lt;input type=&quot;search&quot; value=&quot;search&quot; disabled&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcancelbuttonvisiblewheninputbecomesdisabledhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,24 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;body&gt;
-&lt;p&gt;This tests that the search cancel button renders when the field becomes disabled (no change).&lt;/p&gt;
-&lt;input type=&quot;search&quot; id=&quot;search&quot; value=&quot;search&quot;&gt;
-&lt;script&gt;
-if (window.testRunner)
-    testRunner.waitUntilDone();
-
-var search = document.getElementById(&quot;search&quot;);
-
-function makeFieldDisabledAndNotifyDone()
-{
-    search.disabled = true;
-    if (window.internals)
-        internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-window.setTimeout(makeFieldDisabledAndNotifyDone, 0);
-&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcancelbuttonvisiblewheninputbecomesreadonlyexpectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly-expected.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly-expected.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly-expected.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;body&gt;
-&lt;p&gt;This tests that the search cancel button renders when the field becomes read only (no change).&lt;/p&gt;
-&lt;input type=&quot;search&quot; value=&quot;search&quot; readonly&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcancelbuttonvisiblewheninputbecomesreadonlyhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,24 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;body&gt;
-&lt;p&gt;This tests that the search cancel button renders when the field becomes read only (no change).&lt;/p&gt;
-&lt;input type=&quot;search&quot; id=&quot;search&quot; value=&quot;search&quot;&gt;
-&lt;script&gt;
-if (window.testRunner)
-    testRunner.waitUntilDone();
-
-var search = document.getElementById(&quot;search&quot;);
-
-function makeFieldReadOnlyAndNotifyDone()
-{
-    search.readOnly = true;
-    if (window.internals)
-        internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-window.setTimeout(makeFieldReadOnlyAndNotifyDone, 0);
-&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcancelinformerlyinvisibleelementexpectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-in-formerly-invisible-element-expected.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-in-formerly-invisible-element-expected.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-in-formerly-invisible-element-expected.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;body&gt;
-&lt;input type=&quot;search&quot; value=&quot;search&quot;&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcancelinformerlyinvisibleelementhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-in-formerly-invisible-element.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-in-formerly-invisible-element.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-in-formerly-invisible-element.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;body&gt;
-&lt;input type=&quot;search&quot; id=&quot;search&quot; value=&quot;search&quot; style=&quot;visibility: hidden&quot;&gt;
-&lt;script&gt;
-document.getElementById(&quot;search&quot;).style.visibility = &quot;visible&quot;;
-&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcanceltogglevisibilityinitiallyhiddenexpectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-hidden-expected.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-hidden-expected.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-hidden-expected.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;style&gt;
-.width-200px {
-    width: 200px;
-}
-&lt;/style&gt;
-&lt;body&gt;
-&lt;p&gt;Tests that the search cancel button is not shown after changing the visibility of &amp;lt;input type=&amp;quot;search&amp;quot;&amp;gt; from hidden to visible to hidden. This test passed if you do not see the search cancel button in the blue outlined box (below).&lt;/p&gt;
-&lt;div class=&quot;width-200px&quot; style=&quot;border: 1px solid blue&quot;&gt;
-    &lt;input type=&quot;search&quot; value=&quot;search&quot; class=&quot;width-200px&quot; style=&quot;visibility: hidden&quot;&gt;
-&lt;/div&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcanceltogglevisibilityinitiallyhiddenhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,30 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;style&gt;
-.width-200px {
-    width: 200px;
-}
-&lt;/style&gt;
-&lt;script&gt;
-if (window.testRunner)
-    testRunner.waitUntilDone();
-&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt;Tests that the search cancel button is not shown after changing the visibility of &amp;lt;input type=&amp;quot;search&amp;quot;&amp;gt; from hidden to visible to hidden. This test passed if you do not see the search cancel button in the blue outlined box (below).&lt;/p&gt;
-&lt;div class=&quot;width-200px&quot; style=&quot;border: 1px solid blue&quot;&gt;
-    &lt;input type=&quot;search&quot; id=&quot;search&quot; value=&quot;search&quot; class=&quot;width-200px&quot; style=&quot;visibility: hidden&quot;&gt;
-&lt;/div&gt;
-&lt;script&gt;
-var search = document.getElementById(&quot;search&quot;);
-search.style.visibility = &quot;visible&quot;;
-function done() {
-    search.style.visibility = &quot;hidden&quot;;
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-window.setTimeout(done, 0);
-&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcanceltogglevisibilityinitiallyvisibleexpectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-visible-expected.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-visible-expected.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-visible-expected.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;style&gt;
-.width-200px {
-    width: 200px;
-}
-&lt;/style&gt;
-&lt;body&gt;
-&lt;p&gt;Tests that the search cancel button is not shown after changing the visibility of &amp;lt;input type=&amp;quot;search&amp;quot;&amp;gt; from visible to hidden to visible. This test passed if you see the search cancel button in the blue outlined box (below).&lt;/p&gt;
-&lt;div class=&quot;width-200px&quot; style=&quot;border: 1px solid blue&quot;&gt;
-    &lt;input type=&quot;search&quot; value=&quot;search&quot; class=&quot;width-200px&quot;&gt;
-&lt;/div&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastformssearchsearchcanceltogglevisibilityinitiallyvisiblehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-visible.html (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-visible.html        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/LayoutTests/fast/forms/search/search-cancel-toggle-visibility-initially-visible.html        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,30 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;style&gt;
-.width-200px {
-    width: 200px;
-}
-&lt;/style&gt;
-&lt;script&gt;
-if (window.testRunner)
-    testRunner.waitUntilDone();
-&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt;Tests that the search cancel button is not shown after changing the visibility of &amp;lt;input type=&amp;quot;search&amp;quot;&amp;gt; from visible to hidden to visible. This test passed if you see the search cancel button in the blue outlined box (below).&lt;/p&gt;
-&lt;div class=&quot;width-200px&quot; style=&quot;border: 1px solid blue&quot;&gt;
-    &lt;input type=&quot;search&quot; id=&quot;search&quot; value=&quot;search&quot; class=&quot;width-200px&quot;&gt;
-&lt;/div&gt;
-&lt;script&gt;
-var search = document.getElementById(&quot;search&quot;);
-search.style.visibility = &quot;hidden&quot;;
-function done() {
-    search.style.visibility = &quot;visible&quot;;
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-window.setTimeout(done, 0);
-&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/Source/WebCore/ChangeLog        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-10-22  Daniel Bates  &lt;dabates@apple.com&gt;
+
+        Unreviewed, rolling out r191113.
+
+        Rollout r144451 since it regressed the visibility of the
+        search cancel button when a search field is empty or showing
+        placeholder text. Further investigation is needed.
+
+        Reverted changeset:
+
+        &quot;[iOS] DOM click event may not be dispatched when page has
+        :active style and &lt;input type=&quot;search&quot;&gt;&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=144451
+        http://trac.webkit.org/changeset/191113
+
</ins><span class="cx"> 2015-10-22  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add ways to log to log channels via a functional syntax, and via a TextStream
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderSearchFieldcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderSearchField.cpp (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderSearchField.cpp        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/Source/WebCore/rendering/RenderSearchField.cpp        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -52,6 +52,8 @@
</span><span class="cx"> 
</span><span class="cx"> RenderSearchField::RenderSearchField(HTMLInputElement&amp; element, Ref&lt;RenderStyle&gt;&amp;&amp; style)
</span><span class="cx">     : RenderTextControlSingleLine(element, WTF::move(style))
</span><ins>+    , m_searchPopupIsVisible(false)
+    , m_searchPopup(0)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(element.isSearchField());
</span><span class="cx"> }
</span><span class="lines">@@ -165,22 +167,27 @@
</span><span class="cx">         m_searchPopup-&gt;popupMenu()-&gt;updateFromElement();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderSearchField::updateCancelButtonVisibility()
</del><ins>+void RenderSearchField::updateCancelButtonVisibility() const
</ins><span class="cx"> {
</span><span class="cx">     RenderElement* cancelButtonRenderer = cancelButtonElement()-&gt;renderer();
</span><span class="cx">     if (!cancelButtonRenderer)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    bool wasCancelButtonVisible = m_isCancelButtonVisible;
-    m_isCancelButtonVisible = style().visibility() == VISIBLE &amp;&amp; !inputElement().value().isEmpty();
-    if (wasCancelButtonVisible == m_isCancelButtonVisible)
</del><ins>+    const RenderStyle&amp; curStyle = cancelButtonRenderer-&gt;style();
+    EVisibility buttonVisibility = visibilityForCancelButton();
+    if (curStyle.visibility() == buttonVisibility)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto cancelButtonStyle = RenderStyle::clone(&amp;cancelButtonRenderer-&gt;style());
-    cancelButtonStyle.get().setVisibility(m_isCancelButtonVisible ? VISIBLE : HIDDEN);
</del><ins>+    auto cancelButtonStyle = RenderStyle::clone(&amp;curStyle);
+    cancelButtonStyle.get().setVisibility(buttonVisibility);
</ins><span class="cx">     cancelButtonRenderer-&gt;setStyle(WTF::move(cancelButtonStyle));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EVisibility RenderSearchField::visibilityForCancelButton() const
+{
+    return (style().visibility() == HIDDEN || inputElement().value().isEmpty()) ? HIDDEN : VISIBLE;
+}
+
</ins><span class="cx"> const AtomicString&amp; RenderSearchField::autosaveName() const
</span><span class="cx"> {
</span><span class="cx">     return inputElement().fastGetAttribute(autosaveAttr);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderSearchFieldh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderSearchField.h (191479 => 191480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderSearchField.h        2015-10-22 21:54:11 UTC (rev 191479)
+++ trunk/Source/WebCore/rendering/RenderSearchField.h        2015-10-22 22:14:08 UTC (rev 191480)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">     RenderSearchField(HTMLInputElement&amp;, Ref&lt;RenderStyle&gt;&amp;&amp;);
</span><span class="cx">     virtual ~RenderSearchField();
</span><span class="cx"> 
</span><del>-    void updateCancelButtonVisibility();
</del><ins>+    void updateCancelButtonVisibility() const;
</ins><span class="cx"> 
</span><span class="cx">     void addSearchResult();
</span><span class="cx">     void stopSearchEventTimer();
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx">     virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const override;
</span><span class="cx">     virtual LayoutUnit computeLogicalHeightLimit() const override;
</span><span class="cx">     virtual void updateFromElement() override;
</span><ins>+    EVisibility visibilityForCancelButton() const;
</ins><span class="cx">     const AtomicString&amp; autosaveName() const;
</span><span class="cx"> 
</span><span class="cx">     // PopupMenuClient methods
</span><span class="lines">@@ -84,8 +85,7 @@
</span><span class="cx">     HTMLElement* resultsButtonElement() const;
</span><span class="cx">     HTMLElement* cancelButtonElement() const;
</span><span class="cx"> 
</span><del>-    bool m_searchPopupIsVisible { false };
-    bool m_isCancelButtonVisible { false };
</del><ins>+    bool m_searchPopupIsVisible;
</ins><span class="cx">     RefPtr&lt;SearchPopupMenu&gt; m_searchPopup;
</span><span class="cx">     Vector&lt;RecentSearch&gt; m_recentSearches;
</span><span class="cx"> };
</span></span></pre>
</div>
</div>

</body>
</html>