Index: Source/core/html/HTMLTextAreaElement.cpp |
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp |
index 23fee84bc5953a2e11617e291828fc5bc64c0666..9395a23023dcc7dec44b85a20405504b9d07f9df 100644 |
--- a/Source/core/html/HTMLTextAreaElement.cpp |
+++ b/Source/core/html/HTMLTextAreaElement.cpp |
@@ -40,11 +40,14 @@ |
#include "core/events/BeforeTextInsertedEvent.h" |
#include "core/events/Event.h" |
#include "core/events/ThreadLocalEventNames.h" |
+#include "core/frame/FrameHost.h" |
#include "core/frame/LocalFrame.h" |
#include "core/html/FormDataList.h" |
#include "core/html/forms/FormController.h" |
#include "core/html/shadow/ShadowElementNames.h" |
#include "core/html/shadow/TextControlInnerElements.h" |
+#include "core/page/Chrome.h" |
+#include "core/page/ChromeClient.h" |
#include "core/rendering/RenderTextControlMultiLine.h" |
#include "platform/text/PlatformLocale.h" |
#include "wtf/StdLibExtras.h" |
@@ -277,6 +280,9 @@ void HTMLTextAreaElement::subtreeHasChanged() |
// When typing in a textarea, childrenChanged is not called, so we need to force the directionality check. |
calculateAndAdjustDirectionality(); |
+ |
+ ASSERT(document().isActive()); |
+ document().frameHost()->chrome().client().didChangeValueInTextField(*this); |
} |
void HTMLTextAreaElement::handleBeforeTextInsertedEvent(BeforeTextInsertedEvent* event) const |
@@ -437,10 +443,12 @@ String HTMLTextAreaElement::suggestedValue() const |
void HTMLTextAreaElement::setSuggestedValue(const String& value) |
{ |
m_suggestedValue = value; |
- setInnerTextValue(m_suggestedValue); |
- updatePlaceholderVisibility(false); |
setNeedsStyleRecalc(SubtreeStyleChange); |
- setFormControlValueMatchesRenderer(true); |
tkent
2014/03/04 00:15:56
Why do you remove this?
ziran.sun
2014/03/04 12:12:40
"setFormControlValueMatchesRenderer(true);" is inc
|
+ if (!value.isNull()) |
+ setInnerTextValue(m_suggestedValue); |
+ else |
+ setInnerTextValue(m_value); |
+ updatePlaceholderVisibility(false); |
} |
String HTMLTextAreaElement::validationMessage() const |