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

Unified Diff: Source/core/html/HTMLFormElement.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/html/HTMLFormElement.h ('k') | Source/core/html/HTMLFormElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormElement.cpp
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
index 0e5cc98d302923bff3acfd32801c07e7d60006bd..ca59bafd29dccfaffd024562467811175f77201a 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -32,7 +32,6 @@
#include "core/dom/Attribute.h"
#include "core/dom/Document.h"
#include "core/dom/ElementTraversal.h"
-#include "core/dom/NamedNodesCollection.h"
#include "core/events/AutocompleteErrorEvent.h"
#include "core/events/Event.h"
#include "core/events/ScopedEventQueue.h"
@@ -43,6 +42,7 @@
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLObjectElement.h"
#include "core/html/HTMLTableElement.h"
+#include "core/html/RadioNodeList.h"
#include "core/html/forms/FormController.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
@@ -791,7 +791,7 @@ void HTMLFormElement::copyNonAttributePropertiesFromElement(const Element& sourc
HTMLElement::copyNonAttributePropertiesFromElement(source);
}
-void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, bool& returnValue0Enabled, RefPtr<NodeList>& returnValue0, bool& returnValue1Enabled, RefPtr<Node>& returnValue1)
+void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, bool& returnValue0Enabled, RefPtr<RadioNodeList>& returnValue0, bool& returnValue1Enabled, RefPtr<Node>& returnValue1)
{
// Call getNamedElements twice, first time check if it has a value
// and let HTMLFormElement update its cache.
@@ -815,8 +815,9 @@ void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, bool& retur
return;
}
+ bool onlyMatchImg = elements.size() && elements.at(0)->hasTagName(imgTag);
returnValue0Enabled = true;
- returnValue0 = NamedNodesCollection::create(elements);
+ returnValue0 = radioNodeList(name, onlyMatchImg);
}
void HTMLFormElement::setDemoted(bool demoted)
« no previous file with comments | « Source/core/html/HTMLFormElement.h ('k') | Source/core/html/HTMLFormElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698