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

Side by Side Diff: third_party/WebKit/Source/core/events/EventPath.h

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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class TreeScope; 45 class TreeScope;
46 46
47 class CORE_EXPORT EventPath final : public GarbageCollected<EventPath> { 47 class CORE_EXPORT EventPath final : public GarbageCollected<EventPath> {
48 WTF_MAKE_NONCOPYABLE(EventPath); 48 WTF_MAKE_NONCOPYABLE(EventPath);
49 49
50 public: 50 public:
51 explicit EventPath(Node&, Event* = nullptr); 51 explicit EventPath(Node&, Event* = nullptr);
52 52
53 void initializeWith(Node&, Event*); 53 void initializeWith(Node&, Event*);
54 54
55 const HeapVector<NodeEventContext>& nodeEventContexts() const {
56 return m_nodeEventContexts;
57 }
58 HeapVector<NodeEventContext>& nodeEventContexts() {
59 return m_nodeEventContexts;
60 }
55 NodeEventContext& operator[](size_t index) { 61 NodeEventContext& operator[](size_t index) {
56 return m_nodeEventContexts[index]; 62 return m_nodeEventContexts[index];
57 } 63 }
58 const NodeEventContext& operator[](size_t index) const { 64 const NodeEventContext& operator[](size_t index) const {
59 return m_nodeEventContexts[index]; 65 return m_nodeEventContexts[index];
60 } 66 }
61 NodeEventContext& at(size_t index) { return m_nodeEventContexts[index]; } 67 NodeEventContext& at(size_t index) { return m_nodeEventContexts[index]; }
62 NodeEventContext& last() { return m_nodeEventContexts[size() - 1]; } 68 NodeEventContext& last() { return m_nodeEventContexts[size() - 1]; }
63 69
64 WindowEventContext& windowEventContext() { 70 WindowEventContext& windowEventContext() {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 HeapVector<NodeEventContext> m_nodeEventContexts; 132 HeapVector<NodeEventContext> m_nodeEventContexts;
127 Member<Node> m_node; 133 Member<Node> m_node;
128 Member<Event> m_event; 134 Member<Event> m_event;
129 HeapVector<Member<TreeScopeEventContext>> m_treeScopeEventContexts; 135 HeapVector<Member<TreeScopeEventContext>> m_treeScopeEventContexts;
130 Member<WindowEventContext> m_windowEventContext; 136 Member<WindowEventContext> m_windowEventContext;
131 }; 137 };
132 138
133 } // namespace blink 139 } // namespace blink
134 140
135 #endif 141 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.cpp ('k') | third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698