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

Unified Diff: third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp

Issue 2554953005: Avoid WTF::Vector::at() and operator[] in core/events. (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/events/TreeScopeEventContext.cpp
diff --git a/third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp b/third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp
index 93bfbea6fc27725f3bf5bb08f683ae86a154b5ec..b7ab3e248e4c25e5831fc946452b6048a317381f 100644
--- a/third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp
+++ b/third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp
@@ -112,10 +112,10 @@ int TreeScopeEventContext::calculateTreeOrderAndSetNearestAncestorClosedTree(
(rootNode().isShadowRoot() && !toShadowRoot(rootNode()).isOpenOrV0())
? this
: nearestAncestorClosedTreeScopeEventContext;
- for (size_t i = 0; i < m_children.size(); ++i)
- orderNumber =
- m_children[i]->calculateTreeOrderAndSetNearestAncestorClosedTree(
- orderNumber + 1, containingClosedShadowTree());
+ for (const auto& context : m_children) {
+ orderNumber = context->calculateTreeOrderAndSetNearestAncestorClosedTree(
+ orderNumber + 1, containingClosedShadowTree());
+ }
m_postOrder = orderNumber + 1;
return orderNumber + 1;

Powered by Google App Engine
This is Rietveld 408576698