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

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

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.h
diff --git a/Source/core/html/HTMLTextAreaElement.h b/Source/core/html/HTMLTextAreaElement.h
index 7f157ca116aa9d1105dde57db7c2e293af449169..b6349388c75252d419b6041b7cd5e49d18cf0612 100644
--- a/Source/core/html/HTMLTextAreaElement.h
+++ b/Source/core/html/HTMLTextAreaElement.h
@@ -48,6 +48,11 @@ public:
int textLength() const { return value().length(); }
virtual int maxLength() const;
void setMaxLength(int, ExceptionState&);
+
+ // suggested values for autofill
tkent 2014/01/06 23:29:49 nit: The first letter should be capital. BTW, I do
ziran.sun 2014/01/07 17:18:26 Done.
+ const String& suggestedValue() const;
tkent 2014/01/06 23:29:49 Returning "const String&" here is dangerous. It sh
ziran.sun 2014/01/07 17:18:26 Done. In HTMLInputElement.h (L151), it also uses "
+ void setSuggestedValue(const String&);
+
// For ValidityState
virtual String validationMessage() const OVERRIDE;
virtual bool valueMissing() const OVERRIDE;
@@ -124,6 +129,8 @@ private:
WrapMethod m_wrap;
mutable String m_value;
mutable bool m_isDirty;
+
tkent 2014/01/06 23:29:49 nit: I don't think this blank line is needed.
ziran.sun 2014/01/07 17:18:26 Done.
+ String m_suggestedValue;
};
DEFINE_NODE_TYPE_CASTS(HTMLTextAreaElement, hasTagName(HTMLNames::textareaTag));

Powered by Google App Engine
This is Rietveld 408576698