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

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

Issue 1728093007: Make Event.deepPath() return an empty array if an event is no longer being dispatched (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/Event.h
diff --git a/third_party/WebKit/Source/core/events/Event.h b/third_party/WebKit/Source/core/events/Event.h
index e447f5d3372663c4dcb7d470fa593c6cb6200c7d..f8cc299ef542865db1abf71ca4b2254bcf91cda5 100644
--- a/third_party/WebKit/Source/core/events/Event.h
+++ b/third_party/WebKit/Source/core/events/Event.h
@@ -187,6 +187,7 @@ public:
void initEventPath(Node&);
WillBeHeapVector<RefPtrWillBeMember<EventTarget>> path(ScriptState*) const;
+ WillBeHeapVector<RefPtrWillBeMember<EventTarget>> deepPath(ScriptState*) const;
bool isBeingDispatched() const { return eventPhase(); }
@@ -217,6 +218,11 @@ protected:
void setCanBubble(bool bubble) { m_canBubble = bubble; }
private:
+ enum EventPathMode {
+ EmptyAfterDispatch,
+ NonEmptyAfterDispatch
+ };
+
AtomicString m_type;
unsigned m_canBubble:1;
unsigned m_cancelable:1;
@@ -240,6 +246,8 @@ private:
// event timestamp provided by the host OS and reported in the original
// WebInputEvent instance.
double m_platformTimeStamp;
+
+ WillBeHeapVector<RefPtrWillBeMember<EventTarget>> pathInternal(ScriptState*, EventPathMode) const;
kochi 2016/02/25 09:49:40 nit: usually method declaration comes after enum a
hayato 2016/02/25 10:22:55 Done.
};
#define DEFINE_EVENT_TYPE_CASTS(typeName) \

Powered by Google App Engine
This is Rietveld 408576698