Add support for input.minLength / textArea.minLength
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Sep 2016 00:00:12 +0000 (00:00 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Sep 2016 00:00:12 +0000 (00:00 +0000)
commitd96d18d90c5c28d73febb92c4d4a93ba8d6586f5
tree044ef0c9058f42139c2bf6135bad055e938293f3
parent75f1da74bbdeca78c3413623594df0dcb36860ee
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:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@205524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/fast/forms/ValidityState-001.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-tooShort-expected.txt
Source/WTF/wtf/text/TextBreakIterator.cpp
Source/WTF/wtf/text/TextBreakIterator.h
Source/WebCore/ChangeLog
Source/WebCore/html/FormAssociatedElement.cpp
Source/WebCore/html/FormAssociatedElement.h
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLInputElement.idl
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextAreaElement.h
Source/WebCore/html/HTMLTextAreaElement.idl
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/html/InputType.cpp
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/ValidityState.idl
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h
Source/WebCore/platform/efl/LocalizedStringsEfl.cpp
Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/DOM/DOMHTMLInputElement.mm
Source/WebKit/mac/DOM/DOMHTMLTextAreaElement.mm