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

Unified Diff: Source/core/html/RadioNodeList.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.cpp ('k') | Source/core/html/RangeInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/RadioNodeList.cpp
diff --git a/Source/core/html/RadioNodeList.cpp b/Source/core/html/RadioNodeList.cpp
index 9e0b10b8598fb2ab7367779168b270c9d61ddbf8..7caf143362cd602d82b584ec6e8ca65628e86549 100644
--- a/Source/core/html/RadioNodeList.cpp
+++ b/Source/core/html/RadioNodeList.cpp
@@ -49,12 +49,12 @@ RadioNodeList::~RadioNodeList()
ownerNode()->nodeLists()->removeCacheWithAtomicName(this, RadioNodeListType, m_name);
}
-static inline HTMLInputElement* toRadioButtonInputElement(Node* node)
+static inline Result<HTMLInputElement> toRadioButtonInputElement(Node* node)
{
ASSERT(node->isElementNode());
- HTMLInputElement* inputElement = node->toInputElement();
+ Handle<HTMLInputElement> inputElement = node->toInputElement();
if (!inputElement || !inputElement->isRadioButton() || inputElement->value().isEmpty())
- return 0;
+ return nullptr;
return inputElement;
}
@@ -62,7 +62,7 @@ String RadioNodeList::value() const
{
for (unsigned i = 0; i < length(); ++i) {
Node* node = item(i);
- const HTMLInputElement* inputElement = toRadioButtonInputElement(node);
+ Handle<const HTMLInputElement> inputElement = toRadioButtonInputElement(node);
if (!inputElement || !inputElement->checked())
continue;
return inputElement->value();
@@ -74,7 +74,7 @@ void RadioNodeList::setValue(const String& value)
{
for (unsigned i = 0; i < length(); ++i) {
Node* node = item(i);
- HTMLInputElement* inputElement = toRadioButtonInputElement(node);
+ Handle<HTMLInputElement> inputElement = toRadioButtonInputElement(node);
if (!inputElement || inputElement->value() != value)
continue;
inputElement->setChecked(true);
@@ -103,7 +103,7 @@ bool RadioNodeList::nodeMatches(Element* testElement) const
if (!testElement->hasTagName(objectTag) && !testElement->isFormControlElement())
return false;
- if (HTMLInputElement* inputElement = testElement->toInputElement()) {
+ if (Handle<HTMLInputElement> inputElement = testElement->toInputElement()) {
if (inputElement->isImageButton())
return false;
}
« no previous file with comments | « Source/core/html/RadioInputType.cpp ('k') | Source/core/html/RangeInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698