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

Unified Diff: third_party/WebKit/Source/core/html/HTMLAllCollection.cpp

Issue 2765653002: Remove a level of indirection in HTMLCollection. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/html/HTMLCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLAllCollection.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLAllCollection.cpp b/third_party/WebKit/Source/core/html/HTMLAllCollection.cpp
index 5baa77a55fc9ecf93245546c1a303e6c7daa1bc8..139a6608455f0cd28d898975a01bdca4168b2ceb 100644
--- a/third_party/WebKit/Source/core/html/HTMLAllCollection.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLAllCollection.cpp
@@ -47,18 +47,18 @@ Element* HTMLAllCollection::namedItemWithIndex(const AtomicString& name,
updateIdNameCache();
const NamedItemCache& cache = namedItemCache();
- if (HeapVector<Member<Element>>* elements = cache.getElementsById(name)) {
+ if (const auto* elements = cache.getElementsById(name)) {
if (index < elements->size())
return elements->at(index);
index -= elements->size();
}
- if (HeapVector<Member<Element>>* elements = cache.getElementsByName(name)) {
+ if (const auto* elements = cache.getElementsByName(name)) {
if (index < elements->size())
return elements->at(index);
}
- return 0;
+ return nullptr;
}
void HTMLAllCollection::namedGetter(const AtomicString& name,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698