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

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

Issue 680193003: IDL: Generate union type containers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 425ae2b406e1b74ef8734b7c18b87d0647d18590..a550d52fb7174b3c6dc971f13869d085e5d554f8 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -27,6 +27,7 @@
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/ScriptEventListener.h"
+#include "bindings/core/v8/UnionTypesCore.h"
#include "bindings/core/v8/V8DOMActivityLogger.h"
#include "core/HTMLNames.h"
#include "core/dom/Attribute.h"
@@ -830,7 +831,7 @@ void HTMLFormElement::copyNonAttributePropertiesFromElement(const Element& sourc
HTMLElement::copyNonAttributePropertiesFromElement(source);
}
-void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, RefPtrWillBeRawPtr<RadioNodeList>& returnValue0, RefPtrWillBeRawPtr<Element>& returnValue1)
+void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, RadioNodeListOrElement& returnValue)
{
// Call getNamedElements twice, first time check if it has a value
// and let HTMLFormElement update its cache.
@@ -849,12 +850,12 @@ void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, RefPtrWillB
ASSERT(!elements.isEmpty());
if (elements.size() == 1) {
- returnValue1 = elements.at(0);
+ returnValue.setElement(elements.at(0));
return;
}
bool onlyMatchImg = !elements.isEmpty() && isHTMLImageElement(*elements.first());
- returnValue0 = radioNodeList(name, onlyMatchImg);
+ returnValue.setRadioNodeList(radioNodeList(name, onlyMatchImg));
}
void HTMLFormElement::setDemoted(bool demoted)

Powered by Google App Engine
This is Rietveld 408576698