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

Unified Diff: third_party/WebKit/Source/core/events/TreeScopeEventContext.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
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 b7ab3e248e4c25e5831fc946452b6048a317381f..69db49d39d572783a0c8886536329a7991514ea9 100644
--- a/third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp
+++ b/third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp
@@ -69,9 +69,9 @@ HeapVector<Member<EventTarget>>& TreeScopeEventContext::ensureEventPath(
LocalDOMWindow* window = path.windowEventContext().window();
m_eventPath->reserveCapacity(path.size() + (window ? 1 : 0));
- for (size_t i = 0; i < path.size(); ++i) {
- if (path[i].treeScopeEventContext().isUnclosedTreeOf(*this))
- m_eventPath->append(path[i].node());
+ for (auto& context : path.nodeEventContexts()) {
+ if (context.treeScopeEventContext().isUnclosedTreeOf(*this))
+ m_eventPath->append(context.node());
}
if (window)
m_eventPath->append(window);
« no previous file with comments | « third_party/WebKit/Source/core/events/EventPath.h ('k') | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698