Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / HTMLAllCollection.cpp
index 38c620a..cf4ce61 100644 (file)
@@ -27,9 +27,9 @@
 #include "core/html/HTMLAllCollection.h"
 
 #include "core/dom/Element.h"
-#include "core/dom/NamedNodesCollection.h"
+#include "core/dom/StaticNodeList.h"
 
-namespace WebCore {
+namespace blink {
 
 PassRefPtrWillBeRawPtr<HTMLAllCollection> HTMLAllCollection::create(ContainerNode& node, CollectionType type)
 {
@@ -66,7 +66,7 @@ Element* HTMLAllCollection::namedItemWithIndex(const AtomicString& name, unsigne
     return 0;
 }
 
-void HTMLAllCollection::namedGetter(const AtomicString& name, bool& returnValue0Enabled, RefPtrWillBeRawPtr<NodeList>& returnValue0, bool& returnValue1Enabled, RefPtrWillBeRawPtr<Element>& returnValue1)
+void HTMLAllCollection::namedGetter(const AtomicString& name, RefPtrWillBeRawPtr<NodeList>& returnValue0, RefPtrWillBeRawPtr<Element>& returnValue1)
 {
     WillBeHeapVector<RefPtrWillBeMember<Element> > namedItems;
     this->namedItems(name, namedItems);
@@ -75,15 +75,13 @@ void HTMLAllCollection::namedGetter(const AtomicString& name, bool& returnValue0
         return;
 
     if (namedItems.size() == 1) {
-        returnValue1Enabled = true;
         returnValue1 = namedItems.at(0);
         return;
     }
 
     // FIXME: HTML5 specification says this should be a HTMLCollection.
     // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
-    returnValue0Enabled = true;
-    returnValue0 = NamedNodesCollection::create(namedItems);
+    returnValue0 = StaticElementList::adopt(namedItems);
 }
 
-} // namespace WebCore
+} // namespace blink