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

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

Issue 473833002: Don't emptify event.path after dispatching an event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/events/Event.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }; 48 };
49 49
50 class EventPath FINAL : public NoBaseWillBeGarbageCollected<EventPath> { 50 class EventPath FINAL : public NoBaseWillBeGarbageCollected<EventPath> {
51 public: 51 public:
52 explicit EventPath(Event*); 52 explicit EventPath(Event*);
53 explicit EventPath(Node*); 53 explicit EventPath(Node*);
54 void resetWith(Node*); 54 void resetWith(Node*);
55 55
56 NodeEventContext& operator[](size_t index) { return m_nodeEventContexts[inde x]; } 56 NodeEventContext& operator[](size_t index) { return m_nodeEventContexts[inde x]; }
57 const NodeEventContext& operator[](size_t index) const { return m_nodeEventC ontexts[index]; } 57 const NodeEventContext& operator[](size_t index) const { return m_nodeEventC ontexts[index]; }
58 const NodeEventContext& last() const { return m_nodeEventContexts[size() - 1 ]; } 58 NodeEventContext& last() { return m_nodeEventContexts[size() - 1]; }
59 59
60 bool isEmpty() const { return m_nodeEventContexts.isEmpty(); } 60 bool isEmpty() const { return m_nodeEventContexts.isEmpty(); }
61 size_t size() const { return m_nodeEventContexts.size(); } 61 size_t size() const { return m_nodeEventContexts.size(); }
62 62
63 void adjustForRelatedTarget(Node*, EventTarget* relatedTarget); 63 void adjustForRelatedTarget(Node*, EventTarget* relatedTarget);
64 void adjustForTouchEvent(Node*, TouchEvent&); 64 void adjustForTouchEvent(Node*, TouchEvent&);
65 65
66 static EventTarget* eventTargetRespectingTargetRules(Node*); 66 static EventTarget* eventTargetRespectingTargetRules(Node*);
67 67
68 void trace(Visitor*); 68 void trace(Visitor*);
(...skipping 28 matching lines...) Expand all
97 97
98 WillBeHeapVector<NodeEventContext, 64> m_nodeEventContexts; 98 WillBeHeapVector<NodeEventContext, 64> m_nodeEventContexts;
99 RawPtrWillBeMember<Node> m_node; 99 RawPtrWillBeMember<Node> m_node;
100 RawPtrWillBeMember<Event> m_event; 100 RawPtrWillBeMember<Event> m_event;
101 WillBeHeapVector<RefPtrWillBeMember<TreeScopeEventContext> > m_treeScopeEven tContexts; 101 WillBeHeapVector<RefPtrWillBeMember<TreeScopeEventContext> > m_treeScopeEven tContexts;
102 }; 102 };
103 103
104 } // namespace 104 } // namespace
105 105
106 #endif 106 #endif
OLDNEW
« no previous file with comments | « Source/core/events/Event.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698