diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-30 11:37:48 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-30 11:38:52 +0200 |
commit | 89e2486a48b739f8d771d69ede5a6a1b244a10fc (patch) | |
tree | 503b1a7812cf97d93704c32437eb5f62dc1a1ff9 /Source/WebCore/html/HTMLInputElement.cpp | |
parent | 625f028249cb37c55bbbd153f3902afd0b0756d9 (diff) | |
download | qtwebkit-89e2486a48b739f8d771d69ede5a6a1b244a10fc.tar.gz |
Imported WebKit commit 0282df8ca7c11d8c8a66ea18543695c69f545a27 (http://svn.webkit.org/repository/webkit/trunk@124002)
New snapshot with prospective Mountain Lion build fix
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) |