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

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

Issue 141683004: Use more const references in HTMLCollection / LiveNodeList (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Get rid of const_cast 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/NameNodeList.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 0abe761789a49da4f51ef337d78d56bcb53d4155..8f3bd6e8fe3a0ac00f0541add1d0b282416eaddc 100644
--- a/Source/core/dom/LiveNodeList.cpp
+++ b/Source/core/dom/LiveNodeList.cpp
@@ -61,7 +61,7 @@ Node* LiveNodeList::namedItem(const AtomicString& elementId) const
if (rootNode.inDocument()) {
Element* element = rootNode.treeScope().getElementById(elementId);
- if (element && nodeMatches(element) && element->isDescendantOf(&rootNode))
+ if (element && nodeMatches(*element) && element->isDescendantOf(&rootNode))
return element;
if (!element)
return 0;
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/dom/NameNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698