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

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: Update code as per keishi's review comment. 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
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 4f2c8c24be1bd2465931024c0a8135377f47feb3..d92039caf4edcdaab5f17296668b6302d8f5887a 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)

Powered by Google App Engine
This is Rietveld 408576698