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

Unified Diff: third_party/WebKit/Source/web/WebInputElement.cpp

Issue 2174303002: Move filtering logic in GetDataListSuggestions() to Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move implementation to HTMLInputElement Created 4 years, 5 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: third_party/WebKit/Source/web/WebInputElement.cpp
diff --git a/third_party/WebKit/Source/web/WebInputElement.cpp b/third_party/WebKit/Source/web/WebInputElement.cpp
index e8b4233335d845035dcc235a4a6b04be14f6b5e9..c4b6c0af80eaaa6e1223bf4aa13904db7fea4506 100644
--- a/third_party/WebKit/Source/web/WebInputElement.cpp
+++ b/third_party/WebKit/Source/web/WebInputElement.cpp
@@ -42,6 +42,7 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "public/platform/WebString.h"
#include "public/web/WebElementCollection.h"
+#include "public/web/WebOptionElement.h"
#include "wtf/PassRefPtr.h"
namespace blink {
@@ -122,11 +123,9 @@ bool WebInputElement::isMultiple() const
return constUnwrap<HTMLInputElement>()->multiple();
}
-WebElementCollection WebInputElement::dataListOptions() const
+WebVector<WebOptionElement> WebInputElement::filteredDataListOptions() const
{
- if (HTMLDataListElement* dataList = toHTMLDataListElement(constUnwrap<HTMLInputElement>()->list()))
- return WebElementCollection(dataList->options());
- return WebElementCollection();
+ return WebVector<WebOptionElement>(constUnwrap<HTMLInputElement>()->filteredDataListOptions());
}
WebString WebInputElement::localizeValue(const WebString& proposedValue) const

Powered by Google App Engine
This is Rietveld 408576698