diff options
Diffstat (limited to 'Source/WebCore/html/HTMLInputElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLInputElement.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/Source/WebCore/html/HTMLInputElement.cpp b/Source/WebCore/html/HTMLInputElement.cpp index 407c1233b..59c6205a8 100644 --- a/Source/WebCore/html/HTMLInputElement.cpp +++ b/Source/WebCore/html/HTMLInputElement.cpp @@ -456,7 +456,7 @@ void HTMLInputElement::updateType() updateValueIfNeeded(); setFormControlValueMatchesRenderer(false); - updateInnerTextValue(); + m_inputType->updateInnerTextValue(); m_wasModifiedByUser = false; @@ -489,22 +489,6 @@ void HTMLInputElement::updateType() notifyFormStateChanged(); } -void HTMLInputElement::updateInnerTextValue() -{ - if (!isTextField()) - return; - - if (!suggestedValue().isNull()) { - setInnerTextValue(suggestedValue()); - updatePlaceholderVisibility(false); - } else if (!formControlValueMatchesRenderer()) { - // Update the renderer value if the formControlValueMatchesRenderer() flag is false. - // It protects an unacceptable renderer value from being overwritten with the DOM value. - setInnerTextValue(visibleValue()); - updatePlaceholderVisibility(false); - } -} - void HTMLInputElement::subtreeHasChanged() { ASSERT(isTextField()); @@ -727,7 +711,7 @@ void HTMLInputElement::parseAttribute(const Attribute& attribute) #endif else HTMLTextFormControlElement::parseAttribute(attribute); - updateInnerTextValue(); + m_inputType->updateInnerTextValue(); } void HTMLInputElement::finishParsingChildren() @@ -902,7 +886,7 @@ void HTMLInputElement::copyNonAttributePropertiesFromElement(const Element& sour HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); setFormControlValueMatchesRenderer(false); - updateInnerTextValue(); + m_inputType->updateInnerTextValue(); } String HTMLInputElement::value() const @@ -950,7 +934,7 @@ void HTMLInputElement::setSuggestedValue(const String& value) setFormControlValueMatchesRenderer(false); m_suggestedValue = sanitizeValue(value); setNeedsStyleRecalc(); - updateInnerTextValue(); + m_inputType->updateInnerTextValue(); } void HTMLInputElement::setEditingValue(const String& value) |