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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ElementShadowV0.cpp

Issue 2553343002: Avoid WTF::Vector::at() and operator[] in core/dom. (Closed)
Patch Set: Created 4 years 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
Index: third_party/WebKit/Source/core/dom/shadow/ElementShadowV0.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/ElementShadowV0.cpp b/third_party/WebKit/Source/core/dom/shadow/ElementShadowV0.cpp
index 5436c15968ee0bc48c2a0257d8c39ddc09b60ff3..28d5fdab329e5bc0cb7aeca110d0588ad0a28996 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ElementShadowV0.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ElementShadowV0.cpp
@@ -164,10 +164,7 @@ void ElementShadowV0::distribute() {
for (ShadowRoot* root = &youngestShadowRoot(); root;
root = root->olderShadowRoot()) {
HTMLShadowElement* shadowInsertionPoint = 0;
- const HeapVector<Member<InsertionPoint>>& insertionPoints =
- root->descendantInsertionPoints();
- for (size_t i = 0; i < insertionPoints.size(); ++i) {
- InsertionPoint* point = insertionPoints[i];
+ for (const auto& point : root->descendantInsertionPoints()) {
if (!point->isActive())
continue;
if (isHTMLShadowElement(*point)) {

Powered by Google App Engine
This is Rietveld 408576698