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

Unified Diff: Source/core/dom/LiveNodeList.cpp

Issue 144313014: Remove NodeList's anonymous named getter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another clang build fix 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/LiveNodeList.h ('k') | Source/core/dom/NamedNodesCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/LiveNodeList.cpp
diff --git a/Source/core/dom/LiveNodeList.cpp b/Source/core/dom/LiveNodeList.cpp
index c0c2034974f2727ac70a59a019facc92941e6fbc..08d9d86b82f384a48cdadda44e60c1f85896c474 100644
--- a/Source/core/dom/LiveNodeList.cpp
+++ b/Source/core/dom/LiveNodeList.cpp
@@ -46,28 +46,4 @@ void LiveNodeList::invalidateCache() const
m_collectionIndexCache.invalidate();
}
-Node* LiveNodeList::namedItem(const AtomicString& elementId) const
-{
- Node& rootNode = this->rootNode();
-
- if (rootNode.inDocument()) {
- Element* element = rootNode.treeScope().getElementById(elementId);
- if (element && nodeMatches(*element) && element->isDescendantOf(&rootNode))
- return element;
- if (!element)
- return 0;
- // In the case of multiple nodes with the same name, just fall through.
- }
-
- unsigned length = this->length();
- for (unsigned i = 0; i < length; i++) {
- Node* node = item(i);
- // FIXME: This should probably be using getIdAttribute instead of idForStyleResolution.
- if (node->hasID() && toElement(node)->idForStyleResolution() == elementId)
- return node;
- }
-
- return 0;
-}
-
} // namespace WebCore
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/dom/NamedNodesCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698