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

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

Issue 2555743005: Add iterator support to blink::EventPath. (Closed)
Patch Set: Exposed the vector 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/TreeScope.cpp ('k') | third_party/WebKit/Source/core/events/EventPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/Event.cpp
diff --git a/third_party/WebKit/Source/core/events/Event.cpp b/third_party/WebKit/Source/core/events/Event.cpp
index 7f0f5a312e6469d97e5cb97af592b7d0d2c4262b..f09c2ac6f1782615bf5da6437981e9aa882edfc7 100644
--- a/third_party/WebKit/Source/core/events/Event.cpp
+++ b/third_party/WebKit/Source/core/events/Event.cpp
@@ -301,12 +301,9 @@ HeapVector<Member<EventTarget>> Event::pathInternal(ScriptState* scriptState,
if (Node* node = m_currentTarget->toNode()) {
DCHECK(m_eventPath);
- size_t eventPathSize = m_eventPath->size();
- for (size_t i = 0; i < eventPathSize; ++i) {
- if (node == (*m_eventPath)[i].node()) {
- return (*m_eventPath)[i].treeScopeEventContext().ensureEventPath(
- *m_eventPath);
- }
+ for (auto& context : m_eventPath->nodeEventContexts()) {
+ if (node == context.node())
+ return context.treeScopeEventContext().ensureEventPath(*m_eventPath);
}
NOTREACHED();
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/TreeScope.cpp ('k') | third_party/WebKit/Source/core/events/EventPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698