Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1425)

Unified Diff: third_party/WebKit/Source/web/WebInputElement.cpp

Issue 1615003002: Fix behavior of HTMLInputElement.maxLength/minLength getter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set to -1 for invalid attribute or negative Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/public/web/WebInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698