Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / HTMLOptionsCollection.cpp
index cc465b5..672737e 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/UnionTypesCore.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/StaticNodeList.h"
 #include "core/html/HTMLOptionElement.h"
@@ -117,21 +118,21 @@ void HTMLOptionsCollection::setLength(unsigned length, ExceptionState& exception
     toHTMLSelectElement(ownerNode()).setLength(length, exceptionState);
 }
 
-void HTMLOptionsCollection::namedGetter(const AtomicString& name, RefPtrWillBeRawPtr<NodeList>& returnValue0, RefPtrWillBeRawPtr<Element>& returnValue1)
+void HTMLOptionsCollection::namedGetter(const AtomicString& name, NodeListOrElement& returnValue)
 {
-    WillBeHeapVector<RefPtrWillBeMember<Element> > namedItems;
+    WillBeHeapVector<RefPtrWillBeMember<Element>> namedItems;
     this->namedItems(name, namedItems);
 
     if (!namedItems.size())
         return;
 
     if (namedItems.size() == 1) {
-        returnValue1 = namedItems.at(0);
+        returnValue.setElement(namedItems.at(0));
         return;
     }
 
     // FIXME: The spec and Firefox do not return a NodeList. They always return the first matching Element.
-    returnValue0 = StaticElementList::adopt(namedItems);
+    returnValue.setNodeList(StaticElementList::adopt(namedItems));
 }
 
 bool HTMLOptionsCollection::anonymousIndexedSetter(unsigned index, PassRefPtrWillBeRawPtr<HTMLOptionElement> value, ExceptionState& exceptionState)