Index: Source/core/html/forms/RadioInputType.cpp |
diff --git a/Source/core/html/forms/RadioInputType.cpp b/Source/core/html/forms/RadioInputType.cpp |
index 36a2c66bc42a3cbbfdf00fb8457eac8df5aa0e30..7b96112b0229f625446a000931b7471f6aeef62c 100644 |
--- a/Source/core/html/forms/RadioInputType.cpp |
+++ b/Source/core/html/forms/RadioInputType.cpp |
@@ -103,7 +103,7 @@ void RadioInputType::handleKeydownEvent(KeyboardEvent* event) |
HTMLInputElement* inputElement = toHTMLInputElement(htmlElement); |
if (inputElement->form() != element().form()) |
break; |
- if (inputElement->isRadioButton() && inputElement->name() == element().name() && inputElement->isFocusable()) { |
+ if (inputElement->type() == InputTypeNames::radio && inputElement->name() == element().name() && inputElement->isFocusable()) { |
RefPtrWillBeRawPtr<HTMLInputElement> protector(inputElement); |
document.setFocusedElement(inputElement); |
inputElement->dispatchSimulatedClick(event, SendNoEvents); |
@@ -139,7 +139,7 @@ bool RadioInputType::isKeyboardFocusable() const |
Element* currentFocusedElement = element().document().focusedElement(); |
if (isHTMLInputElement(currentFocusedElement)) { |
HTMLInputElement& focusedInput = toHTMLInputElement(*currentFocusedElement); |
- if (focusedInput.isRadioButton() && focusedInput.form() == element().form() && focusedInput.name() == element().name()) |
+ if (focusedInput.type() == InputTypeNames::radio && focusedInput.form() == element().form() && focusedInput.name() == element().name()) |
return false; |
} |
@@ -179,7 +179,7 @@ void RadioInputType::didDispatchClick(Event* event, const ClickHandlingState& st |
// Make sure it is still a radio button and only do the restoration if it still belongs to our group. |
HTMLInputElement* checkedRadioButton = state.checkedRadioButton.get(); |
if (checkedRadioButton |
- && checkedRadioButton->isRadioButton() |
+ && checkedRadioButton->type() == InputTypeNames::radio |
&& checkedRadioButton->form() == element().form() |
&& checkedRadioButton->name() == element().name()) { |
checkedRadioButton->setChecked(true); |
@@ -190,11 +190,6 @@ void RadioInputType::didDispatchClick(Event* event, const ClickHandlingState& st |
event->setDefaultHandled(); |
} |
-bool RadioInputType::isRadioButton() const |
-{ |
- return true; |
-} |
- |
bool RadioInputType::shouldAppearIndeterminate() const |
{ |
return !element().checkedRadioButtonForGroup(); |