<!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:
"[iOS] DOM click event may not be dispatched when page has
:active style and <input type="search">"
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 <dabates@apple.com>
+
+ 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:
+
+ "[iOS] DOM click event may not be dispatched when page has
+ :active style and <input type="search">"
+ https://bugs.webkit.org/show_bug.cgi?id=144451
+ http://trac.webkit.org/changeset/191113
+
</ins><span class="cx"> 2015-10-22 Brady Eidson <beidson@apple.com>
</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 <iframe> on a page with a search field and specifies an :active pseudo-class for <body> 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 "PASS" messages, followed by "TEST COMPLETE".
-
-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>-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../resources/js-test-pre.js"></script>
-<style>
-body:active {
- /* Must be non-empty. */
- -webkit-tap-highlight-color: yellow;
-}
-</style>
-<script>
-window.jsTestIsAsync = true;
-
-function notifyPass()
-{
- testPassed("clicked blue square");
-
- var testContainer = document.getElementById("test-container");
- testContainer.parentNode.removeChild(testContainer);
- finishJSTest();
-}
-
-function runTest()
-{
- if (!window.testRunner)
- return;
- var iframe = document.getElementById("iframe");
- var square = iframe.contentDocument.getElementById("square");
- 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 && window.TouchEvent)
- testRunner.runUIScript("(function() { uiController.singleTapAtPoint(" + x + ", " + y + "); })()");
- else if (window.eventSender) {
- eventSender.mouseMoveTo(x, y);
- eventSender.mouseDown();
- eventSender.mouseUp();
- }
-}
-</script>
-</head>
-<body>
-<div id="description"></div>
-<div id="test-container">
- <p><input type="search" placeholder="Do not click me"></p>
- <iframe id="iframe" width="128" height="128" onload="runTest()" srcdoc='
- <style>
- 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;
- }
- </style>
- <div id="square" ontouchstart="" onclick="window.parent.notifyPass()">Click me</div><!-- Intentionally empty attribute ontouchstart. -->
- '></iframe>
-</div>
-<div id="console"></div>
-<script>
-description("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 <code>:active</code> pseudo-class for &lt;body&gt; receives a DOM click event when tapped. To run this test by hand, click the blue square below.");
-</script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<body>
-<p>This tests that the search cancel button renders when the field becomes disabled (no change).</p>
-<input type="search" value="search" disabled>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<body>
-<p>This tests that the search cancel button renders when the field becomes disabled (no change).</p>
-<input type="search" id="search" value="search">
-<script>
-if (window.testRunner)
- testRunner.waitUntilDone();
-
-var search = document.getElementById("search");
-
-function makeFieldDisabledAndNotifyDone()
-{
- search.disabled = true;
- if (window.internals)
- internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-window.setTimeout(makeFieldDisabledAndNotifyDone, 0);
-</script>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<body>
-<p>This tests that the search cancel button renders when the field becomes read only (no change).</p>
-<input type="search" value="search" readonly>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<body>
-<p>This tests that the search cancel button renders when the field becomes read only (no change).</p>
-<input type="search" id="search" value="search">
-<script>
-if (window.testRunner)
- testRunner.waitUntilDone();
-
-var search = document.getElementById("search");
-
-function makeFieldReadOnlyAndNotifyDone()
-{
- search.readOnly = true;
- if (window.internals)
- internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-window.setTimeout(makeFieldReadOnlyAndNotifyDone, 0);
-</script>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<body>
-<input type="search" value="search">
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<body>
-<input type="search" id="search" value="search" style="visibility: hidden">
-<script>
-document.getElementById("search").style.visibility = "visible";
-</script>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.width-200px {
- width: 200px;
-}
-</style>
-<body>
-<p>Tests that the search cancel button is not shown after changing the visibility of &lt;input type=&quot;search&quot;&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).</p>
-<div class="width-200px" style="border: 1px solid blue">
- <input type="search" value="search" class="width-200px" style="visibility: hidden">
-</div>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.width-200px {
- width: 200px;
-}
-</style>
-<script>
-if (window.testRunner)
- testRunner.waitUntilDone();
-</script>
-</head>
-<body>
-<p>Tests that the search cancel button is not shown after changing the visibility of &lt;input type=&quot;search&quot;&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).</p>
-<div class="width-200px" style="border: 1px solid blue">
- <input type="search" id="search" value="search" class="width-200px" style="visibility: hidden">
-</div>
-<script>
-var search = document.getElementById("search");
-search.style.visibility = "visible";
-function done() {
- search.style.visibility = "hidden";
- if (window.testRunner)
- testRunner.notifyDone();
-}
-window.setTimeout(done, 0);
-</script>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.width-200px {
- width: 200px;
-}
-</style>
-<body>
-<p>Tests that the search cancel button is not shown after changing the visibility of &lt;input type=&quot;search&quot;&gt; from visible to hidden to visible. This test passed if you see the search cancel button in the blue outlined box (below).</p>
-<div class="width-200px" style="border: 1px solid blue">
- <input type="search" value="search" class="width-200px">
-</div>
-</body>
-</html>
</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>-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.width-200px {
- width: 200px;
-}
-</style>
-<script>
-if (window.testRunner)
- testRunner.waitUntilDone();
-</script>
-</head>
-<body>
-<p>Tests that the search cancel button is not shown after changing the visibility of &lt;input type=&quot;search&quot;&gt; from visible to hidden to visible. This test passed if you see the search cancel button in the blue outlined box (below).</p>
-<div class="width-200px" style="border: 1px solid blue">
- <input type="search" id="search" value="search" class="width-200px">
-</div>
-<script>
-var search = document.getElementById("search");
-search.style.visibility = "hidden";
-function done() {
- search.style.visibility = "visible";
- if (window.testRunner)
- testRunner.notifyDone();
-}
-window.setTimeout(done, 0);
-</script>
-</body>
-</html>
</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 <dabates@apple.com>
+
+ 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:
+
+ "[iOS] DOM click event may not be dispatched when page has
+ :active style and <input type="search">"
+ https://bugs.webkit.org/show_bug.cgi?id=144451
+ http://trac.webkit.org/changeset/191113
+
</ins><span class="cx"> 2015-10-22 Simon Fraser <simon.fraser@apple.com>
</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& element, Ref<RenderStyle>&& 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->popupMenu()->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()->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 && !inputElement().value().isEmpty();
- if (wasCancelButtonVisible == m_isCancelButtonVisible)
</del><ins>+ const RenderStyle& curStyle = cancelButtonRenderer->style();
+ EVisibility buttonVisibility = visibilityForCancelButton();
+ if (curStyle.visibility() == buttonVisibility)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- auto cancelButtonStyle = RenderStyle::clone(&cancelButtonRenderer->style());
- cancelButtonStyle.get().setVisibility(m_isCancelButtonVisible ? VISIBLE : HIDDEN);
</del><ins>+ auto cancelButtonStyle = RenderStyle::clone(&curStyle);
+ cancelButtonStyle.get().setVisibility(buttonVisibility);
</ins><span class="cx"> cancelButtonRenderer->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& 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&, Ref<RenderStyle>&&);
</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& 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<SearchPopupMenu> m_searchPopup;
</span><span class="cx"> Vector<RecentSearch> m_recentSearches;
</span><span class="cx"> };
</span></span></pre>
</div>
</div>
</body>
</html>