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

Unified Diff: third_party/WebKit/Source/core/html/HTMLElement.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/HTMLElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp
index 0bf6ef826db5e5c44e923ec5000290a82c0bb844..f09922197c3f80765ef167fa650db48f8669f711 100644
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -419,9 +419,8 @@ const AtomicString& HTMLElement::eventNameForAttributeName(
{onwheelAttr, EventTypeNames::wheel},
};
- for (size_t i = 0; i < WTF_ARRAY_LENGTH(attrToEventNames); i++)
- attributeNameToEventNameMap.set(attrToEventNames[i].attr.localName(),
- attrToEventNames[i].event);
+ for (const auto& name : attrToEventNames)
+ attributeNameToEventNameMap.set(name.attr.localName(), name.event);
}
return attributeNameToEventNameMap.get(attrName.localName());

Powered by Google App Engine
This is Rietveld 408576698