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

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

Issue 16081007: Introduce toHTMLInputElement(Node*), and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/html/HTMLInputElement.h ('k') | Source/core/html/shadow/TextControlInnerElements.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/RadioInputType.cpp
diff --git a/Source/core/html/RadioInputType.cpp b/Source/core/html/RadioInputType.cpp
index 8485762efb974cf711db61a3c3dd460b123dff83..d228a9714e02c905bfa2251990e49f943968e9c6 100644
--- a/Source/core/html/RadioInputType.cpp
+++ b/Source/core/html/RadioInputType.cpp
@@ -90,7 +90,7 @@ void RadioInputType::handleKeydownEvent(KeyboardEvent* event)
// Look for more radio buttons.
if (!node->hasTagName(inputTag))
continue;
- HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(node);
+ HTMLInputElement* inputElement = toHTMLInputElement(node);
if (inputElement->form() != element()->form())
break;
if (inputElement->isRadioButton() && inputElement->name() == element()->name() && inputElement->isFocusable()) {
@@ -127,7 +127,7 @@ bool RadioInputType::isKeyboardFocusable(KeyboardEvent* event) const
// skip any other elements in the group.
Node* currentFocusedNode = element()->document()->focusedNode();
if (currentFocusedNode && currentFocusedNode->hasTagName(inputTag)) {
- HTMLInputElement* focusedInput = static_cast<HTMLInputElement*>(currentFocusedNode);
+ HTMLInputElement* focusedInput = toHTMLInputElement(currentFocusedNode);
if (focusedInput->isRadioButton() && focusedInput->form() == element()->form() && focusedInput->name() == element()->name())
return false;
}
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/shadow/TextControlInnerElements.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698