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

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

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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/RadioInputType.h ('k') | Source/core/html/RadioNodeList.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 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()
« no previous file with comments | « Source/core/html/RadioInputType.h ('k') | Source/core/html/RadioNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698