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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.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/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index d707d0d2e4e046919580a86a6645da23eb19b8cc..c34438007902b7978798d93f15501be8bc43cfc5 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -559,8 +559,8 @@ void StyleEngine::removeFontFaceRules(
return;
FontFaceCache* cache = m_fontSelector->fontFaceCache();
- for (unsigned i = 0; i < fontFaceRules.size(); ++i)
- cache->remove(fontFaceRules[i]);
+ for (const auto& rule : fontFaceRules)
+ cache->remove(rule);
if (m_resolver)
m_resolver->invalidateMatchedPropertiesCache();
}

Powered by Google App Engine
This is Rietveld 408576698