Index: Source/core/html/HTMLFormControlsCollection.cpp |
diff --git a/Source/core/html/HTMLFormControlsCollection.cpp b/Source/core/html/HTMLFormControlsCollection.cpp |
index e4d0793c56614d37296b218aabdd6aea06a85144..e2bf78aee70e1292ee3defb85a2cfd556078eb3a 100644 |
--- a/Source/core/html/HTMLFormControlsCollection.cpp |
+++ b/Source/core/html/HTMLFormControlsCollection.cpp |
@@ -161,4 +161,18 @@ void HTMLFormControlsCollection::updateNameCache() const |
setHasNameCache(); |
} |
+WTF::UnionType2<RadioNodeList, Node> HTMLFormControlsCollection::namedGetter(const AtomicString& name) |
+{ |
+ Vector<RefPtr<Node> > namedItems; |
+ this->namedItems(name, namedItems); |
+ |
+ if (!namedItems.size()) |
+ return WTF::UnionType2<RadioNodeList, Node>(); |
+ |
+ if (namedItems.size() == 1) |
+ return WTF::UnionType2<RadioNodeList, Node>(namedItems.at(0).release()); |
+ |
+ return WTF::UnionType2<RadioNodeList, Node>(this->ownerNode()->radioNodeList(name)); |
+} |
+ |
} |