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

Unified Diff: Source/web/WebFormControlElement.cpp

Issue 138433002: Add Autofill preview support for <select> input fields (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Initialize m_suggestedIndex in constructor Created 6 years, 9 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
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | public/web/WebFormControlElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFormControlElement.cpp
diff --git a/Source/web/WebFormControlElement.cpp b/Source/web/WebFormControlElement.cpp
index bbabc8e918b81a41942c956d7341519a16caea12..d75f862d123917cdf0c34ad336f63371691c5582 100644
--- a/Source/web/WebFormControlElement.cpp
+++ b/Source/web/WebFormControlElement.cpp
@@ -119,6 +119,8 @@ void WebFormControlElement::setSuggestedValue(const WebString& value)
unwrap<HTMLInputElement>()->setSuggestedValue(value);
if (isHTMLTextAreaElement(*m_private))
unwrap<HTMLTextAreaElement>()->setSuggestedValue(value);
+ if (isHTMLSelectElement(*m_private))
+ unwrap<HTMLSelectElement>()->setSuggestedValue(value);
}
WebString WebFormControlElement::suggestedValue() const
@@ -127,6 +129,8 @@ WebString WebFormControlElement::suggestedValue() const
return constUnwrap<HTMLInputElement>()->suggestedValue();
if (isHTMLTextAreaElement(*m_private))
return constUnwrap<HTMLTextAreaElement>()->suggestedValue();
+ if (isHTMLSelectElement(*m_private))
+ return constUnwrap<HTMLSelectElement>()->suggestedValue();
return WebString();
}
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | public/web/WebFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698