Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(971)

Unified Diff: Source/core/html/HTMLTextAreaElement.cpp

Issue 120443003: Add autofill preview support for Textarea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test code for textarea setSuggestedValue() Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLTextAreaElement.cpp
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp
index 751d378a598c150e50b68a2da65b0f1be8d6dcca..8aaa019200b107d56d059203eac0bee5fec12901 100644
--- a/Source/core/html/HTMLTextAreaElement.cpp
+++ b/Source/core/html/HTMLTextAreaElement.cpp
@@ -433,6 +433,20 @@ void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& exceptionSt
setIntegralAttribute(maxlengthAttr, newValue);
}
+const String& HTMLTextAreaElement::suggestedValue() const
+{
+ return m_suggestedValue;
+}
+
+void HTMLTextAreaElement::setSuggestedValue(const String& value)
+{
+ m_suggestedValue = value;
+ setInnerTextValue(m_suggestedValue);
+ updatePlaceholderVisibility(false);
+ setNeedsStyleRecalc();
+ setFormControlValueMatchesRenderer(true);
+}
+
String HTMLTextAreaElement::validationMessage() const
{
if (!willValidate())

Powered by Google App Engine
This is Rietveld 408576698