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

Unified Diff: Source/core/html/HTMLFormControlsCollection.cpp

Issue 15076011: Support union return type for anonymous named/indexed getter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 7 months 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/html/HTMLFormControlsCollection.cpp
diff --git a/Source/core/html/HTMLFormControlsCollection.cpp b/Source/core/html/HTMLFormControlsCollection.cpp
index e4d0793c56614d37296b218aabdd6aea06a85144..b0b1eb840a0072f9f06480ffca9526048bf91c9b 100644
--- a/Source/core/html/HTMLFormControlsCollection.cpp
+++ b/Source/core/html/HTMLFormControlsCollection.cpp
@@ -161,4 +161,20 @@ void HTMLFormControlsCollection::updateNameCache() const
setHasNameCache();
}
+void HTMLFormControlsCollection::namedGetter(const AtomicString& name, RefPtr<RadioNodeList>& returnValue1, RefPtr<Node>& returnValue2)
+{
+ Vector<RefPtr<Node> > namedItems;
+ this->namedItems(name, namedItems);
+
+ if (!namedItems.size())
+ return;
+
+ if (namedItems.size() == 1) {
+ returnValue2 = namedItems.at(0);
+ return;
+ }
+
+ returnValue1 = this->ownerNode()->radioNodeList(name);
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698