Index: Source/core/html/HTMLTextAreaElement.cpp |
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp |
index cd8c6eff88ee2e2287020cd402bed0eb14caed60..5afd82c8323cd93d4e9542beb484e6de9de23105 100644 |
--- a/Source/core/html/HTMLTextAreaElement.cpp |
+++ b/Source/core/html/HTMLTextAreaElement.cpp |
@@ -81,7 +81,6 @@ HTMLTextAreaElement::HTMLTextAreaElement(Document& document, HTMLFormElement* fo |
, m_cols(defaultCols) |
, m_wrap(SoftWrap) |
, m_isDirty(false) |
- , m_wasModifiedByUser(false) |
{ |
setFormControlValueMatchesRenderer(true); |
ScriptWrappable::init(this); |
@@ -328,7 +327,6 @@ void HTMLTextAreaElement::updateValue() const |
const_cast<HTMLTextAreaElement*>(this)->setFormControlValueMatchesRenderer(true); |
const_cast<HTMLTextAreaElement*>(this)->notifyFormStateChanged(); |
m_isDirty = true; |
- m_wasModifiedByUser = true; |
const_cast<HTMLTextAreaElement*>(this)->updatePlaceholderVisibility(false); |
} |
@@ -354,7 +352,6 @@ void HTMLTextAreaElement::setNonDirtyValue(const String& value) |
void HTMLTextAreaElement::setValueCommon(const String& newValue) |
{ |
- m_wasModifiedByUser = false; |
// Code elsewhere normalizes line endings added by the user via the keyboard or pasting. |
// We normalize line endings coming from JavaScript here. |
String normalizedValue = newValue.isNull() ? "" : newValue; |
@@ -467,7 +464,7 @@ bool HTMLTextAreaElement::tooLong(const String& value, NeedsToCheckDirtyFlag che |
{ |
// Return false for the default value or value set by script even if it is |
// longer than maxLength. |
- if (check == CheckDirtyFlag && !m_wasModifiedByUser) |
+ if (check == CheckDirtyFlag && !lastChangeWasUserEdit()) |
return false; |
int max = maxLength(); |