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

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: Test style adjustments + const'ify new RadioNodeList field. 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
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/html/CollectionType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index abea9efac4e4575ab753b4659de30b15875035a5..8a8500ab62b246ed64f80cabf14a6a84afb9ac4e 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -1352,16 +1352,17 @@ 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));
- return ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioNodeList>(this, RadioNodeListType, name);
+ CollectionType type = onlyMatchImgElements ? RadioImgNodeListType : RadioNodeListType;
+ return ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioNodeList>(this, type, name);
}
PassRefPtr<Element> Node::querySelector(const AtomicString& selectors, ExceptionState& exceptionState)
{
if (selectors.isEmpty()) {
- exceptionState.throwDOMException(SyntaxError, "The provided selector is empty.");
+ exceptionState.throwDOMException(SyntaxError, "The provided selector is empty.");
return 0;
}
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/html/CollectionType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698