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

Unified Diff: Source/core/testing/Internals.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/rendering/RenderMenuList.cpp ('k') | Source/web/WebFormControlElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 65bd2e614f46fe1463efcd8805cd0b9aae2a3ed1..7d514da6a17ce30227eded8ab999885ed5633793 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1013,6 +1013,10 @@ String Internals::suggestedValue(Element* element, ExceptionState& exceptionStat
if (isHTMLTextAreaElement(*element))
suggestedValue = toHTMLTextAreaElement(*element).suggestedValue();
+
+ if (isHTMLSelectElement(*element))
+ suggestedValue = toHTMLSelectElement(*element).suggestedValue();
+
return suggestedValue;
}
@@ -1033,6 +1037,9 @@ void Internals::setSuggestedValue(Element* element, const String& value, Excepti
if (isHTMLTextAreaElement(*element))
toHTMLTextAreaElement(*element).setSuggestedValue(value);
+
+ if (isHTMLSelectElement(*element))
+ toHTMLSelectElement(*element).setSuggestedValue(value);
}
void Internals::setEditingValue(Element* element, const String& value, ExceptionState& exceptionState)
« no previous file with comments | « Source/core/rendering/RenderMenuList.cpp ('k') | Source/web/WebFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698