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

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

Issue 466323002: IDL: Use Nullable for union type return value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 cb71f01a4a7b523b17dcabebfb5282a69d45a7e9..4275c85cd2d9816e3233658a28ea896a40f9669e 100644
--- a/Source/core/html/HTMLFormControlsCollection.cpp
+++ b/Source/core/html/HTMLFormControlsCollection.cpp
@@ -193,7 +193,7 @@ void HTMLFormControlsCollection::updateIdNameCache() const
setNamedItemCache(cache.release());
}
-void HTMLFormControlsCollection::namedGetter(const AtomicString& name, bool& radioNodeListEnabled, RefPtrWillBeRawPtr<RadioNodeList>& radioNodeList, bool& elementEnabled, RefPtrWillBeRawPtr<Element>& element)
+void HTMLFormControlsCollection::namedGetter(const AtomicString& name, Nullable<RefPtrWillBeRawPtr<RadioNodeList> >& radioNodeList, Nullable<RefPtrWillBeRawPtr<Element> >& element)
{
WillBeHeapVector<RefPtrWillBeMember<Element> > namedItems;
this->namedItems(name, namedItems);
@@ -202,13 +202,11 @@ void HTMLFormControlsCollection::namedGetter(const AtomicString& name, bool& rad
return;
if (namedItems.size() == 1) {
- elementEnabled = true;
- element = namedItems.at(0);
+ element.set(namedItems.at(0));
return;
}
- radioNodeListEnabled = true;
- radioNodeList = ownerNode().radioNodeList(name);
+ radioNodeList.set(ownerNode().radioNodeList(name));
}
void HTMLFormControlsCollection::supportedPropertyNames(Vector<String>& names)

Powered by Google App Engine
This is Rietveld 408576698