Index: third_party/WebKit/Source/web/WebInputElement.cpp |
diff --git a/third_party/WebKit/Source/web/WebInputElement.cpp b/third_party/WebKit/Source/web/WebInputElement.cpp |
index 139b51078efd8589f5fface4e70b03deae1fcb2e..6b3e47868a21caed457d340bb7ab01386553102a 100644 |
--- a/third_party/WebKit/Source/web/WebInputElement.cpp |
+++ b/third_party/WebKit/Source/web/WebInputElement.cpp |
@@ -83,7 +83,8 @@ bool WebInputElement::isCheckbox() const |
int WebInputElement::maxLength() const |
{ |
- return constUnwrap<HTMLInputElement>()->maxLength(); |
+ int maxLen = constUnwrap<HTMLInputElement>()->maxLength(); |
+ return maxLen == -1 ? HTMLInputElement::maximumLength : maxLen; |
} |
void WebInputElement::setActivatedSubmit(bool activated) |