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(); |