Index: Source/core/html/RadioInputType.cpp |
diff --git a/Source/core/html/RadioInputType.cpp b/Source/core/html/RadioInputType.cpp |
index 10c1c2cd148d87b5f167511f4e88aa50af971045..7a95037cacbb17cd7e9628c457548336498c7bba 100644 |
--- a/Source/core/html/RadioInputType.cpp |
+++ b/Source/core/html/RadioInputType.cpp |
@@ -38,7 +38,7 @@ namespace WebCore { |
using namespace HTMLNames; |
-PassOwnPtr<InputType> RadioInputType::create(HTMLInputElement* element) |
+PassOwnPtr<InputType> RadioInputType::create(Handle<HTMLInputElement> element) |
{ |
return adoptPtr(new RadioInputType(element)); |
} |
@@ -84,7 +84,7 @@ void RadioInputType::handleKeydownEvent(KeyboardEvent* event) |
// We can only stay within the form's children if the form hasn't been demoted to a leaf because |
// of malformed HTML. |
- Node* node = element(); |
+ Node* node = Handle<HTMLInputElement>(element()).raw(); |
while ((node = (forward ? NodeTraversal::next(node) : NodeTraversal::previous(node)))) { |
// Once we encounter a form element, we know we're through. |
if (node->hasTagName(formTag)) |
@@ -92,11 +92,11 @@ void RadioInputType::handleKeydownEvent(KeyboardEvent* event) |
// Look for more radio buttons. |
if (!node->hasTagName(inputTag)) |
continue; |
- HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(node); |
+ Handle<HTMLInputElement> inputElement(static_cast<HTMLInputElement*>(node)); |
if (inputElement->form() != element()->form()) |
break; |
if (inputElement->isRadioButton() && inputElement->name() == element()->name() && inputElement->isFocusable()) { |
- document->setFocusedNode(inputElement); |
+ document->setFocusedNode(inputElement.raw()); |
inputElement->dispatchSimulatedClick(event, SendNoEvents, DoNotShowPressedLook); |
event->setDefaultHandled(); |
return; |
@@ -129,7 +129,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); |
+ Handle<HTMLInputElement> focusedInput(static_cast<HTMLInputElement*>(currentFocusedNode)); |
if (focusedInput->isRadioButton() && focusedInput->form() == element()->form() && focusedInput->name() == element()->name()) |
return false; |
} |
@@ -168,7 +168,7 @@ void RadioInputType::didDispatchClick(Event* event, const ClickHandlingState& st |
if (event->defaultPrevented() || event->defaultHandled()) { |
// Restore the original selected radio button if possible. |
// 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(); |
+ Handle<HTMLInputElement> checkedRadioButton = state.checkedRadioButton; |
if (checkedRadioButton |
&& checkedRadioButton->isRadioButton() |
&& checkedRadioButton->form() == element()->form() |