| Index: Source/core/html/HTMLOptionsCollection.cpp
|
| diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp
|
| index cc465b5142b3395bc5d72f86d8bfe8f43b8b6a43..86bc30511f58b4ae01682cfe710ac7985296fe89 100644
|
| --- a/Source/core/html/HTMLOptionsCollection.cpp
|
| +++ b/Source/core/html/HTMLOptionsCollection.cpp
|
| @@ -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,7 +118,7 @@ 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;
|
| this->namedItems(name, namedItems);
|
| @@ -126,12 +127,12 @@ void HTMLOptionsCollection::namedGetter(const AtomicString& name, RefPtrWillBeRa
|
| 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)
|
|
|