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

Unified Diff: Source/core/html/HTMLFormElement.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/HTMLFormElement.cpp
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
index 6c69dd1946e14c0b665dc0989e943197860ab793..32bfe66ee5dd9b1f28c40b19f6178803fd34f0f1 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -817,7 +817,7 @@ void HTMLFormElement::copyNonAttributePropertiesFromElement(const Element& sourc
HTMLElement::copyNonAttributePropertiesFromElement(source);
}
-void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, bool& returnValue0Enabled, RefPtrWillBeRawPtr<RadioNodeList>& returnValue0, bool& returnValue1Enabled, RefPtrWillBeRawPtr<Element>& returnValue1)
+void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, Nullable<RefPtrWillBeRawPtr<RadioNodeList> >& returnValue0, Nullable<RefPtrWillBeRawPtr<Element> >& returnValue1)
{
// Call getNamedElements twice, first time check if it has a value
// and let HTMLFormElement update its cache.
@@ -836,14 +836,12 @@ void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, bool& retur
ASSERT(!elements.isEmpty());
if (elements.size() == 1) {
- returnValue1Enabled = true;
- returnValue1 = elements.at(0);
+ returnValue1.set(elements.at(0));
return;
}
bool onlyMatchImg = !elements.isEmpty() && isHTMLImageElement(*elements.first());
- returnValue0Enabled = true;
- returnValue0 = radioNodeList(name, onlyMatchImg);
+ returnValue0.set(radioNodeList(name, onlyMatchImg));
}
void HTMLFormElement::setDemoted(bool demoted)

Powered by Google App Engine
This is Rietveld 408576698