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

Unified Diff: Source/core/dom/ClassCollection.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/core/dom/ClassCollection.h ('k') | Source/core/dom/ClassNodeList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ClassCollection.cpp
diff --git a/Source/core/dom/ClassNodeList.cpp b/Source/core/dom/ClassCollection.cpp
similarity index 83%
rename from Source/core/dom/ClassNodeList.cpp
rename to Source/core/dom/ClassCollection.cpp
index 39f85ef0b9169626c3c16d0c9502da422e0f0a43..35a62e51867e92fb83a4d7561c9ab3677c15e97f 100644
--- a/Source/core/dom/ClassNodeList.cpp
+++ b/Source/core/dom/ClassCollection.cpp
@@ -28,28 +28,23 @@
*/
#include "config.h"
-#include "core/dom/ClassNodeList.h"
+#include "core/dom/ClassCollection.h"
#include "core/dom/Document.h"
#include "core/dom/NodeRareData.h"
namespace WebCore {
-ClassNodeList::ClassNodeList(PassRefPtr<ContainerNode> rootNode, const AtomicString& classNames)
- : LiveNodeList(rootNode, ClassNodeListType, InvalidateOnClassAttrChange)
+ClassCollection::ClassCollection(ContainerNode* rootNode, const AtomicString& classNames)
+ : HTMLCollection(rootNode, ClassCollectionType, DoesNotOverrideItemAfter)
, m_classNames(classNames, document().inQuirksMode())
, m_originalClassNames(classNames)
{
}
-ClassNodeList::~ClassNodeList()
+ClassCollection::~ClassCollection()
{
- ownerNode()->nodeLists()->removeCacheWithAtomicName(this, ClassNodeListType, m_originalClassNames);
-}
-
-bool ClassNodeList::nodeMatches(const Element& testNode) const
-{
- return nodeMatchesInlined(testNode);
+ ownerNode()->nodeLists()->removeCacheWithAtomicName(this, ClassCollectionType, m_originalClassNames);
}
} // namespace WebCore
« no previous file with comments | « Source/core/dom/ClassCollection.h ('k') | Source/core/dom/ClassNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698