Index: Source/core/rendering/RenderTheme.cpp |
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp |
index 3af370b9720ee4011b5809f06c9d81445746a5f5..f330134f4c697daefa9909270f0bb4f0a0f28fba 100644 |
--- a/Source/core/rendering/RenderTheme.cpp |
+++ b/Source/core/rendering/RenderTheme.cpp |
@@ -827,7 +827,7 @@ bool RenderTheme::isSpinUpButtonPartPressed(const RenderObject* o) const |
if (!node || !node->active() || !node->isElementNode() |
|| !toElement(node)->isSpinButtonElement()) |
return false; |
- SpinButtonElement* element = static_cast<SpinButtonElement*>(node); |
+ SpinButtonElement* element = toSpinButtonElement(node); |
return element->upDownState() == SpinButtonElement::Up; |
} |
@@ -846,7 +846,7 @@ bool RenderTheme::isHovered(const RenderObject* o) const |
return false; |
if (!node->isElementNode() || !toElement(node)->isSpinButtonElement()) |
return node->hovered(); |
- SpinButtonElement* element = static_cast<SpinButtonElement*>(node); |
+ SpinButtonElement* element = toSpinButtonElement(node); |
return element->hovered() && element->upDownState() != SpinButtonElement::Indeterminate; |
} |
@@ -855,7 +855,7 @@ bool RenderTheme::isSpinUpButtonPartHovered(const RenderObject* o) const |
Node* node = o->node(); |
if (!node || !node->isElementNode() || !toElement(node)->isSpinButtonElement()) |
return false; |
- SpinButtonElement* element = static_cast<SpinButtonElement*>(node); |
+ SpinButtonElement* element = toSpinButtonElement(node); |
return element->upDownState() == SpinButtonElement::Up; |
} |