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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/InsertionPoint.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
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadowV0.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
index da2cae918d1a05759b8d286e9176479a5e5ef5e7..43ebb054c7cd7c8ee87ede7c0ac3102cf0340430 100644
--- a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
@@ -157,10 +157,7 @@ bool InsertionPoint::isActive() const {
// Slow path only when there are more than one shadow elements in a shadow
// tree. That should be a rare case.
- const HeapVector<Member<InsertionPoint>>& insertionPoints =
- shadowRoot->descendantInsertionPoints();
- for (size_t i = 0; i < insertionPoints.size(); ++i) {
- InsertionPoint* point = insertionPoints[i].get();
+ for (const auto& point : shadowRoot->descendantInsertionPoints()) {
if (isHTMLShadowElement(*point))
return point == this;
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadowV0.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698