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

Unified Diff: Source/core/rendering/RenderTheme.cpp

Issue 24253004: Cleanup: Start using toFoo methods as part of newly adopted coding guideline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/core/rendering/RenderMenuList.cpp ('k') | Source/core/rendering/svg/RenderSVGInlineText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/core/rendering/RenderMenuList.cpp ('k') | Source/core/rendering/svg/RenderSVGInlineText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698