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

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

Issue 551283002: Remove HTMLInputElement::isText and isTextType. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/forms/BaseTextInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 63944d8c353304d94a3a493ccb107a3e7e647462..5afcb218a6af313fca1a3ac1b048ca26c9e4ed91 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -241,20 +241,7 @@ bool HTMLInputElement::patternMismatch() const
bool HTMLInputElement::tooLong(const String& value, NeedsToCheckDirtyFlag check) const
{
- // We use isTextType() instead of supportsMaxLength() because of the
- // 'virtual' overhead.
- if (!isTextType())
- return false;
- int max = maxLength();
- if (max < 0)
- return false;
- if (check == CheckDirtyFlag) {
- // Return false for the default value or a value set by a script even if
- // it is longer than maxLength.
- if (!hasDirtyValue() || !lastChangeWasUserEdit())
- return false;
- }
- return value.length() > static_cast<unsigned>(max);
+ return m_inputType->tooLong(value, check);
}
bool HTMLInputElement::rangeUnderflow() const
@@ -844,11 +831,6 @@ bool HTMLInputElement::isTextField() const
return m_inputType->isTextField();
}
-bool HTMLInputElement::isTextType() const
-{
- return m_inputType->isTextType();
-}
-
void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventBehavior)
{
if (checked() == nowChecked)
@@ -1565,11 +1547,6 @@ bool HTMLInputElement::isTextButton() const
return m_inputType->isTextButton();
}
-bool HTMLInputElement::isText() const
-{
- return m_inputType->isTextType();
-}
-
bool HTMLInputElement::isEnumeratable() const
{
return m_inputType->isEnumeratable();
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/forms/BaseTextInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698