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

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 1615003002: Fix behavior of HTMLInputElement.maxLength/minLength getter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try to fix interactive tests 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/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..d19ce10396571a1d0746998bcbd46a539ee08714 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -1365,11 +1365,15 @@ const AtomicString& HTMLInputElement::alt() const
int HTMLInputElement::maxLength() const
{
+ if (!hasAttribute(maxlengthAttr) || m_maxLength == maximumLength)
tkent 2016/02/08 23:48:21 input.maxLength for <input maxlength="524288"> ret
+ return -1;
return m_maxLength;
}
int HTMLInputElement::minLength() const
{
+ if (!hasAttribute(minlengthAttr))
tkent 2016/02/08 23:48:21 We should have a test for this change. I think we
+ return -1;
return m_minLength;
}

Powered by Google App Engine
This is Rietveld 408576698