Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index abea9efac4e4575ab753b4659de30b15875035a5..1bc66db50a4ac8bb1c31658fcc1475cdcf6b38dd 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -1352,9 +1352,12 @@ PassRefPtr<NodeList> Node::getElementsByClassName(const String& classNames) |
return ensureRareData().ensureNodeLists().addCacheWithName<ClassNodeList>(this, ClassNodeListType, classNames); |
} |
-PassRefPtr<RadioNodeList> Node::radioNodeList(const AtomicString& name) |
+PassRefPtr<RadioNodeList> Node::radioNodeList(const AtomicString& name, bool onlyMatchImgElements) |
{ |
ASSERT(hasTagName(formTag) || hasTagName(fieldsetTag)); |
+ if (onlyMatchImgElements) |
+ return static_pointer_cast<RadioNodeList>(ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioImgNodeList>(this, RadioNodeListType, name)); |
+ |
return ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioNodeList>(this, RadioNodeListType, name); |
} |