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

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 488763002: Introduce HTMLDataListOptionsCollection subclass for HTMLCollection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 58ffff2bb0ff639cea445a00d641317a7aa9ba18..fc2a3e422c5c0a589dea54b6373a6d32899b76b4 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -57,6 +57,7 @@
#include "core/frame/UseCounter.h"
#include "core/html/HTMLCollection.h"
#include "core/html/HTMLDataListElement.h"
+#include "core/html/HTMLDataListOptionsCollection.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/HTMLImageLoader.h"
#include "core/html/HTMLOptionElement.h"
@@ -1519,8 +1520,8 @@ bool HTMLInputElement::hasValidDataListOptions() const
HTMLDataListElement* dataList = this->dataList();
if (!dataList)
return false;
- RefPtrWillBeRawPtr<HTMLCollection> options = dataList->options();
- for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); ++i) {
+ RefPtrWillBeRawPtr<HTMLDataListOptionsCollection> options = dataList->options();
+ for (unsigned i = 0; HTMLOptionElement* option = options->item(i); ++i) {
if (isValidValue(option->value()))
return true;
}
@@ -1835,8 +1836,8 @@ bool HTMLInputElement::setupDateTimeChooserParameters(DateTimeChooserParameters&
parameters.doubleValue = m_inputType->valueAsDouble();
parameters.isAnchorElementRTL = m_inputType->computedTextDirection() == RTL;
if (HTMLDataListElement* dataList = this->dataList()) {
- RefPtrWillBeRawPtr<HTMLCollection> options = dataList->options();
- for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); ++i) {
+ RefPtrWillBeRawPtr<HTMLDataListOptionsCollection> options = dataList->options();
+ for (unsigned i = 0; HTMLOptionElement* option = options->item(i); ++i) {
if (!isValidValue(option->value()))
continue;
DateTimeSuggestion suggestion;

Powered by Google App Engine
This is Rietveld 408576698