Index: Source/core/html/HTMLAllCollection.cpp |
diff --git a/Source/core/html/HTMLAllCollection.cpp b/Source/core/html/HTMLAllCollection.cpp |
index 2a61b07a19f860329648345769c7ac31f995ec9d..2d23c26da048a37fd38d5c4349aa6cd2459e8c92 100644 |
--- a/Source/core/html/HTMLAllCollection.cpp |
+++ b/Source/core/html/HTMLAllCollection.cpp |
@@ -30,12 +30,12 @@ |
namespace WebCore { |
-PassRefPtr<HTMLAllCollection> HTMLAllCollection::create(Node* node, CollectionType type) |
+PassRefPtr<HTMLAllCollection> HTMLAllCollection::create(const Handle<Node>& node, CollectionType type) |
{ |
return adoptRef(new HTMLAllCollection(node, type)); |
} |
-HTMLAllCollection::HTMLAllCollection(Node* node, CollectionType type) |
+HTMLAllCollection::HTMLAllCollection(const Handle<Node>& node, CollectionType type) |
: HTMLCollection(node, type, DoesNotOverrideItemAfter) |
{ |
ScriptWrappable::init(this); |
@@ -45,22 +45,22 @@ HTMLAllCollection::~HTMLAllCollection() |
{ |
} |
-Node* HTMLAllCollection::namedItemWithIndex(const AtomicString& name, unsigned index) const |
+Result<Node> HTMLAllCollection::namedItemWithIndex(const AtomicString& name, unsigned index) const |
{ |
updateNameCache(); |
if (CollectionRoot<Vector<Member<Element> > >* cache = idCache(name)) { |
if (index < (*cache)->size()) |
- return (*cache)->at(index).handle().raw(); |
+ return (*cache)->at(index); |
index -= (*cache)->size(); |
} |
if (CollectionRoot<Vector<Member<Element> > >* cache = nameCache(name)) { |
if (index < (*cache)->size()) |
- return (*cache)->at(index).handle().raw(); |
+ return (*cache)->at(index); |
} |
- return 0; |
+ return nullptr; |
} |
} // namespace WebCore |