diff options
author | Cary Clark <cary@android.com> | 2009-09-30 14:05:03 -0400 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2009-09-30 14:05:03 -0400 |
commit | 99fa56b298722aebfd2f987e8a88b5b25d7386fe (patch) | |
tree | 4a77e956bd15559c070c7b8c425c7fbc7cee59dd /WebCore | |
parent | 14e3d9bdf2270d399bae78946e3efe62a6c6c373 (diff) | |
download | external_webkit-99fa56b298722aebfd2f987e8a88b5b25d7386fe.zip external_webkit-99fa56b298722aebfd2f987e8a88b5b25d7386fe.tar.gz external_webkit-99fa56b298722aebfd2f987e8a88b5b25d7386fe.tar.bz2 |
always update the WebTextView from the input element
Even if the input element doesn't have focus, synchronize
the WebTextView if the pointers match.
fixes http://b/issue?id=2096746
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/html/HTMLInputElement.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp index 88e14fd..59e4e2f 100644 --- a/WebCore/html/HTMLInputElement.cpp +++ b/WebCore/html/HTMLInputElement.cpp @@ -1113,16 +1113,12 @@ void HTMLInputElement::setValue(const String& value) if (isTextField()) { unsigned max = m_data.value().length(); - if (document()->focusedNode() == this) #ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS - { - // Make sure our UI side textfield changes to match the RenderTextControl - android::WebViewCore::getWebViewCore(document()->view())->updateTextfield(this, false, value); + // Make sure our UI side textfield changes to match the RenderTextControl + android::WebViewCore::getWebViewCore(document()->view())->updateTextfield(this, false, value); #endif + if (document()->focusedNode() == this) InputElement::updateSelectionRange(this, this, max, max); -#ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS - } -#endif else cacheSelection(max, max); } |