| Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| index b516a88512ac7f75842d34bffa22692d14b3cb04..e1fe39b78781a7a1ac7ad5ec9f91eb452a2ac604 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| @@ -103,7 +103,7 @@ HTMLInputElement::HTMLInputElement(Document& document, HTMLFormElement* form, bo
|
| : HTMLTextFormControlElement(inputTag, document, form)
|
| , m_size(defaultSize)
|
| , m_maxLength(maximumLength)
|
| - , m_minLength(0)
|
| + , m_minLength(-1)
|
| , m_maxResults(-1)
|
| , m_isChecked(false)
|
| , m_reflectsCheckedAttribute(true)
|
| @@ -1365,6 +1365,8 @@ const AtomicString& HTMLInputElement::alt() const
|
|
|
| int HTMLInputElement::maxLength() const
|
| {
|
| + if (!hasAttribute(maxlengthAttr))
|
| + return -1;
|
| return m_maxLength;
|
| }
|
|
|
| @@ -1693,10 +1695,8 @@ void HTMLInputElement::parseMaxLengthAttribute(const AtomicString& value)
|
| void HTMLInputElement::parseMinLengthAttribute(const AtomicString& value)
|
| {
|
| int minLength;
|
| - if (!parseHTMLInteger(value, minLength))
|
| - minLength = 0;
|
| - if (minLength < 0)
|
| - minLength = 0;
|
| + if (!parseHTMLInteger(value, minLength) || minLength < 0)
|
| + minLength = -1;
|
| m_minLength = minLength;
|
| setNeedsValidityCheck();
|
| }
|
|
|