Index: Source/core/rendering/RenderTheme.cpp |
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp |
index d7aa06f9ecdf21f317589ff4cc357d998de3340f..972bcf6c11a8177510972e7bc259e6dcc554732b 100644 |
--- a/Source/core/rendering/RenderTheme.cpp |
+++ b/Source/core/rendering/RenderTheme.cpp |
@@ -711,14 +711,14 @@ bool RenderTheme::isActive(const RenderObject* o) const |
bool RenderTheme::isChecked(const RenderObject* o) const |
{ |
- if (!o->node() || !o->node()->hasTagName(inputTag)) |
+ if (!isHTMLInputElement(o->node())) |
return false; |
return toHTMLInputElement(o->node())->shouldAppearChecked(); |
} |
bool RenderTheme::isIndeterminate(const RenderObject* o) const |
{ |
- if (!o->node() || !o->node()->hasTagName(inputTag)) |
+ if (!isHTMLInputElement(o->node())) |
return false; |
return toHTMLInputElement(o->node())->shouldAppearIndeterminate(); |
} |
@@ -864,7 +864,7 @@ bool RenderTheme::paintMeter(RenderObject*, const PaintInfo&, const IntRect&) |
void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo, const IntRect& rect) |
{ |
Node* node = o->node(); |
- if (!node || !node->hasTagName(inputTag)) |
+ if (!isHTMLInputElement(node)) |
return; |
HTMLInputElement* input = toHTMLInputElement(node); |
@@ -923,9 +923,9 @@ void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo, |
GraphicsContextStateSaver stateSaver(*paintInfo.context); |
paintInfo.context->setFillColor(o->resolveColor(CSSPropertyColor)); |
for (unsigned i = 0; Element* element = options->item(i); i++) { |
- ASSERT(element->hasTagName(optionTag)); |
- HTMLOptionElement* optionElement = toHTMLOptionElement(element); |
- String value = optionElement->value(); |
+ ASSERT(isHTMLOptionElement(*element)); |
+ HTMLOptionElement& optionElement = toHTMLOptionElement(*element); |
+ String value = optionElement.value(); |
if (!input->isValidValue(value)) |
continue; |
double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(value)); |