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

Unified Diff: Source/core/rendering/RenderTheme.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/rendering/RenderTheme.cpp
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp
index a23981557e2f02461f5442a86c1f64212808b39c..98a26309a7a2522aa225c4ad352ef656bf28eace 100644
--- a/Source/core/rendering/RenderTheme.cpp
+++ b/Source/core/rendering/RenderTheme.cpp
@@ -32,6 +32,7 @@
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLCollection.h"
#include "core/html/HTMLDataListElement.h"
+#include "core/html/HTMLDataListOptionsCollection.h"
#include "core/html/HTMLFormControlElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLMeterElement.h"
@@ -877,13 +878,11 @@ void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo,
tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.width() * zoomFactor) / 2.0;
tickRegionWidth = trackBounds.height() - thumbSize.width();
}
- RefPtrWillBeRawPtr<HTMLCollection> options = dataList->options();
+ RefPtrWillBeRawPtr<HTMLDataListOptionsCollection> options = dataList->options();
GraphicsContextStateSaver stateSaver(*paintInfo.context);
paintInfo.context->setFillColor(o->resolveColor(CSSPropertyColor));
- for (unsigned i = 0; Element* element = options->item(i); i++) {
- ASSERT(isHTMLOptionElement(*element));
- HTMLOptionElement& optionElement = toHTMLOptionElement(*element);
- String value = optionElement.value();
+ for (unsigned i = 0; HTMLOptionElement* optionElement = options->item(i); i++) {
+ String value = optionElement->value();
if (!input->isValidValue(value))
continue;
double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(value));

Powered by Google App Engine
This is Rietveld 408576698