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

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 layout tests for minlength & maxlength together; fix comments 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 27243a1e946e0f447ceced1979b36be2f8c5bfdb..d8437f0a7141b0ad6e64dbb35bb867e445d4455e 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