<!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>[205524] 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/205524">205524</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-09-06 17:00:12 -0700 (Tue, 06 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add support for input.minLength / textArea.minLength
https://bugs.webkit.org/show_bug.cgi?id=161644
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Rebaseline several W3C tests now that more checks are passing.
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-tooShort-expected.txt:
Source/WebCore:
Add support for input.minLength / textArea.minLength:
- https://html.spec.whatwg.org/#dom-input-minlength
- https://html.spec.whatwg.org/#dom-textarea-minlength
Chrome implements this, Firefox does not yet.
No new tests, rebaselined existing tests.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::tooShort):
(WebCore::FormAssociatedElement::valid):
(WebCore::FormAssociatedElement::typeMismatch): Deleted.
* html/FormAssociatedElement.h:
* html/HTMLAttributeNames.in:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::isValidValue):
(WebCore::HTMLInputElement::tooShort):
(WebCore::HTMLInputElement::tooLong):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::effectiveMaxLength):
(WebCore::HTMLInputElement::maxLengthAttributeChanged):
(WebCore::HTMLInputElement::minLengthAttributeChanged):
(WebCore::HTMLInputElement::patternMismatch): Deleted.
(WebCore::parseAcceptAttribute): Deleted.
(WebCore::HTMLInputElement::isEnumeratable): Deleted.
(WebCore::HTMLInputElement::supportLabels): Deleted.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::supportsMinLength):
(WebCore::HTMLInputElement::supportsMaxLength): Deleted.
* html/HTMLInputElement.idl:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
(WebCore::HTMLTextAreaElement::minLengthAttributeChanged):
(WebCore::HTMLTextAreaElement::validationMessage):
(WebCore::HTMLTextAreaElement::tooShort):
(WebCore::HTMLTextAreaElement::tooLong):
(WebCore::HTMLTextAreaElement::isValidValue):
* html/HTMLTextAreaElement.h:
* html/HTMLTextAreaElement.idl:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setMaxLength):
(WebCore::HTMLTextFormControlElement::setMinLength):
* html/HTMLTextFormControlElement.h:
(WebCore::HTMLTextFormControlElement::maxLength):
(WebCore::HTMLTextFormControlElement::setMaxLength):
(WebCore::HTMLTextFormControlElement::minLength):
(WebCore::HTMLTextFormControlElement::setMinLength):
* html/InputType.cpp:
(WebCore::InputType::validationMessage):
* html/ValidityState.idl:
* platform/LocalizedStrings.cpp:
(WebCore::validationMessageTooShortText):
* platform/LocalizedStrings.h:
Source/WebKit/mac:
Update ObjC bindings to reflect method renaming.
* DOM/DOMHTMLInputElement.mm:
(-[DOMHTMLInputElement maxLength]):
(-[DOMHTMLInputElement setMaxLength:]):
* DOM/DOMHTMLTextAreaElement.mm:
(-[DOMHTMLTextAreaElement maxLength]):
(-[DOMHTMLTextAreaElement setMaxLength:]):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastformsValidityState001html">trunk/LayoutTests/fast/forms/ValidityState-001.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsformsconstraintsformvalidationvaliditytooShortexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-tooShort-expected.txt</a></li>
<li><a href="#trunkSourceWTFwtftextTextBreakIteratorcpp">trunk/Source/WTF/wtf/text/TextBreakIterator.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextTextBreakIteratorh">trunk/Source/WTF/wtf/text/TextBreakIterator.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlFormAssociatedElementcpp">trunk/Source/WebCore/html/FormAssociatedElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlFormAssociatedElementh">trunk/Source/WebCore/html/FormAssociatedElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAttributeNamesin">trunk/Source/WebCore/html/HTMLAttributeNames.in</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementh">trunk/Source/WebCore/html/HTMLInputElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementidl">trunk/Source/WebCore/html/HTMLInputElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextAreaElementcpp">trunk/Source/WebCore/html/HTMLTextAreaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextAreaElementh">trunk/Source/WebCore/html/HTMLTextAreaElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextAreaElementidl">trunk/Source/WebCore/html/HTMLTextAreaElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextFormControlElementcpp">trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextFormControlElementh">trunk/Source/WebCore/html/HTMLTextFormControlElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlInputTypecpp">trunk/Source/WebCore/html/InputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlTextFieldInputTypecpp">trunk/Source/WebCore/html/TextFieldInputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlValidityStateidl">trunk/Source/WebCore/html/ValidityState.idl</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizedStringscpp">trunk/Source/WebCore/platform/LocalizedStrings.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizedStringsh">trunk/Source/WebCore/platform/LocalizedStrings.h</a></li>
<li><a href="#trunkSourceWebCoreplatformeflLocalizedStringsEflcpp">trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgtkLocalizedStringsGtkcpp">trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMHTMLInputElementmm">trunk/Source/WebKit/mac/DOM/DOMHTMLInputElement.mm</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMHTMLTextAreaElementmm">trunk/Source/WebKit/mac/DOM/DOMHTMLTextAreaElement.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsfastformsValidityState001html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/ValidityState-001.html (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/ValidityState-001.html        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/LayoutTests/fast/forms/ValidityState-001.html        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> v = document.getElementsByName("victim");
</span><span class="cx">
</span><span class="cx"> for (i = 0; i < v.length; i++)
</span><del>- log('Test for ' + v[i].tagName + ': ' + ((v[i].validity && countAttr(v[i].validity) == 10) ? "SUCCESS" : "FAILURE"));
</del><ins>+ log('Test for ' + v[i].tagName + ': ' + ((v[i].validity && countAttr(v[i].validity) == 11) ? "SUCCESS" : "FAILURE"));
</ins><span class="cx"> }
</span><span class="cx"> </script>
</span><span class="cx"> </head>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2016-09-06 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Add support for input.minLength / textArea.minLength
+ https://bugs.webkit.org/show_bug.cgi?id=161644
+
+ Reviewed by Darin Adler.
+
+ Rebaseline several W3C tests now that more checks are passing.
+
+ * web-platform-tests/html/dom/interfaces-expected.txt:
+ * web-platform-tests/html/semantics/forms/constraints/form-validation-validity-tooShort-expected.txt:
+
+2016-09-06 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Align srcset attribute parsing with the HTML specification
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=161636
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -2706,7 +2706,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: attribute max
</span><span class="cx"> PASS HTMLInputElement interface: attribute maxLength
</span><span class="cx"> PASS HTMLInputElement interface: attribute min
</span><del>-FAIL HTMLInputElement interface: attribute minLength assert_true: The prototype object must have a property "minLength" expected true got false
</del><ins>+PASS HTMLInputElement interface: attribute minLength
</ins><span class="cx"> PASS HTMLInputElement interface: attribute multiple
</span><span class="cx"> PASS HTMLInputElement interface: attribute name
</span><span class="cx"> PASS HTMLInputElement interface: attribute pattern
</span><span class="lines">@@ -2766,7 +2766,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: document.createElement("input") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: document.createElement("input") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: document.createElement("input") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: document.createElement("input") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: document.createElement("input") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: document.createElement("input") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: document.createElement("input") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: document.createElement("input") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -2832,7 +2832,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("text") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("text") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("text") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("text") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("text") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("text") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("text") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("text") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -2898,7 +2898,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("hidden") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("hidden") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("hidden") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("hidden") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("hidden") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("hidden") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("hidden") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("hidden") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -2964,7 +2964,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("search") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("search") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("search") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("search") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("search") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("search") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("search") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("search") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3030,7 +3030,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("tel") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("tel") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("tel") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("tel") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("tel") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("tel") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("tel") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("tel") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3096,7 +3096,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("url") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("url") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("url") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("url") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("url") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("url") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("url") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("url") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3162,7 +3162,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("email") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("email") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("email") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("email") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("email") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("email") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("email") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("email") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3228,7 +3228,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("password") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("password") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("password") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("password") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("password") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("password") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("password") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("password") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3294,7 +3294,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("date") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("date") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("date") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("date") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("date") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("date") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("date") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("date") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3360,7 +3360,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("month") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("month") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("month") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("month") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("month") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("month") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("month") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("month") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3426,7 +3426,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("week") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("week") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("week") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("week") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("week") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("week") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("week") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("week") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3492,7 +3492,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("time") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("time") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("time") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("time") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("time") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("time") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("time") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("time") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3558,7 +3558,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("datetime-local") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("datetime-local") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("datetime-local") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("datetime-local") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("datetime-local") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("datetime-local") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("datetime-local") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("datetime-local") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3624,7 +3624,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("number") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("number") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("number") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("number") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("number") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("number") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("number") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("number") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3690,7 +3690,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("range") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("range") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("range") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("range") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("range") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("range") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("range") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("range") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3756,7 +3756,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("color") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("color") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("color") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("color") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("color") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("color") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("color") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("color") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3822,7 +3822,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("checkbox") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("checkbox") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("checkbox") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("checkbox") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("checkbox") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("checkbox") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("checkbox") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("checkbox") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3888,7 +3888,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("radio") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("radio") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("radio") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("radio") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("radio") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("radio") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("radio") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("radio") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -3954,7 +3954,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("file") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("file") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("file") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("file") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("file") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("file") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("file") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("file") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -4020,7 +4020,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("submit") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("submit") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("submit") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("submit") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("submit") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("submit") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("submit") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("submit") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -4086,7 +4086,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("image") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("image") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("image") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("image") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("image") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("image") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("image") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("image") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -4152,7 +4152,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("reset") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("reset") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("reset") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("reset") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("reset") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("reset") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("reset") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("reset") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -4218,7 +4218,7 @@
</span><span class="cx"> PASS HTMLInputElement interface: createInput("button") must inherit property "max" with the proper type (19)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("button") must inherit property "maxLength" with the proper type (20)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("button") must inherit property "min" with the proper type (21)
</span><del>-FAIL HTMLInputElement interface: createInput("button") must inherit property "minLength" with the proper type (22) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLInputElement interface: createInput("button") must inherit property "minLength" with the proper type (22)
</ins><span class="cx"> PASS HTMLInputElement interface: createInput("button") must inherit property "multiple" with the proper type (23)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("button") must inherit property "name" with the proper type (24)
</span><span class="cx"> PASS HTMLInputElement interface: createInput("button") must inherit property "pattern" with the proper type (25)
</span><span class="lines">@@ -4436,7 +4436,7 @@
</span><span class="cx"> PASS HTMLTextAreaElement interface: attribute form
</span><span class="cx"> FAIL HTMLTextAreaElement interface: attribute inputMode assert_true: The prototype object must have a property "inputMode" expected true got false
</span><span class="cx"> PASS HTMLTextAreaElement interface: attribute maxLength
</span><del>-FAIL HTMLTextAreaElement interface: attribute minLength assert_true: The prototype object must have a property "minLength" expected true got false
</del><ins>+PASS HTMLTextAreaElement interface: attribute minLength
</ins><span class="cx"> PASS HTMLTextAreaElement interface: attribute name
</span><span class="cx"> PASS HTMLTextAreaElement interface: attribute placeholder
</span><span class="cx"> PASS HTMLTextAreaElement interface: attribute readOnly
</span><span class="lines">@@ -4471,7 +4471,7 @@
</span><span class="cx"> PASS HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "form" with the proper type (5)
</span><span class="cx"> FAIL HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "inputMode" with the proper type (6) assert_inherits: property "inputMode" not found in prototype chain
</span><span class="cx"> PASS HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "maxLength" with the proper type (7)
</span><del>-FAIL HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "minLength" with the proper type (8) assert_inherits: property "minLength" not found in prototype chain
</del><ins>+PASS HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "minLength" with the proper type (8)
</ins><span class="cx"> PASS HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "name" with the proper type (9)
</span><span class="cx"> PASS HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "placeholder" with the proper type (10)
</span><span class="cx"> PASS HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "readOnly" with the proper type (11)
</span><span class="lines">@@ -4650,7 +4650,7 @@
</span><span class="cx"> PASS ValidityState interface: attribute typeMismatch
</span><span class="cx"> PASS ValidityState interface: attribute patternMismatch
</span><span class="cx"> PASS ValidityState interface: attribute tooLong
</span><del>-FAIL ValidityState interface: attribute tooShort assert_true: The prototype object must have a property "tooShort" expected true got false
</del><ins>+PASS ValidityState interface: attribute tooShort
</ins><span class="cx"> PASS ValidityState interface: attribute rangeUnderflow
</span><span class="cx"> PASS ValidityState interface: attribute rangeOverflow
</span><span class="cx"> PASS ValidityState interface: attribute stepMismatch
</span><span class="lines">@@ -4663,7 +4663,7 @@
</span><span class="cx"> PASS ValidityState interface: document.createElement("input").validity must inherit property "typeMismatch" with the proper type (1)
</span><span class="cx"> PASS ValidityState interface: document.createElement("input").validity must inherit property "patternMismatch" with the proper type (2)
</span><span class="cx"> PASS ValidityState interface: document.createElement("input").validity must inherit property "tooLong" with the proper type (3)
</span><del>-FAIL ValidityState interface: document.createElement("input").validity must inherit property "tooShort" with the proper type (4) assert_inherits: property "tooShort" not found in prototype chain
</del><ins>+PASS ValidityState interface: document.createElement("input").validity must inherit property "tooShort" with the proper type (4)
</ins><span class="cx"> PASS ValidityState interface: document.createElement("input").validity must inherit property "rangeUnderflow" with the proper type (5)
</span><span class="cx"> PASS ValidityState interface: document.createElement("input").validity must inherit property "rangeOverflow" with the proper type (6)
</span><span class="cx"> PASS ValidityState interface: document.createElement("input").validity must inherit property "stepMismatch" with the proper type (7)
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsformsconstraintsformvalidationvaliditytooShortexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-tooShort-expected.txt (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-tooShort-expected.txt        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-tooShort-expected.txt        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -1,65 +1,65 @@
</span><span class="cx">
</span><del>-FAIL [INPUT in TEXT status] Non-dirty value - minLength is not set assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEXT status] Non-dirty value - value is empty string assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEXT status] Non-dirty value - length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEXT status] Non-dirty value - length of value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEXT status] Non-dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEXT status] Dirty value - value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEXT status] Dirty value - length of value(AAAAA) in unicode is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEXT status] Dirty value - value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEXT status] Dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Non-dirty value - minLength is not set assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Non-dirty value - value is empty string assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Non-dirty value - length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Non-dirty value - length of value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Non-dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Dirty value - value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Dirty value - length of value(AAAAA) in unicode is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Dirty value - value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in SEARCH status] Dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Non-dirty value - minLength is not set assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Non-dirty value - value is empty string assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Non-dirty value - length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Non-dirty value - length of value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Non-dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Dirty value - value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Dirty value - length of value(AAAAA) in unicode is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Dirty value - value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in TEL status] Dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Non-dirty value - minLength is not set assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Non-dirty value - value is empty string assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Non-dirty value - length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Non-dirty value - length of value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Non-dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Dirty value - value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Dirty value - length of value(AAAAA) in unicode is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Dirty value - value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in URL status] Dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Non-dirty value - minLength is not set assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Non-dirty value - value is empty string assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Non-dirty value - length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Non-dirty value - length of value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Non-dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Dirty value - value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Dirty value - length of value(AAAAA) in unicode is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Dirty value - value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in EMAIL status] Dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Non-dirty value - minLength is not set assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Non-dirty value - value is empty string assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Non-dirty value - length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Non-dirty value - length of value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Non-dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Dirty value - value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Dirty value - length of value(AAAAA) in unicode is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Dirty value - value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [INPUT in PASSWORD status] Dirty value - length of value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Non-dirty value - minLength is no set assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Non-dirty value - value is empty string assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Non-dirty value - length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Non-dirty value - length of value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Non-dirty value - length of length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Dirty value - value is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Dirty value - length of value(LF, CRLF) in unicode is less than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Dirty value - length of value equals to minLength assert_true: The tooShort attribute doesn't exist. expected true got false
-FAIL [textarea] Dirty value - length of value is greater than minLength assert_true: The tooShort attribute doesn't exist. expected true got false
</del><ins>+PASS [INPUT in TEXT status] Non-dirty value - minLength is not set
+PASS [INPUT in TEXT status] Non-dirty value - value is empty string
+PASS [INPUT in TEXT status] Non-dirty value - length of value is greater than minLength
+PASS [INPUT in TEXT status] Non-dirty value - length of value equals to minLength
+PASS [INPUT in TEXT status] Non-dirty value - length of value is less than minLength
+PASS [INPUT in TEXT status] Dirty value - value is greater than minLength
+PASS [INPUT in TEXT status] Dirty value - length of value(AAAAA) in unicode is greater than minLength
+PASS [INPUT in TEXT status] Dirty value - value equals to minLength
+PASS [INPUT in TEXT status] Dirty value - length of value is less than minLength
+PASS [INPUT in SEARCH status] Non-dirty value - minLength is not set
+PASS [INPUT in SEARCH status] Non-dirty value - value is empty string
+PASS [INPUT in SEARCH status] Non-dirty value - length of value is greater than minLength
+PASS [INPUT in SEARCH status] Non-dirty value - length of value equals to minLength
+PASS [INPUT in SEARCH status] Non-dirty value - length of value is less than minLength
+PASS [INPUT in SEARCH status] Dirty value - value is greater than minLength
+PASS [INPUT in SEARCH status] Dirty value - length of value(AAAAA) in unicode is greater than minLength
+PASS [INPUT in SEARCH status] Dirty value - value equals to minLength
+PASS [INPUT in SEARCH status] Dirty value - length of value is less than minLength
+PASS [INPUT in TEL status] Non-dirty value - minLength is not set
+PASS [INPUT in TEL status] Non-dirty value - value is empty string
+PASS [INPUT in TEL status] Non-dirty value - length of value is greater than minLength
+PASS [INPUT in TEL status] Non-dirty value - length of value equals to minLength
+PASS [INPUT in TEL status] Non-dirty value - length of value is less than minLength
+PASS [INPUT in TEL status] Dirty value - value is greater than minLength
+PASS [INPUT in TEL status] Dirty value - length of value(AAAAA) in unicode is greater than minLength
+PASS [INPUT in TEL status] Dirty value - value equals to minLength
+PASS [INPUT in TEL status] Dirty value - length of value is less than minLength
+PASS [INPUT in URL status] Non-dirty value - minLength is not set
+PASS [INPUT in URL status] Non-dirty value - value is empty string
+PASS [INPUT in URL status] Non-dirty value - length of value is greater than minLength
+PASS [INPUT in URL status] Non-dirty value - length of value equals to minLength
+PASS [INPUT in URL status] Non-dirty value - length of value is less than minLength
+PASS [INPUT in URL status] Dirty value - value is greater than minLength
+PASS [INPUT in URL status] Dirty value - length of value(AAAAA) in unicode is greater than minLength
+PASS [INPUT in URL status] Dirty value - value equals to minLength
+PASS [INPUT in URL status] Dirty value - length of value is less than minLength
+PASS [INPUT in EMAIL status] Non-dirty value - minLength is not set
+PASS [INPUT in EMAIL status] Non-dirty value - value is empty string
+PASS [INPUT in EMAIL status] Non-dirty value - length of value is greater than minLength
+PASS [INPUT in EMAIL status] Non-dirty value - length of value equals to minLength
+PASS [INPUT in EMAIL status] Non-dirty value - length of value is less than minLength
+PASS [INPUT in EMAIL status] Dirty value - value is greater than minLength
+PASS [INPUT in EMAIL status] Dirty value - length of value(AAAAA) in unicode is greater than minLength
+PASS [INPUT in EMAIL status] Dirty value - value equals to minLength
+PASS [INPUT in EMAIL status] Dirty value - length of value is less than minLength
+PASS [INPUT in PASSWORD status] Non-dirty value - minLength is not set
+PASS [INPUT in PASSWORD status] Non-dirty value - value is empty string
+PASS [INPUT in PASSWORD status] Non-dirty value - length of value is greater than minLength
+PASS [INPUT in PASSWORD status] Non-dirty value - length of value equals to minLength
+PASS [INPUT in PASSWORD status] Non-dirty value - length of value is less than minLength
+PASS [INPUT in PASSWORD status] Dirty value - value is greater than minLength
+PASS [INPUT in PASSWORD status] Dirty value - length of value(AAAAA) in unicode is greater than minLength
+PASS [INPUT in PASSWORD status] Dirty value - value equals to minLength
+PASS [INPUT in PASSWORD status] Dirty value - length of value is less than minLength
+PASS [textarea] Non-dirty value - minLength is no set
+PASS [textarea] Non-dirty value - value is empty string
+PASS [textarea] Non-dirty value - length of value is greater than minLength
+PASS [textarea] Non-dirty value - length of value equals to minLength
+PASS [textarea] Non-dirty value - length of length of value is greater than minLength
+PASS [textarea] Dirty value - value is less than minLength
+PASS [textarea] Dirty value - length of value(LF, CRLF) in unicode is less than minLength
+PASS [textarea] Dirty value - length of value equals to minLength
+PASS [textarea] Dirty value - length of value is greater than minLength
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWTFwtftextTextBreakIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/TextBreakIterator.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/TextBreakIterator.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WTF/wtf/text/TextBreakIterator.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -894,18 +894,18 @@
</span><span class="cx"> return ruleStatus != UBRK_WORD_NONE;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned numGraphemeClusters(const String& s)
</del><ins>+unsigned numGraphemeClusters(StringView string)
</ins><span class="cx"> {
</span><del>- unsigned stringLength = s.length();
</del><ins>+ unsigned stringLength = string.length();
</ins><span class="cx">
</span><span class="cx"> if (!stringLength)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> // The only Latin-1 Extended Grapheme Cluster is CR LF
</span><del>- if (s.is8Bit() && !s.contains('\r'))
</del><ins>+ if (string.is8Bit() && !string.contains('\r'))
</ins><span class="cx"> return stringLength;
</span><span class="cx">
</span><del>- NonSharedCharacterBreakIterator it(s);
</del><ins>+ NonSharedCharacterBreakIterator it(string);
</ins><span class="cx"> if (!it)
</span><span class="cx"> return stringLength;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWTFwtftextTextBreakIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/TextBreakIterator.h (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/TextBreakIterator.h        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WTF/wtf/text/TextBreakIterator.h        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx"> // Counts the number of grapheme clusters. A surrogate pair or a sequence
</span><span class="cx"> // of a non-combining character and following combining characters is
</span><span class="cx"> // counted as 1 grapheme cluster.
</span><del>-WTF_EXPORT_PRIVATE unsigned numGraphemeClusters(const String&);
</del><ins>+WTF_EXPORT_PRIVATE unsigned numGraphemeClusters(StringView);
</ins><span class="cx"> // Returns the number of characters which will be less than or equal to
</span><span class="cx"> // the specified grapheme cluster length.
</span><span class="cx"> WTF_EXPORT_PRIVATE unsigned numCharactersInGraphemeClusters(const StringView&, unsigned);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/ChangeLog        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -1,3 +1,66 @@
</span><ins>+2016-09-06 Chris Dumez <cdumez@apple.com>
+
+ Add support for input.minLength / textArea.minLength
+ https://bugs.webkit.org/show_bug.cgi?id=161644
+
+ Reviewed by Darin Adler.
+
+ Add support for input.minLength / textArea.minLength:
+ - https://html.spec.whatwg.org/#dom-input-minlength
+ - https://html.spec.whatwg.org/#dom-textarea-minlength
+
+ Chrome implements this, Firefox does not yet.
+
+ No new tests, rebaselined existing tests.
+
+ * html/FormAssociatedElement.cpp:
+ (WebCore::FormAssociatedElement::tooShort):
+ (WebCore::FormAssociatedElement::valid):
+ (WebCore::FormAssociatedElement::typeMismatch): Deleted.
+ * html/FormAssociatedElement.h:
+ * html/HTMLAttributeNames.in:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::HTMLInputElement):
+ (WebCore::HTMLInputElement::isValidValue):
+ (WebCore::HTMLInputElement::tooShort):
+ (WebCore::HTMLInputElement::tooLong):
+ (WebCore::HTMLInputElement::parseAttribute):
+ (WebCore::HTMLInputElement::effectiveMaxLength):
+ (WebCore::HTMLInputElement::maxLengthAttributeChanged):
+ (WebCore::HTMLInputElement::minLengthAttributeChanged):
+ (WebCore::HTMLInputElement::patternMismatch): Deleted.
+ (WebCore::parseAcceptAttribute): Deleted.
+ (WebCore::HTMLInputElement::isEnumeratable): Deleted.
+ (WebCore::HTMLInputElement::supportLabels): Deleted.
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::supportsMinLength):
+ (WebCore::HTMLInputElement::supportsMaxLength): Deleted.
+ * html/HTMLInputElement.idl:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::parseAttribute):
+ (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
+ (WebCore::HTMLTextAreaElement::minLengthAttributeChanged):
+ (WebCore::HTMLTextAreaElement::validationMessage):
+ (WebCore::HTMLTextAreaElement::tooShort):
+ (WebCore::HTMLTextAreaElement::tooLong):
+ (WebCore::HTMLTextAreaElement::isValidValue):
+ * html/HTMLTextAreaElement.h:
+ * html/HTMLTextAreaElement.idl:
+ * html/HTMLTextFormControlElement.cpp:
+ (WebCore::HTMLTextFormControlElement::setMaxLength):
+ (WebCore::HTMLTextFormControlElement::setMinLength):
+ * html/HTMLTextFormControlElement.h:
+ (WebCore::HTMLTextFormControlElement::maxLength):
+ (WebCore::HTMLTextFormControlElement::setMaxLength):
+ (WebCore::HTMLTextFormControlElement::minLength):
+ (WebCore::HTMLTextFormControlElement::setMinLength):
+ * html/InputType.cpp:
+ (WebCore::InputType::validationMessage):
+ * html/ValidityState.idl:
+ * platform/LocalizedStrings.cpp:
+ (WebCore::validationMessageTooShortText):
+ * platform/LocalizedStrings.h:
+
</ins><span class="cx"> 2016-09-06 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Punycode encode non-ascii hosts in URLParser
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFormAssociatedElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FormAssociatedElement.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FormAssociatedElement.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/FormAssociatedElement.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -222,6 +222,11 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool FormAssociatedElement::tooShort() const
+{
+ return false;
+}
+
</ins><span class="cx"> bool FormAssociatedElement::tooLong() const
</span><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="lines">@@ -235,7 +240,7 @@
</span><span class="cx"> bool FormAssociatedElement::valid() const
</span><span class="cx"> {
</span><span class="cx"> bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow()
</span><del>- || tooLong() || patternMismatch() || valueMissing() || hasBadInput() || customError();
</del><ins>+ || tooShort() || tooLong() || patternMismatch() || valueMissing() || hasBadInput() || customError();
</ins><span class="cx"> return !someError;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFormAssociatedElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FormAssociatedElement.h (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FormAssociatedElement.h        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/FormAssociatedElement.h        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -72,12 +72,13 @@
</span><span class="cx"> bool badInput() const { return hasBadInput(); }
</span><span class="cx"> bool customError() const;
</span><span class="cx">
</span><del>- // Implementations of patternMismatch, rangeOverflow, rangerUnderflow, stepMismatch, tooLong and valueMissing must call willValidate.
</del><ins>+ // Implementations of patternMismatch, rangeOverflow, rangerUnderflow, stepMismatch, tooShort, tooLong and valueMissing must call willValidate.
</ins><span class="cx"> virtual bool hasBadInput() const;
</span><span class="cx"> virtual bool patternMismatch() const;
</span><span class="cx"> virtual bool rangeOverflow() const;
</span><span class="cx"> virtual bool rangeUnderflow() const;
</span><span class="cx"> virtual bool stepMismatch() const;
</span><ins>+ virtual bool tooShort() const;
</ins><span class="cx"> virtual bool tooLong() const;
</span><span class="cx"> virtual bool typeMismatch() const;
</span><span class="cx"> virtual bool valueMissing() const;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAttributeNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAttributeNames.in        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -164,6 +164,7 @@
</span><span class="cx"> marginwidth
</span><span class="cx"> max
</span><span class="cx"> maxlength
</span><ins>+minlength
</ins><span class="cx"> mayscript
</span><span class="cx"> media
</span><span class="cx"> mediagroup
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -96,7 +96,6 @@
</span><span class="cx"> HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document& document, HTMLFormElement* form, bool createdByParser)
</span><span class="cx"> : HTMLTextFormControlElement(tagName, document, form)
</span><span class="cx"> , m_size(defaultSize)
</span><del>- , m_maxLength(-1)
</del><span class="cx"> , m_maxResults(-1)
</span><span class="cx"> , m_isChecked(false)
</span><span class="cx"> , m_reflectsCheckedAttribute(true)
</span><span class="lines">@@ -248,11 +247,17 @@
</span><span class="cx"> && !m_inputType->stepMismatch(value)
</span><span class="cx"> && !m_inputType->rangeUnderflow(value)
</span><span class="cx"> && !m_inputType->rangeOverflow(value)
</span><ins>+ && !tooShort(value, IgnoreDirtyFlag)
</ins><span class="cx"> && !tooLong(value, IgnoreDirtyFlag)
</span><span class="cx"> && !m_inputType->patternMismatch(value)
</span><span class="cx"> && !m_inputType->valueMissing(value);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool HTMLInputElement::tooShort() const
+{
+ return willValidate() && tooShort(value(), CheckDirtyFlag);
+}
+
</ins><span class="cx"> bool HTMLInputElement::tooLong() const
</span><span class="cx"> {
</span><span class="cx"> return willValidate() && tooLong(value(), CheckDirtyFlag);
</span><span class="lines">@@ -278,12 +283,34 @@
</span><span class="cx"> return willValidate() && m_inputType->patternMismatch(value());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool HTMLInputElement::tooLong(const String& value, NeedsToCheckDirtyFlag check) const
</del><ins>+bool HTMLInputElement::tooShort(StringView value, NeedsToCheckDirtyFlag check) const
</ins><span class="cx"> {
</span><del>- // We use isTextType() instead of supportsMaxLength() because of the
- // 'virtual' overhead.
- if (!isTextType())
</del><ins>+ if (!supportsMinLength())
</ins><span class="cx"> return false;
</span><ins>+
+ int min = minLength();
+ if (min <= 0)
+ return false;
+
+ if (check == CheckDirtyFlag) {
+ // Return false for the default value or a value set by a script even if
+ // it is shorter than minLength.
+ if (!hasDirtyValue() || !m_wasModifiedByUser)
+ return false;
+ }
+
+ // The empty string is excluded from tooShort validation.
+ if (value.isEmpty())
+ return false;
+
+ // FIXME: The HTML specification says that the "number of characters" is measured using code-unit length.
+ return numGraphemeClusters(value) < static_cast<unsigned>(min);
+}
+
+bool HTMLInputElement::tooLong(StringView value, NeedsToCheckDirtyFlag check) const
+{
+ if (!supportsMaxLength())
+ return false;
</ins><span class="cx"> unsigned max = effectiveMaxLength();
</span><span class="cx"> if (check == CheckDirtyFlag) {
</span><span class="cx"> // Return false for the default value or a value set by a script even if
</span><span class="lines">@@ -291,6 +318,7 @@
</span><span class="cx"> if (!hasDirtyValue() || !m_wasModifiedByUser)
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><ins>+ // FIXME: The HTML specification says that the "number of characters" is measured using code-unit length.
</ins><span class="cx"> return numGraphemeClusters(value) > max;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -694,6 +722,8 @@
</span><span class="cx"> }
</span><span class="cx"> } else if (name == maxlengthAttr)
</span><span class="cx"> maxLengthAttributeChanged(value);
</span><ins>+ else if (name == minAttr)
+ minLengthAttributeChanged(value);
</ins><span class="cx"> else if (name == sizeAttr) {
</span><span class="cx"> unsigned oldSize = m_size;
</span><span class="cx"> m_size = limitToOnlyHTMLNonNegativeNumbersGreaterThanZero(value, defaultSize);
</span><span class="lines">@@ -1276,7 +1306,7 @@
</span><span class="cx"> unsigned HTMLInputElement::effectiveMaxLength() const
</span><span class="cx"> {
</span><span class="cx"> // The number -1 represents no maximum at all; conveniently it becomes a super-large value when converted to unsigned.
</span><del>- return std::min<unsigned>(m_maxLength, maxEffectiveLength);
</del><ins>+ return std::min<unsigned>(maxLength(), maxEffectiveLength);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool HTMLInputElement::multiple() const
</span><span class="lines">@@ -1755,7 +1785,7 @@
</span><span class="cx"> void HTMLInputElement::maxLengthAttributeChanged(const AtomicString& newValue)
</span><span class="cx"> {
</span><span class="cx"> unsigned oldEffectiveMaxLength = effectiveMaxLength();
</span><del>- m_maxLength = parseHTMLNonNegativeInteger(newValue).valueOr(-1);
</del><ins>+ setMaxLength(parseHTMLNonNegativeInteger(newValue).valueOr(-1));
</ins><span class="cx"> if (oldEffectiveMaxLength != effectiveMaxLength())
</span><span class="cx"> updateValueIfNeeded();
</span><span class="cx">
</span><span class="lines">@@ -1764,6 +1794,18 @@
</span><span class="cx"> updateValidity();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void HTMLInputElement::minLengthAttributeChanged(const AtomicString& newValue)
+{
+ int oldMinLength = minLength();
+ setMinLength(parseHTMLNonNegativeInteger(newValue).valueOr(-1));
+ if (oldMinLength != minLength())
+ updateValueIfNeeded();
+
+ // FIXME: Do we really need to do this if the effective minLength has not changed?
+ setNeedsStyleRecalc();
+ updateValidity();
+}
+
</ins><span class="cx"> void HTMLInputElement::updateValueIfNeeded()
</span><span class="cx"> {
</span><span class="cx"> String newValue = sanitizeValue(m_valueIfDirty);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.h (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.h        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLInputElement.h        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -74,6 +74,7 @@
</span><span class="cx"> bool rangeUnderflow() const final;
</span><span class="cx"> bool rangeOverflow() const final;
</span><span class="cx"> bool stepMismatch() const final;
</span><ins>+ bool tooShort() const final;
</ins><span class="cx"> bool tooLong() const final;
</span><span class="cx"> bool typeMismatch() const final;
</span><span class="cx"> bool valueMissing() const final;
</span><span class="lines">@@ -236,7 +237,6 @@
</span><span class="cx">
</span><span class="cx"> URL src() const;
</span><span class="cx">
</span><del>- int maxLengthForBindings() const { return m_maxLength; }
</del><span class="cx"> unsigned effectiveMaxLength() const;
</span><span class="cx">
</span><span class="cx"> bool multiple() const;
</span><span class="lines">@@ -402,9 +402,11 @@
</span><span class="cx"> void registerForSuspensionCallbackIfNeeded();
</span><span class="cx"> void unregisterForSuspensionCallbackIfNeeded();
</span><span class="cx">
</span><ins>+ bool supportsMinLength() const { return isTextType(); }
</ins><span class="cx"> bool supportsMaxLength() const { return isTextType(); }
</span><span class="cx"> bool isTextType() const;
</span><del>- bool tooLong(const String&, NeedsToCheckDirtyFlag) const;
</del><ins>+ bool tooShort(StringView, NeedsToCheckDirtyFlag) const;
+ bool tooLong(StringView, NeedsToCheckDirtyFlag) const;
</ins><span class="cx">
</span><span class="cx"> bool supportsPlaceholder() const final;
</span><span class="cx"> void updatePlaceholderText() final;
</span><span class="lines">@@ -427,6 +429,7 @@
</span><span class="cx"> void resetListAttributeTargetObserver();
</span><span class="cx"> #endif
</span><span class="cx"> void maxLengthAttributeChanged(const AtomicString& newValue);
</span><ins>+ void minLengthAttributeChanged(const AtomicString& newValue);
</ins><span class="cx"> void updateValueIfNeeded();
</span><span class="cx">
</span><span class="cx"> void addToRadioButtonGroup();
</span><span class="lines">@@ -435,7 +438,6 @@
</span><span class="cx"> AtomicString m_name;
</span><span class="cx"> String m_valueIfDirty;
</span><span class="cx"> unsigned m_size;
</span><del>- int m_maxLength;
</del><span class="cx"> short m_maxResults;
</span><span class="cx"> bool m_isChecked : 1;
</span><span class="cx"> bool m_reflectsCheckedAttribute : 1;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.idl        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -44,7 +44,8 @@
</span><span class="cx"> attribute boolean indeterminate;
</span><span class="cx"> [Conditional=DATALIST_ELEMENT] readonly attribute HTMLElement list;
</span><span class="cx"> [Reflect] attribute DOMString max;
</span><del>- [ImplementedAs=maxLengthForBindings, SetterRaisesException] attribute long maxLength;
</del><ins>+ [SetterRaisesException] attribute long minLength;
+ [SetterRaisesException] attribute long maxLength;
</ins><span class="cx"> [Reflect] attribute DOMString min;
</span><span class="cx"> [Reflect] attribute boolean multiple;
</span><span class="cx"> [Reflect] attribute DOMString name;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextAreaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -61,12 +61,12 @@
</span><span class="cx">
</span><span class="cx"> // On submission, LF characters are converted into CRLF.
</span><span class="cx"> // This function returns number of characters considering this.
</span><del>-static inline unsigned computeLengthForSubmission(const String& text, unsigned numberOfLineBreaks)
</del><ins>+static inline unsigned computeLengthForSubmission(StringView text, unsigned numberOfLineBreaks)
</ins><span class="cx"> {
</span><span class="cx"> return numGraphemeClusters(text) + numberOfLineBreaks;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static unsigned numberOfLineBreaks(const String& text)
</del><ins>+static unsigned numberOfLineBreaks(StringView text)
</ins><span class="cx"> {
</span><span class="cx"> unsigned length = text.length();
</span><span class="cx"> unsigned count = 0;
</span><span class="lines">@@ -77,12 +77,12 @@
</span><span class="cx"> return count;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline unsigned computeLengthForSubmission(const String& text)
</del><ins>+static inline unsigned computeLengthForSubmission(StringView text)
</ins><span class="cx"> {
</span><span class="cx"> return numGraphemeClusters(text) + numberOfLineBreaks(text);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline unsigned upperBoundForLengthForSubmission(const String& text, unsigned numberOfLineBreaks)
</del><ins>+static inline unsigned upperBoundForLengthForSubmission(StringView text, unsigned numberOfLineBreaks)
</ins><span class="cx"> {
</span><span class="cx"> return text.length() + numberOfLineBreaks;
</span><span class="cx"> }
</span><span class="lines">@@ -197,6 +197,8 @@
</span><span class="cx"> // ignore for the moment
</span><span class="cx"> } else if (name == maxlengthAttr)
</span><span class="cx"> maxLengthAttributeChanged(value);
</span><ins>+ else if (name == minlengthAttr)
+ minLengthAttributeChanged(value);
</ins><span class="cx"> else
</span><span class="cx"> HTMLTextFormControlElement::parseAttribute(name, value);
</span><span class="cx"> }
</span><span class="lines">@@ -203,10 +205,16 @@
</span><span class="cx">
</span><span class="cx"> void HTMLTextAreaElement::maxLengthAttributeChanged(const AtomicString& newValue)
</span><span class="cx"> {
</span><del>- m_maxLength = parseHTMLNonNegativeInteger(newValue).valueOr(-1);
</del><ins>+ setMaxLength(parseHTMLNonNegativeInteger(newValue).valueOr(-1));
</ins><span class="cx"> updateValidity();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void HTMLTextAreaElement::minLengthAttributeChanged(const AtomicString& newValue)
+{
+ setMinLength(parseHTMLNonNegativeInteger(newValue).valueOr(-1));
+ updateValidity();
+}
+
</ins><span class="cx"> RenderPtr<RenderElement> HTMLTextAreaElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
</span><span class="cx"> {
</span><span class="cx"> return createRenderer<RenderTextControlMultiLine>(*this, WTFMove(style));
</span><span class="lines">@@ -432,6 +440,9 @@
</span><span class="cx"> if (valueMissing())
</span><span class="cx"> return validationMessageValueMissingText();
</span><span class="cx">
</span><ins>+ if (tooShort())
+ return validationMessageTooShortText(computeLengthForSubmission(value()), minLength());
+
</ins><span class="cx"> if (tooLong())
</span><span class="cx"> return validationMessageTooLongText(computeLengthForSubmission(value()), effectiveMaxLength());
</span><span class="cx">
</span><span class="lines">@@ -443,12 +454,40 @@
</span><span class="cx"> return willValidate() && valueMissing(value());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool HTMLTextAreaElement::tooShort() const
+{
+ return willValidate() && tooShort(value(), CheckDirtyFlag);
+}
+
+bool HTMLTextAreaElement::tooShort(StringView value, NeedsToCheckDirtyFlag check) const
+{
+ // Return false for the default value or value set by script even if it is
+ // shorter than minLength.
+ if (check == CheckDirtyFlag && !m_wasModifiedByUser)
+ return false;
+
+ int min = minLength();
+ if (min <= 0)
+ return false;
+
+ // The empty string is excluded from tooShort validation.
+ if (value.isEmpty())
+ return false;
+
+ // FIXME: The HTML specification says that the "number of characters" is measured using code-unit length and,
+ // in the case of textarea elements, with all line breaks normalized to a single character (as opposed to CRLF pairs).
+ unsigned unsignedMin = static_cast<unsigned>(min);
+ unsigned numberOfLineBreaksInValue = numberOfLineBreaks(value);
+ return upperBoundForLengthForSubmission(value, numberOfLineBreaksInValue) < unsignedMin
+ && computeLengthForSubmission(value, numberOfLineBreaksInValue) < unsignedMin;
+}
+
</ins><span class="cx"> bool HTMLTextAreaElement::tooLong() const
</span><span class="cx"> {
</span><span class="cx"> return willValidate() && tooLong(value(), CheckDirtyFlag);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool HTMLTextAreaElement::tooLong(const String& value, NeedsToCheckDirtyFlag check) const
</del><ins>+bool HTMLTextAreaElement::tooLong(StringView value, NeedsToCheckDirtyFlag check) const
</ins><span class="cx"> {
</span><span class="cx"> // Return false for the default value or value set by script even if it is
</span><span class="cx"> // longer than maxLength.
</span><span class="lines">@@ -458,6 +497,9 @@
</span><span class="cx"> int max = effectiveMaxLength();
</span><span class="cx"> if (max < 0)
</span><span class="cx"> return false;
</span><ins>+
+ // FIXME: The HTML specification says that the "number of characters" is measured using code-unit length and,
+ // in the case of textarea elements, with all line breaks normalized to a single character (as opposed to CRLF pairs).
</ins><span class="cx"> unsigned unsignedMax = static_cast<unsigned>(max);
</span><span class="cx"> unsigned numberOfLineBreaksInValue = numberOfLineBreaks(value);
</span><span class="cx"> return upperBoundForLengthForSubmission(value, numberOfLineBreaksInValue) > unsignedMax
</span><span class="lines">@@ -466,7 +508,7 @@
</span><span class="cx">
</span><span class="cx"> bool HTMLTextAreaElement::isValidValue(const String& candidate) const
</span><span class="cx"> {
</span><del>- return !valueMissing(candidate) && !tooLong(candidate, IgnoreDirtyFlag);
</del><ins>+ return !valueMissing(candidate) && !tooShort(candidate, IgnoreDirtyFlag) && !tooLong(candidate, IgnoreDirtyFlag);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLTextAreaElement::accessKeyAction(bool)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextAreaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.h (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextAreaElement.h        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.h        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -45,11 +45,11 @@
</span><span class="cx"> WEBCORE_EXPORT String defaultValue() const;
</span><span class="cx"> WEBCORE_EXPORT void setDefaultValue(const String&);
</span><span class="cx"> int textLength() const { return value().length(); }
</span><del>- int maxLengthForBindings() const { return m_maxLength; }
- int effectiveMaxLength() const { return m_maxLength; }
</del><ins>+ int effectiveMaxLength() const { return maxLength(); }
</ins><span class="cx"> // For ValidityState
</span><span class="cx"> String validationMessage() const final;
</span><span class="cx"> bool valueMissing() const final;
</span><ins>+ bool tooShort() const final;
</ins><span class="cx"> bool tooLong() const final;
</span><span class="cx"> bool isValidValue(const String&) const;
</span><span class="cx">
</span><span class="lines">@@ -73,6 +73,7 @@
</span><span class="cx"> void didAddUserAgentShadowRoot(ShadowRoot*) final;
</span><span class="cx">
</span><span class="cx"> void maxLengthAttributeChanged(const AtomicString& newValue);
</span><ins>+ void minLengthAttributeChanged(const AtomicString& newValue);
</ins><span class="cx">
</span><span class="cx"> void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent&) const;
</span><span class="cx"> static String sanitizeUserInputValue(const String&, unsigned maxLength);
</span><span class="lines">@@ -120,11 +121,11 @@
</span><span class="cx"> bool matchesReadWritePseudoClass() const final;
</span><span class="cx">
</span><span class="cx"> bool valueMissing(const String& value) const { return isRequiredFormControl() && !isDisabledOrReadOnly() && value.isEmpty(); }
</span><del>- bool tooLong(const String&, NeedsToCheckDirtyFlag) const;
</del><ins>+ bool tooShort(StringView, NeedsToCheckDirtyFlag) const;
+ bool tooLong(StringView, NeedsToCheckDirtyFlag) const;
</ins><span class="cx">
</span><span class="cx"> unsigned m_rows;
</span><span class="cx"> unsigned m_cols;
</span><del>- int m_maxLength { -1 };
</del><span class="cx"> WrapMethod m_wrap { SoftWrap };
</span><span class="cx"> RefPtr<HTMLElement> m_placeholder;
</span><span class="cx"> mutable String m_value;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextAreaElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.idl (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextAreaElement.idl        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.idl        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -24,7 +24,8 @@
</span><span class="cx"> [Reflect] attribute DOMString dirName;
</span><span class="cx"> [Reflect] attribute boolean disabled;
</span><span class="cx"> readonly attribute HTMLFormElement form;
</span><del>- [ImplementedAs=maxLengthForBindings, SetterRaisesException] attribute long maxLength;
</del><ins>+ [SetterRaisesException] attribute long minLength;
+ [SetterRaisesException] attribute long maxLength;
</ins><span class="cx"> [Reflect] attribute DOMString name;
</span><span class="cx"> [Reflect] attribute DOMString placeholder;
</span><span class="cx"> [Reflect] attribute boolean readOnly;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -760,14 +760,22 @@
</span><span class="cx"> return "ltr";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void HTMLTextFormControlElement::setMaxLengthForBindings(int maxLength, ExceptionCode& ec)
</del><ins>+void HTMLTextFormControlElement::setMaxLength(int maxLength, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (maxLength < 0)
</del><ins>+ if (maxLength < 0 || (m_minLength >= 0 && maxLength < m_minLength))
</ins><span class="cx"> ec = INDEX_SIZE_ERR;
</span><span class="cx"> else
</span><span class="cx"> setIntegralAttribute(maxlengthAttr, maxLength);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void HTMLTextFormControlElement::setMinLength(int minLength, ExceptionCode& ec)
+{
+ if (minLength < 0 || (m_maxLength >= 0 && minLength > m_maxLength))
+ ec = INDEX_SIZE_ERR;
+ else
+ setIntegralAttribute(minlengthAttr, minLength);
+}
+
</ins><span class="cx"> void HTMLTextFormControlElement::adjustInnerTextStyle(const RenderStyle& parentStyle, RenderStyle& textBlockStyle) const
</span><span class="cx"> {
</span><span class="cx"> // The inner block, if present, always has its direction set to LTR,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextFormControlElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.h (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextFormControlElement.h        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.h        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">
</span><span class="cx"> class HTMLTextFormControlElement : public HTMLFormControlElementWithState {
</span><span class="cx"> public:
</span><del>- // Common flag for HTMLInputElement::tooLong() and HTMLTextAreaElement::tooLong().
</del><ins>+ // Common flag for HTMLInputElement::tooLong() / tooShort() and HTMLTextAreaElement::tooLong() / tooShort().
</ins><span class="cx"> enum NeedsToCheckDirtyFlag {CheckDirtyFlag, IgnoreDirtyFlag};
</span><span class="cx">
</span><span class="cx"> virtual ~HTMLTextFormControlElement();
</span><span class="lines">@@ -48,7 +48,12 @@
</span><span class="cx"> void didEditInnerTextValue();
</span><span class="cx"> void forwardEvent(Event&);
</span><span class="cx">
</span><del>- WEBCORE_EXPORT void setMaxLengthForBindings(int, ExceptionCode&);
</del><ins>+ long maxLength() const { return m_maxLength; }
+ WEBCORE_EXPORT void setMaxLength(int, ExceptionCode&);
+ void setMaxLength(int maxLength) { m_maxLength = maxLength; }
+ long minLength() const { return m_minLength; }
+ void setMinLength(int, ExceptionCode&);
+ void setMinLength(int minLength) { m_minLength = minLength; }
</ins><span class="cx">
</span><span class="cx"> InsertionNotificationRequest insertedInto(ContainerNode&) override;
</span><span class="cx">
</span><span class="lines">@@ -151,6 +156,9 @@
</span><span class="cx"> int m_cachedSelectionStart;
</span><span class="cx"> int m_cachedSelectionEnd;
</span><span class="cx">
</span><ins>+ int m_maxLength { -1 };
+ int m_minLength { -1 };
+
</ins><span class="cx"> unsigned char m_cachedSelectionDirection : 2;
</span><span class="cx"> unsigned char m_lastChangeWasUserEdit : 1;
</span><span class="cx"> unsigned char m_isPlaceholderVisible : 1;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/InputType.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/InputType.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/InputType.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -412,6 +412,9 @@
</span><span class="cx"> if (patternMismatch(value))
</span><span class="cx"> return validationMessagePatternMismatchText();
</span><span class="cx">
</span><ins>+ if (element().tooShort())
+ return validationMessageTooShortText(numGraphemeClusters(value), element().minLength());
+
</ins><span class="cx"> if (element().tooLong())
</span><span class="cx"> return validationMessageTooLongText(numGraphemeClusters(value), element().effectiveMaxLength());
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlTextFieldInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/TextFieldInputType.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/TextFieldInputType.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/TextFieldInputType.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx"> // We use RenderTextControlSingleLine::text() instead of InputElement::value()
</span><span class="cx"> // because they can be mismatched by sanitizeValue() in
</span><span class="cx"> // HTMLInputElement::subtreeHasChanged() in some cases.
</span><del>- String innerText = element().innerTextValue();
</del><ins>+ StringView innerText = element().innerTextValue();
</ins><span class="cx"> unsigned oldLength = numGraphemeClusters(innerText);
</span><span class="cx">
</span><span class="cx"> // selectionLength represents the selection length of this text field to be
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlValidityStateidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/ValidityState.idl (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/ValidityState.idl        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/html/ValidityState.idl        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> readonly attribute boolean valueMissing;
</span><span class="cx"> readonly attribute boolean typeMismatch;
</span><span class="cx"> readonly attribute boolean patternMismatch;
</span><ins>+ readonly attribute boolean tooShort;
</ins><span class="cx"> readonly attribute boolean tooLong;
</span><span class="cx"> readonly attribute boolean rangeUnderflow;
</span><span class="cx"> readonly attribute boolean rangeOverflow;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -1058,6 +1058,11 @@
</span><span class="cx"> return WEB_UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern");
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+String validationMessageTooShortText(int, int)
+{
+ return WEB_UI_STRING("too short", "Validation message for form control elements with a value shorter than minimum allowed length");
+}
+
</ins><span class="cx"> String validationMessageTooLongText(int, int)
</span><span class="cx"> {
</span><span class="cx"> return WEB_UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length");
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.h        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -242,6 +242,7 @@
</span><span class="cx"> String validationMessageTypeMismatchForMultipleEmailText();
</span><span class="cx"> String validationMessageTypeMismatchForURLText();
</span><span class="cx"> String validationMessagePatternMismatchText();
</span><ins>+ String validationMessageTooShortText(int valueLength, int minLength);
</ins><span class="cx"> String validationMessageTooLongText(int valueLength, int maxLength);
</span><span class="cx"> String validationMessageRangeUnderflowText(const String& minimum);
</span><span class="cx"> String validationMessageRangeOverflowText(const String& maximum);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflLocalizedStringsEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -556,6 +556,11 @@
</span><span class="cx"> return String::fromUTF8("step mismatch");
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+String validationMessageTooShortText(int, int)
+{
+ return String::fromUTF8("too short");
+}
+
</ins><span class="cx"> String validationMessageTooLongText(int, int)
</span><span class="cx"> {
</span><span class="cx"> return String::fromUTF8("too long");
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgtkLocalizedStringsGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -753,6 +753,11 @@
</span><span class="cx"> return String::fromUTF8(_("pattern mismatch"));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+String validationMessageTooShortText(int, int)
+{
+ return String::fromUTF8(_("too short"));
+}
+
</ins><span class="cx"> String validationMessageTooLongText(int, int)
</span><span class="cx"> {
</span><span class="cx"> return String::fromUTF8(_("too long"));
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-09-06 Chris Dumez <cdumez@apple.com>
+
+ Add support for input.minLength / textArea.minLength
+ https://bugs.webkit.org/show_bug.cgi?id=161644
+
+ Reviewed by Darin Adler.
+
+ Update ObjC bindings to reflect method renaming.
+
+ * DOM/DOMHTMLInputElement.mm:
+ (-[DOMHTMLInputElement maxLength]):
+ (-[DOMHTMLInputElement setMaxLength:]):
+ * DOM/DOMHTMLTextAreaElement.mm:
+ (-[DOMHTMLTextAreaElement maxLength]):
+ (-[DOMHTMLTextAreaElement setMaxLength:]):
+
</ins><span class="cx"> 2016-09-06 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> <rdar://problem/8064563> Ugly NSLog in DOMInternal.mm
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMHTMLInputElementmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMHTMLInputElement.mm (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMHTMLInputElement.mm        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebKit/mac/DOM/DOMHTMLInputElement.mm        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -275,7 +275,7 @@
</span><span class="cx"> - (int)maxLength
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- return IMPL->maxLengthForBindings();
</del><ins>+ return IMPL->maxLength();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)setMaxLength:(int)newMaxLength
</span><span class="lines">@@ -282,7 +282,7 @@
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><span class="cx"> WebCore::ExceptionCode ec = 0;
</span><del>- IMPL->setMaxLengthForBindings(newMaxLength, ec);
</del><ins>+ IMPL->setMaxLength(newMaxLength, ec);
</ins><span class="cx"> raiseOnDOMError(ec);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMHTMLTextAreaElementmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMHTMLTextAreaElement.mm (205523 => 205524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMHTMLTextAreaElement.mm        2016-09-06 23:55:09 UTC (rev 205523)
+++ trunk/Source/WebKit/mac/DOM/DOMHTMLTextAreaElement.mm        2016-09-07 00:00:12 UTC (rev 205524)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> - (int)maxLength
</span><span class="cx"> {
</span><span class="cx"> JSMainThreadNullState state;
</span><del>- return unwrap(*self).maxLengthForBindings();
</del><ins>+ return unwrap(*self).maxLength();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)setMaxLength:(int)newMaxLength
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> {
</span><span class="cx"> JSMainThreadNullState state;
</span><span class="cx"> ExceptionCode ec = 0;
</span><del>- unwrap(*self).setMaxLengthForBindings(newMaxLength, ec);
</del><ins>+ unwrap(*self).setMaxLength(newMaxLength, ec);
</ins><span class="cx"> raiseOnDOMError(ec);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>