<!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>[213834] releases/WebKitGTK/webkit-2.16</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/213834">213834</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2017-03-13 05:06:06 -0700 (Mon, 13 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/213606">r213606</a> - Parameter to input.setCustomValidity() should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=169332

Reviewed by Sam Weinig.

Source/WebCore:

Parameter to input.setCustomValidity() should not be nullable:
- https://html.spec.whatwg.org/#htmlinputelement

Firefox and Chrome agree with the specification so the change
should be safe.

Test: fast/forms/setCustomValidity-null-parameter.html

* html/HTMLButtonElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTextAreaElement.idl:

LayoutTests:

* fast/forms/ValidityState-customError-expected.txt:
* fast/forms/ValidityState-customError.html:
Rebaseline now that behavior has changed when passing null or undefined
to setCustomValidity().

* fast/forms/setCustomValidity-null-parameter-expected.txt: Added.
* fast/forms/setCustomValidity-null-parameter.html: Added.
Add layout test coverage.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit216LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit216LayoutTestsfastformsValidityStatecustomErrorexpectedtxt">releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/ValidityState-customError-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit216LayoutTestsfastformsValidityStatecustomErrorhtml">releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/ValidityState-customError.html</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLButtonElementidl">releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLButtonElement.idl</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLFieldSetElementidl">releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLFieldSetElement.idl</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLInputElementidl">releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLInputElement.idl</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLKeygenElementidl">releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLKeygenElement.idl</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLObjectElementidl">releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLObjectElement.idl</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLOutputElementidl">releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLOutputElement.idl</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLSelectElementidl">releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLSelectElement.idl</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLTextAreaElementidl">releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLTextAreaElement.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit216LayoutTestsfastformssetCustomValiditynullparameterexpectedtxt">releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/setCustomValidity-null-parameter-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit216LayoutTestsfastformssetCustomValiditynullparameterhtml">releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/setCustomValidity-null-parameter.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit216LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2017-03-08  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Parameter to input.setCustomValidity() should not be nullable
+        https://bugs.webkit.org/show_bug.cgi?id=169332
+
+        Reviewed by Sam Weinig.
+
+        * fast/forms/ValidityState-customError-expected.txt:
+        * fast/forms/ValidityState-customError.html:
+        Rebaseline now that behavior has changed when passing null or undefined
+        to setCustomValidity().
+
+        * fast/forms/setCustomValidity-null-parameter-expected.txt: Added.
+        * fast/forms/setCustomValidity-null-parameter.html: Added.
+        Add layout test coverage.
+
</ins><span class="cx"> 2017-03-08  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSS Multicolumn should not clip columns horizontally
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216LayoutTestsfastformsValidityStatecustomErrorexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/ValidityState-customError-expected.txt (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/ValidityState-customError-expected.txt        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/ValidityState-customError-expected.txt        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -44,13 +44,13 @@
</span><span class="cx"> PASS setCustomValidity() threw Not enough arguments
</span><span class="cx"> PASS setCustomValidity() threw Not enough arguments
</span><span class="cx"> PASS customErrorFor(&quot;fieldset-many-changes&quot;) is false
</span><del>-PASS customErrorFor(&quot;button-many-changes&quot;) is false
</del><ins>+PASS customErrorFor(&quot;button-many-changes&quot;) is true
</ins><span class="cx"> PASS customErrorFor(&quot;button-button-many-changes&quot;) is false
</span><span class="cx"> PASS customErrorFor(&quot;button-reset-many-changes&quot;) is false
</span><del>-PASS customErrorFor(&quot;select-many-changes&quot;) is false
-PASS customErrorFor(&quot;textarea-many-changes&quot;) is false
-PASS customErrorFor(&quot;input-many-changes&quot;) is false
-PASS customErrorFor(&quot;input-submit-many-changes&quot;) is false
</del><ins>+PASS customErrorFor(&quot;select-many-changes&quot;) is true
+PASS customErrorFor(&quot;textarea-many-changes&quot;) is true
+PASS customErrorFor(&quot;input-many-changes&quot;) is true
+PASS customErrorFor(&quot;input-submit-many-changes&quot;) is true
</ins><span class="cx"> Set with three arguments.
</span><span class="cx"> PASS customErrorFor(&quot;fieldset-many-changes&quot;) is false
</span><span class="cx"> PASS customErrorFor(&quot;button-many-changes&quot;) is true
</span><span class="lines">@@ -62,22 +62,22 @@
</span><span class="cx"> PASS customErrorFor(&quot;input-submit-many-changes&quot;) is true
</span><span class="cx"> Set null.
</span><span class="cx"> PASS customErrorFor(&quot;fieldset-many-changes&quot;) is false
</span><del>-PASS customErrorFor(&quot;button-many-changes&quot;) is false
</del><ins>+PASS customErrorFor(&quot;button-many-changes&quot;) is true
</ins><span class="cx"> PASS customErrorFor(&quot;button-button-many-changes&quot;) is false
</span><span class="cx"> PASS customErrorFor(&quot;button-reset-many-changes&quot;) is false
</span><del>-PASS customErrorFor(&quot;select-many-changes&quot;) is false
-PASS customErrorFor(&quot;textarea-many-changes&quot;) is false
-PASS customErrorFor(&quot;input-many-changes&quot;) is false
-PASS customErrorFor(&quot;input-submit-many-changes&quot;) is false
</del><ins>+PASS customErrorFor(&quot;select-many-changes&quot;) is true
+PASS customErrorFor(&quot;textarea-many-changes&quot;) is true
+PASS customErrorFor(&quot;input-many-changes&quot;) is true
+PASS customErrorFor(&quot;input-submit-many-changes&quot;) is true
</ins><span class="cx"> Set some value, and set undefined.
</span><span class="cx"> PASS customErrorFor(&quot;fieldset-many-changes&quot;) is false
</span><del>-PASS customErrorFor(&quot;button-many-changes&quot;) is false
</del><ins>+PASS customErrorFor(&quot;button-many-changes&quot;) is true
</ins><span class="cx"> PASS customErrorFor(&quot;button-button-many-changes&quot;) is false
</span><span class="cx"> PASS customErrorFor(&quot;button-reset-many-changes&quot;) is false
</span><del>-PASS customErrorFor(&quot;select-many-changes&quot;) is false
-PASS customErrorFor(&quot;textarea-many-changes&quot;) is false
-PASS customErrorFor(&quot;input-many-changes&quot;) is false
-PASS customErrorFor(&quot;input-submit-many-changes&quot;) is false
</del><ins>+PASS customErrorFor(&quot;select-many-changes&quot;) is true
+PASS customErrorFor(&quot;textarea-many-changes&quot;) is true
+PASS customErrorFor(&quot;input-many-changes&quot;) is true
+PASS customErrorFor(&quot;input-submit-many-changes&quot;) is true
</ins><span class="cx"> 
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216LayoutTestsfastformsValidityStatecustomErrorhtml"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/ValidityState-customError.html (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/ValidityState-customError.html        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/ValidityState-customError.html        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -105,13 +105,13 @@
</span><span class="cx">     v[i].setCustomValidity(undefined);
</span><span class="cx"> }
</span><span class="cx"> shouldBeFalse('customErrorFor(&quot;fieldset-many-changes&quot;)');
</span><del>-shouldBeFalse('customErrorFor(&quot;button-many-changes&quot;)');
</del><ins>+shouldBeTrue('customErrorFor(&quot;button-many-changes&quot;)');
</ins><span class="cx"> shouldBeFalse('customErrorFor(&quot;button-button-many-changes&quot;)');
</span><span class="cx"> shouldBeFalse('customErrorFor(&quot;button-reset-many-changes&quot;)');
</span><del>-shouldBeFalse('customErrorFor(&quot;select-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;textarea-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;input-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;input-submit-many-changes&quot;)');
</del><ins>+shouldBeTrue('customErrorFor(&quot;select-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;textarea-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;input-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;input-submit-many-changes&quot;)');
</ins><span class="cx"> 
</span><span class="cx"> debug('Set with three arguments.');
</span><span class="cx"> for (i = 0; i &lt; v.length; i++)
</span><span class="lines">@@ -129,13 +129,13 @@
</span><span class="cx"> for (i = 0; i &lt; v.length; i++)
</span><span class="cx">     v[i].setCustomValidity(null);
</span><span class="cx"> shouldBeFalse('customErrorFor(&quot;fieldset-many-changes&quot;)');
</span><del>-shouldBeFalse('customErrorFor(&quot;button-many-changes&quot;)');
</del><ins>+shouldBeTrue('customErrorFor(&quot;button-many-changes&quot;)');
</ins><span class="cx"> shouldBeFalse('customErrorFor(&quot;button-button-many-changes&quot;)');
</span><span class="cx"> shouldBeFalse('customErrorFor(&quot;button-reset-many-changes&quot;)');
</span><del>-shouldBeFalse('customErrorFor(&quot;select-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;textarea-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;input-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;input-submit-many-changes&quot;)');
</del><ins>+shouldBeTrue('customErrorFor(&quot;select-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;textarea-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;input-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;input-submit-many-changes&quot;)');
</ins><span class="cx"> 
</span><span class="cx"> debug('Set some value, and set undefined.');
</span><span class="cx"> for (i = 0; i &lt; v.length; i++) {
</span><span class="lines">@@ -143,13 +143,13 @@
</span><span class="cx">     v[i].setCustomValidity(undefined);
</span><span class="cx"> }
</span><span class="cx"> shouldBeFalse('customErrorFor(&quot;fieldset-many-changes&quot;)');
</span><del>-shouldBeFalse('customErrorFor(&quot;button-many-changes&quot;)');
</del><ins>+shouldBeTrue('customErrorFor(&quot;button-many-changes&quot;)');
</ins><span class="cx"> shouldBeFalse('customErrorFor(&quot;button-button-many-changes&quot;)');
</span><span class="cx"> shouldBeFalse('customErrorFor(&quot;button-reset-many-changes&quot;)');
</span><del>-shouldBeFalse('customErrorFor(&quot;select-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;textarea-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;input-many-changes&quot;)');
-shouldBeFalse('customErrorFor(&quot;input-submit-many-changes&quot;)');
</del><ins>+shouldBeTrue('customErrorFor(&quot;select-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;textarea-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;input-many-changes&quot;)');
+shouldBeTrue('customErrorFor(&quot;input-submit-many-changes&quot;)');
</ins><span class="cx"> 
</span><span class="cx"> debug('');
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216LayoutTestsfastformssetCustomValiditynullparameterexpectedtxt"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/setCustomValidity-null-parameter-expected.txt (0 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/setCustomValidity-null-parameter-expected.txt                                (rev 0)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/setCustomValidity-null-parameter-expected.txt        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Test that the parameter to setCustomValidity() is not nullable
+
+
+PASS button Element 
+PASS input Element 
+PASS select Element 
+PASS textarea Element 
+PASS fieldset Element 
+PASS keygen Element 
+PASS object Element 
+PASS output Element 
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit216LayoutTestsfastformssetCustomValiditynullparameterhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/setCustomValidity-null-parameter.html (0 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/setCustomValidity-null-parameter.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/fast/forms/setCustomValidity-null-parameter.html        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;p&gt;Test that the parameter to setCustomValidity() is not nullable&lt;/p&gt;
+&lt;script&gt;
+function testFormControl(control, name)
+{
+    test(() =&gt; {
+        assert_true(control.checkValidity(), &quot;Initial checkValidity()&quot;);
+        assert_true(control.validity.valid, &quot;Initial ValidityState.valid&quot;);
+        assert_false(control.validity.customError, &quot;Initial ValidityState.customError&quot;);
+        assert_equals(control.validationMessage, &quot;&quot;, &quot;Initial validationMessage&quot;);
+
+        control.setCustomValidity(&quot;error&quot;);
+        assert_false(control.checkValidity(), &quot;checkValidity() after setting custom validity message to 'error'&quot;);
+        assert_false(control.validity.valid, &quot;ValidityState.valid after setting custom validity message to 'error'&quot;);
+        assert_true(control.validity.customError, &quot;ValidityState.customError after setting custom validity message to 'error'&quot;);
+        assert_equals(control.validationMessage, &quot;error&quot;, &quot;validationMessage after setting custom validity message to 'error'&quot;);
+
+        control.setCustomValidity(null);
+        assert_false(control.checkValidity(), &quot;checkValidity() after setting custom validity message to null&quot;);
+        assert_false(control.validity.valid, &quot;ValidityState.valid after setting custom validity message to null&quot;);
+        assert_true(control.validity.customError, &quot;ValidityState.customError after setting custom validity message to null&quot;);
+        assert_equals(control.validationMessage, &quot;null&quot;, &quot;validationMessage after setting custom validity message to null&quot;);
+
+        control.setCustomValidity(undefined);
+        assert_false(control.checkValidity(), &quot;checkValidity() after setting custom validity message to undefined&quot;);
+        assert_false(control.validity.valid, &quot;ValidityState.valid after setting custom validity message to undefined&quot;);
+        assert_true(control.validity.customError, &quot;ValidityState.customError after setting custom validity message to undefined&quot;);
+        assert_equals(control.validationMessage, &quot;undefined&quot;, &quot;validationMessage after setting custom validity message to undefined&quot;);
+
+        control.setCustomValidity(&quot;&quot;);
+        assert_true(control.checkValidity(), &quot;checkValidity() after setting custom validity message to empty string&quot;);
+        assert_true(control.validity.valid, &quot;ValidityState.valid after setting custom validity message to empty string&quot;);
+        assert_false(control.validity.customError, &quot;ValidityState.customError after setting custom validity message to empty string&quot;);
+        assert_equals(control.validationMessage, &quot;&quot;, &quot;validationMessage after setting custom validity message to empty string&quot;);
+    }, name);
+}
+
+function testFormControlBarredFromValidation(control, name)
+{
+    test(() =&gt; {
+        assert_true(control.checkValidity(), &quot;Initial checkValidity()&quot;);
+        assert_true(control.validity.valid, &quot;Initial ValidityState.valid&quot;);
+        assert_false(control.validity.customError, &quot;Initial ValidityState.customError&quot;);
+        assert_equals(control.validationMessage, &quot;&quot;, &quot;Initial validationMessage&quot;);
+
+        control.setCustomValidity(&quot;error&quot;);
+        assert_true(control.checkValidity(), &quot;checkValidity() after setting custom validity message to 'error'&quot;);
+        assert_true(control.validity.valid, &quot;ValidityState.valid after setting custom validity message to 'error'&quot;);
+        assert_false(control.validity.customError, &quot;ValidityState.customError after setting custom validity message to 'error'&quot;);
+        assert_equals(control.validationMessage, &quot;&quot;, &quot;validationMessage after setting custom validity message to 'error'&quot;);
+
+        control.setCustomValidity(&quot;&quot;);
+        assert_true(control.checkValidity(), &quot;checkValidity() after setting custom validity message to empty string&quot;);
+        assert_true(control.validity.valid, &quot;ValidityState.valid after setting custom validity message to empty string&quot;);
+        assert_false(control.validity.customError, &quot;ValidityState.customError after setting custom validity message to empty string&quot;);
+        assert_equals(control.validationMessage, &quot;&quot;, &quot;validationMessage after setting custom validity message to empty string&quot;);
+    }, name);
+}
+
+testFormControl(document.createElement(&quot;button&quot;), &quot;button Element&quot;);
+testFormControl(document.createElement(&quot;input&quot;), &quot;input Element&quot;);
+testFormControl(document.createElement(&quot;select&quot;), &quot;select Element&quot;);
+testFormControl(document.createElement(&quot;textarea&quot;), &quot;textarea Element&quot;);
+
+// The following controls are not validated in WebKit (only object seems to be barred from validation in the specification).
+testFormControlBarredFromValidation(document.createElement(&quot;fieldset&quot;), &quot;fieldset Element&quot;);
+testFormControlBarredFromValidation(document.createElement(&quot;keygen&quot;), &quot;keygen Element&quot;);
+testFormControlBarredFromValidation(document.createElement(&quot;object&quot;), &quot;object Element&quot;);
+testFormControlBarredFromValidation(document.createElement(&quot;output&quot;), &quot;output Element&quot;);
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2017-03-08  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Parameter to input.setCustomValidity() should not be nullable
+        https://bugs.webkit.org/show_bug.cgi?id=169332
+
+        Reviewed by Sam Weinig.
+
+        Parameter to input.setCustomValidity() should not be nullable:
+        - https://html.spec.whatwg.org/#htmlinputelement
+
+        Firefox and Chrome agree with the specification so the change
+        should be safe.
+
+        Test: fast/forms/setCustomValidity-null-parameter.html
+
+        * html/HTMLButtonElement.idl:
+        * html/HTMLFieldSetElement.idl:
+        * html/HTMLInputElement.idl:
+        * html/HTMLKeygenElement.idl:
+        * html/HTMLObjectElement.idl:
+        * html/HTMLOutputElement.idl:
+        * html/HTMLSelectElement.idl:
+        * html/HTMLTextAreaElement.idl:
+
</ins><span class="cx"> 2017-03-08  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSS Multicolumn should not clip columns horizontally
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLButtonElementidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLButtonElement.idl (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLButtonElement.idl        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLButtonElement.idl        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     readonly attribute DOMString validationMessage;
</span><span class="cx">     boolean checkValidity();
</span><span class="cx">     [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
</span><del>-    void setCustomValidity(DOMString? error);
</del><ins>+    void setCustomValidity(DOMString error);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute NodeList labels;
</span><span class="cx"> };
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLFieldSetElementidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLFieldSetElement.idl (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLFieldSetElement.idl        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLFieldSetElement.idl        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -31,5 +31,5 @@
</span><span class="cx">     readonly attribute DOMString       validationMessage;
</span><span class="cx">     boolean  checkValidity();
</span><span class="cx">     [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
</span><del>-    void     setCustomValidity(DOMString? error);
</del><ins>+    void setCustomValidity(DOMString error);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLInputElementidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLInputElement.idl (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLInputElement.idl        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLInputElement.idl        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     readonly attribute DOMString validationMessage;
</span><span class="cx">     boolean checkValidity();
</span><span class="cx">     [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
</span><del>-    void setCustomValidity(DOMString? error);
</del><ins>+    void setCustomValidity(DOMString error);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute NodeList labels;
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLKeygenElementidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLKeygenElement.idl (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLKeygenElement.idl        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLKeygenElement.idl        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     readonly attribute DOMString validationMessage;
</span><span class="cx">     boolean checkValidity();
</span><span class="cx">     [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
</span><del>-    void setCustomValidity(DOMString? error);
</del><ins>+    void setCustomValidity(DOMString error);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute NodeList labels;
</span><span class="cx"> };
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLObjectElementidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLObjectElement.idl (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLObjectElement.idl        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLObjectElement.idl        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">     readonly attribute DOMString validationMessage;
</span><span class="cx">     boolean checkValidity();
</span><span class="cx">     [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
</span><del>-    void setCustomValidity(DOMString? error);
</del><ins>+    void setCustomValidity(DOMString error);
</ins><span class="cx"> 
</span><span class="cx">     [CheckSecurityForNode] readonly attribute Document contentDocument;
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLOutputElementidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLOutputElement.idl (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLOutputElement.idl        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLOutputElement.idl        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">     readonly attribute DOMString validationMessage;
</span><span class="cx">     boolean checkValidity();
</span><span class="cx">     [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
</span><del>-    void setCustomValidity(DOMString? error);
</del><ins>+    void setCustomValidity(DOMString error);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute NodeList labels;
</span><span class="cx"> };
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLSelectElementidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLSelectElement.idl (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLSelectElement.idl        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLSelectElement.idl        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     readonly attribute DOMString validationMessage;
</span><span class="cx">     boolean checkValidity();
</span><span class="cx">     [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
</span><del>-    void setCustomValidity(DOMString? error); // FIXME: Argument should not be nullable.
</del><ins>+    void setCustomValidity(DOMString error);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute NodeList labels;
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCorehtmlHTMLTextAreaElementidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLTextAreaElement.idl (213833 => 213834)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLTextAreaElement.idl        2017-03-13 12:01:02 UTC (rev 213833)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/html/HTMLTextAreaElement.idl        2017-03-13 12:06:06 UTC (rev 213834)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     readonly attribute DOMString validationMessage;
</span><span class="cx">     boolean checkValidity();
</span><span class="cx">     [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
</span><del>-    void setCustomValidity(DOMString? error);
</del><ins>+    void setCustomValidity(DOMString error);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute NodeList labels;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>