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

Unified Diff: Source/core/dom/Node.cpp

Issue 119063002: Have HTMLFormElement's named getter return a RadioNodeList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update expected output for inspector/console/console-format-collections Created 7 years 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698