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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp

Issue 2556043002: Avoid WTF::Vector::at() and operator[] in core/html. (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/html/parser/HTMLTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
index 7a48396f981a659d1de3d71333f47d2f5d487e36..9fff25be189448ccea757063f7d87ba4bbfe87a5 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -480,8 +480,7 @@ static void adjustAttributes(AtomicHTMLToken* token) {
mapLoweredLocalNameToName(caseMap, attrs.get(), length);
}
- for (unsigned i = 0; i < token->attributes().size(); ++i) {
- Attribute& tokenAttribute = token->attributes().at(i);
+ for (auto& tokenAttribute : token->attributes()) {
const QualifiedName& casedName = caseMap->get(tokenAttribute.localName());
if (!casedName.localName().isNull())
tokenAttribute.parserSetName(casedName);

Powered by Google App Engine
This is Rietveld 408576698