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

Unified Diff: Source/core/html/HTMLTextAreaElement.h

Issue 435753003: Implement minlength for <input> and <textarea>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add support for minlength in remaining places and stop clasping it with maxlength Created 6 years, 2 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: Source/core/html/HTMLTextAreaElement.h
diff --git a/Source/core/html/HTMLTextAreaElement.h b/Source/core/html/HTMLTextAreaElement.h
index 7adaac0618946a9eb8381ca6623b814e0503c47f..2dbb6c184ca5d1b77611e0d6160aeceff9a6c53c 100644
--- a/Source/core/html/HTMLTextAreaElement.h
+++ b/Source/core/html/HTMLTextAreaElement.h
@@ -47,7 +47,9 @@ public:
void setDefaultValue(const String&);
int textLength() const { return value().length(); }
int maxLength() const;
+ int minLength() const;
void setMaxLength(int, ExceptionState&);
+ void setMinLength(int, ExceptionState&);
String suggestedValue() const;
void setSuggestedValue(const String&);
@@ -56,6 +58,7 @@ public:
virtual String validationMessage() const OVERRIDE;
virtual bool valueMissing() const OVERRIDE;
virtual bool tooLong() const OVERRIDE;
+ virtual bool tooShort() const OVERRIDE;
bool isValidValue(const String&) const;
void setCols(int);
@@ -123,6 +126,7 @@ private:
// If the String* argument is 0, apply this->value().
bool valueMissing(const String*) const;
bool tooLong(const String*, NeedsToCheckDirtyFlag) const;
+ bool tooShort(const String*, NeedsToCheckDirtyFlag) const;
int m_rows;
int m_cols;

Powered by Google App Engine
This is Rietveld 408576698