| Index: third_party/WebKit/Source/core/html/HTMLCollection.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLCollection.cpp b/third_party/WebKit/Source/core/html/HTMLCollection.cpp
|
| index 1606c2755ed2a9fd3061c40aa7798ec62289e538..74f3b7f53452fe1c35c228455e6812ce88de2b4d 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLCollection.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLCollection.cpp
|
| @@ -512,13 +512,13 @@ void HTMLCollection::namedItems(const AtomicString& name,
|
|
|
| const NamedItemCache& cache = namedItemCache();
|
| if (HeapVector<Member<Element>>* idResults = cache.getElementsById(name)) {
|
| - for (unsigned i = 0; i < idResults->size(); ++i)
|
| - result.append(idResults->at(i));
|
| + for (const auto& element : *idResults)
|
| + result.append(element);
|
| }
|
| if (HeapVector<Member<Element>>* nameResults =
|
| cache.getElementsByName(name)) {
|
| - for (unsigned i = 0; i < nameResults->size(); ++i)
|
| - result.append(nameResults->at(i));
|
| + for (const auto& element : *nameResults)
|
| + result.append(element);
|
| }
|
| }
|
|
|
|
|