Chromium Code Reviews| Index: Source/core/html/HTMLTextAreaElement.cpp |
| diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp |
| index 8480199a6472428e6aefb13aeb91361ec073a5cf..efde5ee2ac29cc6dc207d99d44c96602bad08f5e 100644 |
| --- a/Source/core/html/HTMLTextAreaElement.cpp |
| +++ b/Source/core/html/HTMLTextAreaElement.cpp |
| @@ -83,7 +83,6 @@ HTMLTextAreaElement::HTMLTextAreaElement(Document& document, HTMLFormElement* fo |
| , m_cols(defaultCols) |
| , m_wrap(SoftWrap) |
| , m_isDirty(false) |
| - , m_valueIsUpToDate(true) |
| { |
| ScriptWrappable::init(this); |
| } |
| @@ -268,7 +267,8 @@ void HTMLTextAreaElement::handleFocusEvent(Element*, FocusType) |
| void HTMLTextAreaElement::subtreeHasChanged() |
| { |
| setChangedSinceLastFormControlChangeEvent(true); |
| - m_valueIsUpToDate = false; |
| + // Update Value to match the renderer |
| + updateValue(); |
| setNeedsValidityCheck(); |
| setAutofilled(false); |
| @@ -317,12 +317,8 @@ String HTMLTextAreaElement::sanitizeUserInputValue(const String& proposedValue, |
| void HTMLTextAreaElement::updateValue() const |
| { |
| - if (m_valueIsUpToDate) |
| - return; |
| - |
| ASSERT(renderer()); |
| m_value = innerEditorValue(); |
| - const_cast<HTMLTextAreaElement*>(this)->m_valueIsUpToDate = true; |
| const_cast<HTMLTextAreaElement*>(this)->notifyFormStateChanged(); |
| m_isDirty = true; |
| const_cast<HTMLTextAreaElement*>(this)->updatePlaceholderVisibility(false); |
| @@ -330,7 +326,6 @@ void HTMLTextAreaElement::updateValue() const |
| String HTMLTextAreaElement::value() const |
| { |
| - updateValue(); |
|
spartha
2014/09/02 14:09:55
Replaced by a call from subTreeChanged()
|
| return m_value; |
| } |
| @@ -397,12 +392,6 @@ void HTMLTextAreaElement::setValueCommon(const String& newValue, TextFieldEventB |
| } |
| } |
| -void HTMLTextAreaElement::setInnerEditorValue(const String& value) |
| -{ |
| - HTMLTextFormControlElement::setInnerEditorValue(value); |
| - m_valueIsUpToDate = true; |
| -} |
| - |
| String HTMLTextAreaElement::defaultValue() const |
| { |
| StringBuilder value; |