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

Unified Diff: Source/web/WebNode.cpp

Issue 143453010: Have getElementsByClassName() / getElementsByTagName*() return an HTMLCollection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 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
« no previous file with comments | « Source/web/WebHelperPluginImpl.cpp ('k') | Source/web/WebNodeList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebNode.cpp
diff --git a/Source/web/WebNode.cpp b/Source/web/WebNode.cpp
index d069fbd48f24f35d334d96567f414ee45dc28a16..ba4168ea944a262105a6119d8d94607a364ebe43 100644
--- a/Source/web/WebNode.cpp
+++ b/Source/web/WebNode.cpp
@@ -38,17 +38,18 @@
#include "WebDocument.h"
#include "WebElement.h"
#include "WebFrameImpl.h"
+#include "WebNodeCollection.h"
#include "WebNodeList.h"
#include "WebPluginContainer.h"
#include "WebPluginContainerImpl.h"
#include "bindings/v8/ExceptionState.h"
#include "core/dom/Document.h"
#include "core/dom/Element.h"
-#include "core/dom/EmptyNodeList.h"
-#include "core/events/Event.h"
#include "core/dom/Node.h"
#include "core/dom/NodeList.h"
#include "core/editing/markup.h"
+#include "core/events/Event.h"
+#include "core/html/HTMLCollection.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderWidget.h"
#include "platform/Widget.h"
@@ -191,11 +192,11 @@ void WebNode::simulateClick()
m_private->dispatchSimulatedClick(0);
}
-WebNodeList WebNode::getElementsByTagName(const WebString& tag) const
+WebNodeCollection WebNode::getElementsByTagName(const WebString& tag) const
{
if (m_private->isContainerNode())
- return WebNodeList(toContainerNode(m_private.get())->getElementsByTagName(tag));
- return WebNodeList(EmptyNodeList::create(m_private.get()));
+ return WebNodeCollection(toContainerNode(m_private.get())->getElementsByTagName(tag));
+ return WebNodeCollection();
}
WebElement WebNode::querySelector(const WebString& tag, WebExceptionCode& ec) const
« no previous file with comments | « Source/web/WebHelperPluginImpl.cpp ('k') | Source/web/WebNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698