summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLTextAreaElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLTextAreaElement.cpp')
-rw-r--r--WebCore/html/HTMLTextAreaElement.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/WebCore/html/HTMLTextAreaElement.cpp b/WebCore/html/HTMLTextAreaElement.cpp
index ad6c1b3..a5e7d1e 100644
--- a/WebCore/html/HTMLTextAreaElement.cpp
+++ b/WebCore/html/HTMLTextAreaElement.cpp
@@ -291,12 +291,20 @@ String HTMLTextAreaElement::value() const
void HTMLTextAreaElement::setValue(const String& value)
{
- setNonDirtyValue(value);
+ setValueCommon(value);
m_isDirty = true;
+ setNeedsValidityCheck();
}
void HTMLTextAreaElement::setNonDirtyValue(const String& value)
{
+ setValueCommon(value);
+ m_isDirty = false;
+ setNeedsValidityCheck();
+}
+
+void HTMLTextAreaElement::setValueCommon(const String& value)
+{
// Code elsewhere normalizes line endings added by the user via the keyboard or pasting.
// We normalize line endings coming from JavaScript here.
String normalizedValue = value.isNull() ? "" : value;
@@ -311,8 +319,6 @@ void HTMLTextAreaElement::setNonDirtyValue(const String& value)
m_value = normalizedValue;
updatePlaceholderVisibility(false);
setNeedsStyleRecalc();
- setNeedsValidityCheck();
- m_isDirty = false;
setFormControlValueMatchesRenderer(true);
// Set the caret to the end of the text value.