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 03cba21d8ca1fabba0b517620be266004b48713b..069b9eb551169471220e70ce8cd18b4cfd988937 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
@@ -1355,11 +1355,15 @@ const AtomicString& HTMLInputElement::alt() const |
int HTMLInputElement::maxLength() const |
{ |
+ if (!hasAttribute(maxlengthAttr)) |
+ return -1; |
return m_maxLength; |
} |
int HTMLInputElement::minLength() const |
{ |
+ if (!hasAttribute(minlengthAttr)) |
+ return -1; |
return m_minLength; |
} |