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

Unified Diff: third_party/WebKit/Source/core/html/forms/ColorInputType.cpp

Issue 2746823002: Correct elementMatches filter for datalist.options (Closed)
Patch Set: Remove superfluous test, added filter to callees. Created 3 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: third_party/WebKit/Source/core/html/forms/ColorInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp b/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp
index 781068b56308a4b5afc9c3b21bd82902d791b59c..2905794cea86b8a8b6d5b26d85582bb005334ffa 100644
--- a/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp
@@ -245,6 +245,8 @@ Vector<ColorSuggestion> ColorInputType::suggestions() const {
if (dataList) {
HTMLDataListOptionsCollection* options = dataList->options();
for (unsigned i = 0; HTMLOptionElement* option = options->item(i); i++) {
+ if (option->isDisabledFormControl() || option->value().isEmpty())
+ continue;
if (!element().isValidValue(option->value()))
continue;
Color color;
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/Source/core/html/forms/RangeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698